This statement can be used to create a SAM file containing a BS2000 procedure. The procedure contains a START command for the JMU program.
When JMU is called during execution of the procedure, a new SJMSFILE system file is written. This replaces and corresponds to the SJMSFILE being processed before the procedure started.
This statement can be used to save the status of an open SJMSFILE during processing by means of BS2000 procedures.
The CREATE-PROCEDURE-FILE statement can be used to update the format of an SJMSFILE. If an existing SJMSFILE is processed with a different version of JMU, its format does not change. An SJMSFILE is only formatted according to the JMU version used when it is created as a new file.
However, as a result of the functional enhancements to JMU, conversion of the SJMSFILE format is only supported if the same JMU version is used to execute both the CREATE-PROCEDURE-FILE statement and the BS2000 procedure.
For this reason the JMU version used to create the procedure is recorded for documentation purposes in a REMARK command. If a different kind of conversion is to be made, the JMU statements in the procedure created may have to be altered in line with the operating instructions for the JMU version to be called.
Format
CREATE-PROCEDURE-FILE |
FILE-NAME = *STD-FILE-LINK / <filename 1..54 without-gen-vers> ,OVERWRITE = *NO / *YES |
Operands
FILE-NAME =
Name of the procedure file to be written. The file must be open for write access.
FILE-NAME = *STD-FILE-LINK
The file name should be read from the Task File Table (TFT). The link name, which must not be changed by the user, is SJMUPROC. The user can thus define the file name before calling JMU using
/ADD-FILE-LINK LINK-NAME=SJMUPROC,FILE-NAME=<filename>
If SJMUPROC is not defined as the link name, JMU uses the name SJMUPROC as the file name.
FILE-NAME = <filename 1..54 without-gen-vers>
A fully qualified file name. Specification of a file generation or file generation group, or of a file name in “file(no)” format (no=version number) is not allowed.
OVERWRITE =
Overwriting an existing file with the name specified in the FILE-NAME operand can be initiated or prevented.
OVERWRITE = *NO
Overwriting an existing file is prevented. The original file remains unchanged. The user receives the message JMU0114
.
No procedure file is created.
OVERWRITE = *YES
If a file with the same name already exists, it will be overwritten and a procedure file created.
Structure of the created BS2000 procedure
The file name of the SJMSFILE to be created and the JMU load module to be called can be specified as procedure parameters.
Meaning of the parameters:
&SJMSFILE | stands for the file name of the SJMSFILE to be created. The file named &SJMSFILE is deleted within the procedure so that JMU can create a new one. |
&JMU | stands for the JMU load module called in the procedure. |
BS2000 commands within the procedure
Immediately after the procedure header there are a number of /REMARK commands which contain information about the SJMSFILE to be created: the SJMSFILE file name defined by the CREATE-PROCEDURE-FILE statement, the date and time this statement was executed, the JMU version used and various characteristics of the SJMSFILE.
Then follow the commands and JMU statements required to run the procedure.
JMU statements within the procedure
The JMU statements DEFINE-JOB-STREAM, DEFINE-JOB-CLASS, GRANT-JOB-CLASS-ACCESS, SET-JOB-CLASS-DEFAULT, SET-POSIX-JOB-CLASS-DEFAULT and END are used to create the SJMSFILE.
The statements must be specified in a particular sequence within the procedure: First of all, the stream definitions should be specified in alphabetical order. A DEFINE-JOB-STREAM statement is required for each of these. Next, all job classes are defined, also in alphabetical order. Here, the statements GRANT-JOB-CLASS-ACCESS, SET-JOB-CLASS-DEFAULT and SET-JOB-CLASS-DEFAULT may be required in addition to the DEFINE-JOB-CLASS statement to define the user’s access rights for these classes. The JMU run is terminated by the END statement.