ONXDPF Generate DO procedures

ONXDPF outfil , param

DPF creates a DO procedure called outfil with the following structure:

/PROC A
expand-1
/STEP
expand-2
/STEP
....

/ENDP

The records expand-x (x = 1, 2, ...) will be generated from the param entries in the DPF statement according to the following rule: The param text will be transferred to expand. For each asterisk (*) in param, a file marked with X will be substituted. Following this process, an expanded record will be created for each marked file, whereby the actual file name will be substituted for the asterisk.

Examples:

ONXDPF DO.PROC-A,/CALL DO.TRANSFER,*

The file DO.PROC-A will be created with the following contents:

/PROC A
/CALL DO.TRANSFER,filename-1
/STEP
/CALL DO.TRANSFER,filename-2
/STEP
....

/ENDP

ON&DPF DO.PROC-B,/CATJV *,*.OLD,STATE=U

The file DO.PROC-B will be created with the following contents:

/PROC A
/CATJV jobvar-1,jobvar-1.OLD,STATE=U
/STEP
/CATJV jobvar-2,jobvar-2.OLD,STATE=U
/STEP
....

/ENDP

ONXDPF DO.COPY,/COPY *,*.NEW

With this, or similar commands, it is possible to run CPU-intensive file-oriented BS2000 commands in batch mode, without much difficulty, and without impinging on the dialog operation. For example, it could be used to copy many large files. The DO procedure thus created, DO.COPY, could then be run as an enter job from CFS (see Chapter 11, "Job Report System").

Write File Names

ONXDPF outfil     If the param operand is omitted, only a name record for each file marked with an X will be created in the following form

$user-id.filename ,filename

  <----------- 54 Chars --------> <-- 44 Chars ----->

The file will contain no other records, not even the procedure statements /PROC, /STEP and /ENDP.

This output file containing the file names can then be processed with EDT. For example, a command could be prefixed, or command operands could be suffixed. Inserting PROC and ENDP statements enables a DO procedure to be created easily from just these file names.