The following example shows how a loader is built using a batch file. The operation can be fully automated if the statement interface is used.
/ BEGIN-PROCEDURE / SET-PROC-OPTIONS LOGGING=YES,DATA-ESCAPE-CHAR='&&' / BEGIN-PARAMETER-DECLARATION / DECL-PARAM NAME=RMS (TYPE=STRING ,INIT='RMS') / DECL-PARAM NAME=RMSOML (TYPE=STRING ,INIT='SYSOML.RMS.071') / DECL-PARAM NAME=RMSFUNC (TYPE=STRING ,INIT='SYSDAT.RMS.071') / END-PARAMETER-DECLARATION / MODIFY-JOB-SWITCHES OFF=*ALL / &* / &* RMS CALL / &* -------- / &* / ADD-FILE-LINK LINK-NAME=RMSOML,FILE-NAME=&RMSOML / ADD-FILE-LINK LINK-NAME=DEF,FILE-NAME=&RMSFUNC / ASSIGN-SYSDTA TO-FILE=*SYSCMD / START-EXECUTABLE-PROGRAM *MOD(ELEMENT=&RMS,LIBRARY=&RMSOML) LMAX=55,FAM=EX,V7SYNTAX=JA,MODE=BATCH CREATE-RMS-OPTIONS PROTOCOL=EX.PROT,ERROR=ON(30) 1. CREATE-SW-CONF NAME='SYSREP.SPOOL.049',ADD=SPOOL V4.9A,ERROR=ON(30) 2. CREATE-REPFILE-DEFINITION NAME='LADER.SPOOL.049.1',PASS='SPOOL',- 3. ADDPROD=SPOOL V4.9A,ERROR=ON(30) SELECT-REPFILE-TO-BUILD PROD=SPOOL V4.9A,- 4. USERID=$RMSD,ERROR=ON(30) BUILD-REPFILE ERROR=ON(30) 5. END / ASSIGN-SYSDTA TO-FILE=*SYSCMD / SKIP-COMMANDS TO-LABEL=TCERR,IF=JOB-SWITCHES(ON=30) / SKIP-COMMANDS TO-LABEL=TCOK /.TCERR REMARK / REMARK **** ERROR PROCESSING **** / SKIP-COMMANDS TO-LABEL=ENDP /.TCOK REMARK / REMARK **** OK PROCESSING **** /.ENDP REMARK / MODIFY-JOB-SWITCH OFF=*ALL /EXIT-PROCEDURE
RMS option settings. The file EX.PROT will be used as a log file.
Definition of a software configuration SYSREP.SPOOL.049 including the product SPOOL V4.9A. This is a precondition for any loader creation as a loader must be linked with a software configuration.
Definition of a loader for product SPOOL V4.9A. This is automatically linked with the software configuration SYSREP.SPOOL.049.
Select the loader to be built. Here all the loaders containing the product SPOOL V4.9A in their definition will be selected.
Build the selected loader. The selected loaders are generated/installed in accordance with the options specified in their definition. The generation/installation user ID will be $RMSD as it has been specified in the SELECT-REPFILE-TO-BUILD statement.