Previous Topic: Understanding the SystemNext Topic: Using the System Default Member ($$DQJCL)


Sharing JCL

End users can share JCL if it contains the #DQOPERATORNAME variable ID so that when the user enters a valid JCL name, the #DQOPERATORNAME is automatically replaced by the user's ID. Only the first occurrence of #DQOPERATORNAME is replaced per line (80 byte card image). If replacing #DQOPERATORNAME in the JCL causes the line to go past column 71, the DQ506E error message is displayed and the JCL needs to be changed for the variable to be used.

An example for using the #DQOPERATORNAME variable is as follows:

An example for z/OS would be:

// jobname  JOB  (accounting information),MSGCLASS=X,CLASS=A,
//          USER=#DQOPERATORNAME,PWD=ABCD
// EXEC PROC=procname
// EXEC PGM=DQBATCH
// SYSIN DD *
/* DQ INPUT
//

When these jobs run, everywhere #DQOPERATORNAME was found in the above JCL, it was replaced with the TSS userid of TSS-USER. For more information about DQ user ID's and security, see the CA Datacom Security Reference Guide. Another way to accomplish this is to set up DQ PROC (special DQ JCL) members that allow substitution of several different variables. See PROC Example, for an example.

An example for z/VSE would be:

*  $$ JOB JNM=DQBATCH,....
// JOB #DQOPERATORNAME
// ID USER=#DQOPERATORNAME,PWD=ABCD
// EXEC PROC=procname
*  * #DQOPERATORNAME
// EXEC DQBATCH
/* DQ INPUT
/*
/&
*  $$ EOJ

Note: There is not a special DQ variable to obtain the password from TSS and pass it to the //ID statement in your JCL. In this case, the password had to be hardcoded. Another way to handle variable substitution is mentioned in the above z/OS example.