Null values
If you issue an INQUIRE command to find out the value of an attribute that is not applicable to the named resource, CICS® returns a null value in the data area that you have defined. CICS also returns a null value if the information that you have requested is not available at the time of the inquiry. Similarly, LOAD and ADDRESS command returns a null value for pointer option if resource or control block does not exist.
- Character fields are blanks.
- Binary fields are -1.
- Pointer fields are X'FF000000'.
- C programs return zero as the null value.
- CICS-Value Data Area (CVDA) fields are DFHVALUE(NOTAPPLIC). For more information, see CICS-value data areas (CVDA).
If you issue a SET command that includes one or more null argument values, CICS ignores the corresponding attributes. This allows the possibility of coding general SET commands in which some attributes can be left as they are, without having to issue an INQUIRE command first to establish what the current values are. You are most likely to want to do this when the field is defined as a CVDA. However, in all cases, if you simply leave out an optional attribute from a SET command, CICS does not change its value.
WS-SYMBOLNAME = DFHVALUE(IGNORE)
EXEC CICS SET
FILE(WS-FILENAME)
READABLE
ADDABLE
DELETE(WS-SYMBOLNAME)
END-EXEC.You can then read from, and add to, the file. The delete status remains the same as it was before the SET FILE command was issued. Simply leaving out the DELETE option from the command gives the same effect, but this approach lacks flexibility for some coding conditions.
For more information about the use of CVDAs, see CVDAs recognized by the translator.