Previous Topic: Step 5. Modify the Skeleton JCLNext Topic: STEPLIB References


Skeleton JCL

The SAxJCL1 skeleton JCL member is processed by CA View when a batch job, such as, a batch reprint or loading of a report from tape is submitted.

The member contains symbolic parameters (variables which begin with an ampersand) which are substituted with the actual values when the job is submitted. The symbolic parameters used here are similar to the symbolic parameters in a JCL procedure.

Modify the SAxJCL1 member for STEPLIB references and tape setup processing.

&SJC1

&SJC2 &SJC3 &SJC4 //* //* MODIFY //*SETUP AS NECESSARY //* )DOT SARTVARS //*SETUP &TVSER (&TDSN) )ENDDOT //STEP1 EXEC PGM=SARBCH )DOT SAROUTPT &OJCL )ENDDOT //* //* MODIFY OR REMOVE STEPLIB AS NECESSARY //* //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR //* DD DSN=CAI.SPOOL.CBQ4LOAD,DISP=SHR <== CA Spool Loadlib //SYSUDUMP DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSIN DD * /DBASE NAME=&IDX

Following are the four variables which can be optionally used to construct JCL:

&USERID   User Id (8 characters)
&DID      Distribution Id (32 characters)
&SJCn     Job Statements 1 through 4 (each 72 characters)
&IDX      Database High-level Qualifier (17 characters)

The Distribution Id, and SJC1-4 are populated from the user's database profile. If any of the SJC1-4 are not defined when the user's profile was created, they default to JCL Comment statements (//*).

Optionally, there are two system variables which can be used to construct the JCL:

&PRD      Product Name (12 characters)
&GL       Maintenance Level (4 characters)

The Product Name is always initialized to CA View, the maintenance level is initialized from an entry in the program library (CVDELOAD). This maintenance level is sometimes referred as increment level.

There are two re-occurring tape setup variables which can be optionally used to construct the JCL:

&TDSN     Tape Dataset Name (44 characters)
&TVSER    Tape Volume Serial Number (6 characters)

These variables can be used for tape SETUP requirements. The sites may require a /*SETUP or a //*SETUP statement in the job stream before the data center can pull tapes. These two variables are called 're-occurring' because more than one tape may be required to complete the batch process.

The ")DOT SARTVARS" and ")ENDDOT" statements form a loop and create the "//*SETUP &TVSER (&TDSN)" statement for each tape referenced in the batch control cards.

The setup statements can be removed from the SAxJCL1 member if they are not required. They can also be used anywhere within the SAxJCL1 member, such as, creating a SARBCH Comment statement for documentation purposes:

/DBASE NAME=&IDX
)DOT SARTVARS
* DSNAME=&TDSN VOL=SER=&TVSER
)ENDDOT

These statements would create the following SARBCH Statements:

/DBASE NAME=.......db_hlq........
* DSNAME=.....tape_hlq.......SARTAPE.T00nnnnn VOL=SER=vvvvvv
* DSNAME=.....tape_hlq.......SARTAPE.T00nnnnn VOL=SER=vvvvvv

The SAxJCL1 JCL is combined with the JCL from the user's database profile. This JCL is presented to the user when the SUBMIT Command in entered from any panel. The user can modify these statements. You can ignore these JCL Statements and code all JCL in the SAxJCL1 member.

A SAxJCL1 member can have a JOB card which contains the user's id. The following is an example of a JOB Statement which may be coded in the SAxJCL1:

//&USERID.A JOB (ACCTNO),'CA VIEW',CLASS=A,MSGCLASS=X,NOTIFY=&USERID

Note: The job id modifier character is not incremented and in this example, is always be 'A'.

You can define four JCL Statements in the user's database profile using the SARBCH/DEFUSER Control Statement. These JCL Statements can be a job statement and other setup JCL or comment statements.

The following is a sample user definition:

/DEFUSER USER=DEARO02 ACC=YYYYY MODE=ALL MASTER=Y
   JCL1='//DEARO02A JOB (ACCNO),''ROBERT JONES'',CLASS=K,MSGCLASS=V'
   JCL2='/*JOBPARM S=CA31'
   JCL3='//JOBMSG OUTPUT JESDS=ALL,FORMS=RJ30'

Issuing the SUBMIT command from an interactive session displays the 'BATCH JOB JCL' panel:

CA View ALL ------------ BATCH JOB JCL ------------------------

COMMAND ===> JOB STATEMENT INFORMATION: ===> //DEARO02H JOB (ACCNO),'ROBERT JONES',CLASS=K,MSGCLASS=V ===> /*JOBPARM S=CA31 ===> //JOBMSG OUTPUT JESDS=ALL,FORMS=RJ30 ===> //*

Press ENTER to submit or enter END command to cancel.

The user can change or delete any of these statements before they are submitted with the JCL from the SAxJCL1 member; the SARBCH Control Cards are generated to fulfill the requested batch functions.

You can bypass the Job Statement submission panel if a standard job statement is coded in the SAxJCL1 member or if the end-user is not allowed to change the job statements saved in the user's profile. The 'BATCH JOB JCL' panel can be bypassed with a simple SARSUBUX exit.

The following sample SARSUBUX statement bypasses the 'BATCH JOB JCL' panel and immediately submits the batch job:

SARSUBUX CSECT

EBCMODE USING SARSUBUX,15 C 0,=F'12' BNE RC0 RC4 LA 15,4 BR 14 RC0 SR 15,15 BR 14 END