next up previous contents index
Next: Example of using Up: DZ: The debug Previous: Map and checks

Monitor changes inside a ZEBRA store or bank.

Calculate the checksum of a vector in a ZEBRA store

CALL DZCHVC (CHTEXT,IXSTOR,LBEGIN,LEND,CHOPT,*ISUM*)

Action: DZCHVC calculates the checksum of the vector (interval) [LBEGIN,LEND] in a given ZEBRA store and returns the checksum result in a 2-word user vector.

Input parameter description:

CHTEXT
Character variable specifying the text to be printed (truncated to 50 characters).
IXSTOR
Index of the store where the checksum has to be calculated.
LBEGIN
First word of the interval for which the checksum has to be calculated which is to be displayed.
LEND
Last word of the interval for which the checksum has to be calculated
CHOPT
Character variable specifying option desired.
'C'
Calculate the checksum for the desired interval (default)
'V'
Verify - Compare the newly calculated value of the checksum with the one given on input in the array ISUM
*ISUM*
V option only -- Two word integer array containing the checksum calculated by a previous call to DZCHVC. This value has to be compared with the newly calculated checksum for the given interval.

Output parameter description:

*ISUM*
Two word integer array containing the calculated checksum.
This vector can be used as input to a subsequent call to DZCHVC for the same interval or can be tested for modifications by the user himself.

When the V option is set and a difference is detected between the input and output values of ISUM, then a non-zero value will be returned in \IQUEST(1), otherwise \IQUEST(1) will be zero.

Important remark

Since the checksum algorithm sums the contents of the vector [LBEGIN,LEND] bit by bit, not all possible changes can be detected (e.g. inversions in the sequence of the elements will go undetected).

Monitor changes in a ZEBRA bank

CALL DZCHST (CHTEXT,IXSTOR,LBANK,CHOPT,*ISUM*)

Action: DZCHST monitors changes in the banks of ZEBRA data structure. It uses routine DZCHVC. The data, system and link part of the banks are monitored separately.

Input parameter description:

CHTEXT
Character variable specifying the text to be printed (truncated to 20 characters).
IXSTOR
Index of the store where the bank to be monitored resides.
LBANK
Address of the bank to be monitored.
CHOPT
Character variable specifying option desired.
'B'
Bank - Consider the checksum of the single bank at LBANK (default)
'C'
Calculate the checksum for the desired banks(s) (default) checksum for the desired bank parts
'D'
Consider the checksum of the structure supported by LBANK, but do not follow the next link.

'L'
Consider the checksum of the structure supported by LBANK, also following the next link.

'V'
Verify - Compare the newly calculated value of the checksums with the ones given on input in the array ISUM.
*ISUM*
V option only -- Six word integer array containing the checksums calculated by a previous call to DZCHST. These values have to be compared with the newly calculated checksums for the different parts of the bank(s) in the data structure.

Output parameter description:

*ISUM*
Six word integer array containing the calculated checksums for the different parts of the bank as follows:
1-2
Checksum of the data part
3-4
Checksum of the link part
5-6
Checksum of the system part
This array should be used as input to a subsequent call to DZCHST for the same bank or can be tested for modifications by the user himself.

When the V erify option is active and a difference is detected then the variable \IQUEST(1) in common /\QUEST/ will be non zero. When everything is correct it will contain zero.

DZCHST Error return codes

When DZCHST detects an error then it fills the \IQUEST vector as follows:

IQUEST(11)
0 : Data part OK. 1 : Data part faulty
IQUEST(12)
0 : Link part OK. 1 : Link part faulty
IQUEST(13)
0 : System part OK. 1 : System part faulty



next up previous contents index
Next: Example of using Up: DZ: The debug Previous: Map and checks


Janne Saarela
Mon May 15 08:34:47 METDST 1995