Define Variable Action in Dialog and process it as an Enter job

CFS allows Variable Actions (ONX../ON&..) to be defined in dialog mode, and to be processed as an Enter job under control of the Job Report System (see Chapter 11). The Variable Action should be entered in the usual way from the CFS mask in dialog. ONX... will process only the marked items, and ON&... will process all the entries.

The required Variable Actions will be processed in their own Enter job if the definition of the Variable Action is terminated with ,ENTER [,AP] [/enter-params]

The definition of the Variable Action containing the suffix ,PROC [=procfile] [, AP] will cause a BS2000 procedure to be generated. If the procfile parameter is not specified, a standard file name (CFS.P.tsn.hhmmss) will be generated for the procedure. The DOC file referenced in the DO procedure will not be deleted automatically, as is the case with ,ENTER.

The AP parameter will enable any required file passwords to be entered prior to the start of the Enter job. Terminating the password entry process is achieved by pressing the K1 key, or by entering END [,C'passw']. The C'passw' option will result in the Enter file created by CFS being cataloged with a read password.

Any valid Enter command parameter may be specified for enter-params, such as JOB-CLASS= JCBLONG,TIME=100,PRIORITY=180. For further information on the Enter parameters, see page 11-.

Processing Variable Actions with the ENTER parameter begins with a documentation file being created containing either the entire list, or only marked items. An Enter file is then prepared with the following contents:

/LOGON
/SYSFILE SYSDTA=(SYSCMD)
/SYSFILE SYSOUT=CFS.SYSOUT.tsn.hhmmss
/SETSW ON=(4,11)
/EXEC CFS
*001 FILE=OLDLIST CFS.DOC.tsn.hhmmss; -
VAR=ON&....
/ER CFS.DOC.tsn.hhmmss
/STEP
/LOGOFF NOSPOOL

This Enter file is then started and controlled by the Job Report System. When the job has finished, the user will be presented automatically with the SYSOUT listing on screen. A full description of the respective masks can be found on page 11-.

Examples:

ONXREORG,ENTER

The ISAM files or libraries marked with an X are reorganised by CFS in an Enter job. The job runs in the background, avoiding any waiting on the screen.

ON&FIND'/EXEC CFS','/EXEC $CFS'=W CFS.RESULT,ENTER/TIME=500

All files and libraries selected in the file list will be searched for the occurence of the specified character string. The resulting records are written to a file CFS.RESULT. The Variable Action will be run as its own Enter job which is started with a TIME=500 parameter.

ON&FIND' EXEC CFS','/EXEC $CFS'=W CFS.RESULT,PROC=CFS.P.FIND

All the selected files/libraries will be searched for the specified string. The resulting records containing the string will be written to the file CFS.RESULT. A DO procedure called CFS.P.FIND will be created to execute the Variable Action. This will not be started automatically by CFS - the user must start it manually.