XSVRJCL (automated server JCL) automation control point


Use the XSVRJCL automation control point to dynamically modify the server JCL.

Important

BMC AMI Utilities provide the following symbolic variables for defining server jobs:

  • &MJ (primary job name)
  • &MU (user ID of the primary)
  • &MJC (primary job class)

If these are the only pieces of information you need, use these symbolic variables instead of the XSVRJCL automation control point. For more information, see Literals.

The product invokes this automation control point three times at the beginning of the server job submission process - once for each of the following jobs:

  • The main JOB statement
  • The tape server job
  • The disk server job

Variables

The following table describes the variables used in the XSVRJCL automation control point:


Variable name

Contents

Possible values

jcl

Stem variable that contains the lines of JCL code that have been read in from the specified member or DD

Required

Not applicable

type

Type of job information that has been passed

Required

  • JOBCARD
  • TAPE
  • DISK

Output

The output from this automation control point is the same stem variable jcl, modified as needed by processing.

Return codes

The XSVRJCL automation control point returns the following return codes:


Return code

Description

0

(default value) Signifies normal completion

No action is required.

Any other value

Abnormal termination

Set the return code to any non-zero value to cancel the entire job.

Usage considerations

Review the following information before using this automation control point:

  • The XSVRJCL automation control point resides in the same data set as the other automation control points (look for the NGTAUTO DD statement). If the server does not find this automation control point, the JCL is run as defined by the +SVRJCLJOB, +SVRJCLTAPE, and +SVRJCLDISK parameters.
  • You may use this automation control point to change, delete, or add lines to the JCL stem lines. (Alternatively, you may leave the lines untouched, if appropriate for your needs.)
  • The JCL that this automation control point returns passes through normal symbolic substitution and is sent to the internal reader to create a server job.
  • To provide information such as the account number or account information for your created JOB statement, use the _cdbvar built-in function.
  • If you are running JES3, edit this automation control point to remove PRTY=9 from the job card.
  • To customize server JOB statements without using this automation control point, you can use available symbolic variables. For more information, see Server-JCL.
  • For more information about stem variables and their usage, see the IBM REXX documentation.

Example

The following figure illustrates a typical XSVRJCL automation control point:

Select                                                            
  When TYPE = 'JOBCARD' Then Do                                   
     x = _CDBVAR('ACCOUNT')             
     x = translate(x,'','(')      /* remove leading ( */          
     char4 = substr(x,4,1)        /* 4th char of account info */    
     char5 = substr(x,5,1)        /* 5th char of account info */  
     jcl.1= '//SVR'char4||char5'&NNN'  subword(jcl.1,2)           
  End                                                             
  Otherwise NOP                                                   
End                                                               
Call Says;                                                        
RC = 0                                                            
Exit 0            


/* SUBROUTINE TO SHOW WHAT'S BEEN CHANGED */
Says:                                                                   
Say'================ VARS AVAILABLE TO XSVRJCL  =================' ;   
If execvars.0 > 0 Then                                                  
Do x = 1 To execvars.0 ;                                                
   vv = value(execvars.x.name) ;                                        
   Say Left(execvars.x.name,18)' = 'Left(vv,18)' - 'execvars.x.desc ;   
End ;                                                                   
                                                                       
do i = 1 to jcl.0                                                       
   say 'New server JCL:' jcl.i                                          
end                                                                     
Return;

In this example, when XSVRJCL is called with a type of JOBCARD, the first line of stem variable jcl (that is, jcl.1) is changed to //SVR followed by the 4th and 5th characters of the account information code and a three-digit serial number represented by the symbolic variable &NNN. XSVRJCL obtains the account information by calling the _cdbvar built-in function and extracting the 4th and 5th characters by using the substr function.

The 'Says' subroutine shows the variables that are available for this automation control point. The subroutine also shows what the modified JCL will look like. The label 'New server JCL:' will precede each line as an eye-catcher in the program output.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*