z/OS JES2 Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


$SCANB – Backup storage for a scan

z/OS JES2 Macros
SA32-0996-00

Use $SCANB to backup a copy of a storage area before it is possibly changed during execution of the $SCAN facility. $SCANB may be used only within a prescan or postscan exit routine specified through the PRESCAN and PSTSCAN operands of the $SCANTAB macro.

The $SCAN facility uses $SCANB to backup all control block fields before they are changed. If, at any time during the scan, an error is found, $SCAN uses the backups created by $SCANB to restore all the changed fields to their contents before the start of the scan. If a $SCAN prescan or postscan exit routine changes a storage area, it should first backup that area using the $SCANB macro.

Format description

Read syntax diagramSkip visual syntax diagram
>>-+--------+--$SCANB--SCWA--=--+-addrx----+-------------------->
   '-symbol-'                   '-(--R1--)-'   

>--,--ADDR--=--+-addrx----+--,--LENGTH--=--+-label------+------->
               '-(--R0--)-'                '-(--R--n--)-'   

>--+-----------------------------------------------+-----------><
   |             .-BACKUP------------------------. |   
   '-,--TYPE--=--+-DISPLAY-----------------------+-'   
                 +-+---+--ERROR--+------+--+---+-+     
                 | '-(-'         '-,SEC-'  '-)-' |     
                 '-INVALIDATE--------------------'     

SCWA=
Specifies the address of the current scan work area, mapped by the $SCANWA macro.
ADDR=
Specifies the address of the storage area to backup before the scan possibly changes it.
LENGTH=
Specifies the length (in bytes) of the storage area indicated by the ADDR operand. If register notation is used, only registers 2 through 12 are valid.
TYPE=
Specifies that an area of storage is to be used following a SET and DISPLAY $SCAN request or if an error occurs within a $SCAN call.
DISPLAY
Indicates to save an area of storage to use to display the results of a SCAN=SET request. The value that is set is passed to $SCAN and used as input for a SCAN=DISPLAY request, for example:
$SCANB SCAN=DISPLAY,ADDR=addrx,LENGTH=

This value must, therefore, also be scannable by $SCAN.

ERROR
Indicates to save an area of storage to use if an error is encountered during a $SCAN call. $SCAN then returns this keyword value to point to the location of the error.
Optionally, a second operand can be supplied with ERROR:
(ERROR,SEC)
Indicates that this is a secondary error string.
BACKUP
Indicates to produce a backup copy of the storage area before it is possibly changed during the execution of $SCAN.
INVALIDATE
Indicates that any TYPE=BACKUP areas that have been created for the specified range of storage are no longer valid.

Environment

  • Not applicable.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014