PRESERVE TEMPORARY

<< Click to Display Table of Contents >>

Navigation:  Reference > Commands >

PRESERVE TEMPORARY

The form of the PRESERVE TEMPORARY command is:

PRESERVE TEMPORARY,

It may appear only once in a CL script, in the Data Stage, after START DATA and before the first executable command. It tells CL not to clear (zero) the temporary data area when passing through FINISH and START.

The temporary data area contains all variables whose names begin with the letter X. Space can be allocated for these variables by the TEMPORARY command. If this area is preserved, temporary variables can be used to accumulate values or count occurrences throughout the data. These counts and values can be printed when the end of the input file is reached by using the EFIL parameter on the READ command.

If it is required to preserve the values of some but not all of the temporary variables, those being preserved should be defined at the top of the main CL script and the definitions followed by the command ZERO TO FINISH. Subsequent temporary variables will be cleared each time through.