Output JCL Statements

The following are the output data sets:
ca712
The following are the output data sets:
SASSX2U2 X2U2CONV Statement
The X2U2CONV data set is a physical sequential output data set. The 
CA 7
 commands that convert the XPJOB to the AGJOB are written to this data set. Although you can edit the X2U2CONV data set before running it through the Batch Terminal Interface (next Step), we discourage it.
The following is an example of the output:
/LOGON MASTER  DBM  CONVERT,XPAG0006,BACKUP=X$AG0006,JOBTYPE=NT_JOB  AGJOB  UPD,XPAG0006,  AGJOBTYP=NT_JOB, AGENT=MACAGENT,  AG1=tant\userid  JCL, DELETE,XPAG006,DSN=highlvl.cai.JCLLIB  JCL,XPAG0006 EDIT MIXED  XSEQ I ,  CMDNAME "c:\nsm\bin\cau9test.exe"  ARGS "f=0008"  Exitcode 0-7 Success Exitcode 0008-9999 Failure $IEND  SAVE SAVE,XPAG0006,DSN= highlvl.cai.JCLLIB CLEAR DBM
As the example shows, you always have the following commands:
  • DBM statement
  • CONVERT statement
  • AGJOB statement
  • JCL Statement
If your XPJOB did not have an Optional PARMLIB, you do not have a JCL statement followed by a DELETE. In these situations, you see PRMLIB and MEMBER keyword/value pairs that are used during agent job definition.
Conversion is a destructive process. You can enter each of the commands noted previously by itself and succeed or fail. For example, the CONVERT and AGJOB commands could fail, but the JCL DELETE could succeed. Thus, you are left with an XPJOB definition and no Optional PARMLIB member.
Two conditions can cause the conversion to fail.
  • You are trying to CONVERT the same job twice. The first conversion is successful, the second fails. This failure is not, however, catastrophic! The subsequent AGJOB statement makes the same updates the initial AGJOB statement made during conversion. Subsequent JCL statements also execute as they did during the initial conversion.
  • The RESTORE name already exists. If the RESTORE name exists as a result of converting the same job twice, you have the same situation as the first bullet item (for example, nothing catastrophic). If, however, this conversion attempt is your first and a RESTORE name is already in the database, you can be left with an XPJOB definition and no Optional PARMLIB member.
Regarding the second bulleted item, consider this example where the RESTMASK was set to 8$ (so the last character of the member name is changed to the mask character).
CONVERT,ABCDE1,BACKUP=ABCDE$,JOBTYPE=NT_JOB  CONVERT,ABCDE2,BACKUP=ABCDE$,JOBTYPE=UNIX_JOB 
Job ABCDE1 completes successfully. Job ABCDE2 fails because the backup name already exists. Job ABCDE2's Optional PARMLIB (if present) is deleted. A backup of the ABCDE2 Optional PARMLIB exists in the backup copies created in job AL2AGJC1.
Verify that duplicate backup members do not exist, or will not exist, when the CONVERT command is executed. Also, remember the same process was used during the CA7TOUNI to XPJOB conversion. Verify that the RESTMASK used for converting XPJOBs to agent jobs is not the same one that you used for the CA7TOUNI to XPJOB conversion.
SASSX2U2 X2U2ASEC Statement
(Required) The X2U2ASEC data set is a physical sequential output data set. This data set contains the information necessary to build the agent user ID/password records required to run the converted job at the agent. This data set is used as input to job AL2AGJC3, described later in these topics. Do not worry about duplicate entries in this data set. They are resolved when job AL2AGJC3 is executed.
XPJOBs that contain SUBUSER/SUBPASS information in the Optional PARMLIB member have that information transferred to the X2U2ASEC data set. Thus, consider restricting who can access this data set. No other password information is maintained in this data set. This information is described in more detail in Step IV - Generating Agent User-ID/Password Records.
SASSX2U2 X2U2REST Statement
(Required) The X2U2REST data set is a physical sequential output data set. The 
CA 7
 commands that restore the AGJOB back to an XPJOB are written to this data set. The Restore command is a single-line command.
RESTORE,CA7XJOB,BACKUP=CA7$JOB
The Restore command is a destructive command. The command wipes out an AGJOB definition created by the Convert command. If the Restore command is executed, you also must copy the original Optional PARMLIB member (if present) from the backup data set (created by AL2XPJC1) to the appropriate 
CA 7
 JCL library.
Remember, if a RESTMASK is not provided, no backup of the 
CA 7
 XPJOB definition is created. To restore, delete the AGJOB definition, create a "new" XPJOB definition, and copy the original Optional PARMLIB member back from the data set created in the AL2AGJC1 job.
SASSX2U2 X2U2XNOD Statement
(Required) The X2U2XNOD data set is a physical sequential output data set. The 
CA 7
 commands that delete Node records from the database are written to this data set. This data set is input to JCL procedure CA7BTI and is discussed in more detail in Step V - XPJOB Clean Up.
SASSX2U2 X2U2XPSW Statement
(Required) The X2U2XPSW data set is a physical sequential output data set. The 
CA 7
 commands that delete Owner and Node Access records from the database are written to this data set. This data set is input to JCL procedure CA7BTI and is discussed in more detail in Step V - XPJOB Clean Up.
SASSX2U2 X2U2REPT Statement
(Required) The X2U2REPT statement is a SYSOUT data set. All informational, warning, and error messages generated during the AL2XPJC2 job are written to this data set. Inspect this report thoroughly before proceeding to Step III - Processing the Conversion BTI File.
Your XPJOB definitions dictate the messages you see. Ideally you only see informational or warning messages. However, because of some situations where we cannot convert, error messages sometimes occur. A truncated sample of the report follows.
SASSX2U2-01                                    CA Workload Automation XPJOB-AGJOB Conversion Report                       PAGE 1 DATE: 06/30/yy JOBNAME C4MSG01SELECTED FOR PROCESSING *** WARNING *** -JOBNAME C4MSG01WILL NOT RETAIN PARMLIB INFO IN PRIOR RUN QUEUE WHEN CONVERTED *** WARNING *** -  JOBNAME C4MSG01  WILL NOT RETAIN PARMLIB INFO IN PRIOR RUN QUEUE WHEN CONVERTED                                   JOBNAME C4MSG01  CONVERT COMMANDS SUCCESSFULLY CREATED                                                                               JOBNAME C4MSG02  SELECTED FOR PROCESSING                                                                                            *** WARNING *** -  JOBNAME C4MSG02  WILL NOT RETAIN PARMLIB INFO IN PRIOR RUN QUEUE WHEN CONVERTED                                   JOBNAME C4MSG02  CONVERT COMMANDS SUCCESSFULLY CREATED                                                                               JOBNAME C4MSG02A SELECTED FOR PROCESSING                                                                                             *** WARNING *** -  JOBNAME C4MSG02A WILL NOT RETAIN PARMLIB INFO IN PRIOR RUN QUEUE WHEN CONVERTED                                   ***  ERROR  *** -  JOBNAME C4MSG02A EXEC EXCEEDS 100 CHARACTERS, JOB NOT CONVERTED                                                   JOBNAME C4MSG02B SELECTED FOR PROCESSING                                                                                             *** WARNING *** -  JOBNAME C4MSG02B WILL NOT RETAIN PARMLIB INFO IN PRIOR RUN QUEUE WHEN CONVERTED                                   JOBNAME C4MSG02B CONVERT COMMANDS SUCCESSFULLY CREATED      ….. ….. ….. Members Selected for Conversion............. 15 Members Successfully Converted............... 6  Members Not Converted........................ 9 
SASSX2U2 Return Codes
The conversion utility program (SASSX2U2) returns one of the following four return codes:
RC=0
Indicates that the job ran successfully. Only informational messages are written to the X2U2REPT DD statement.
RC=4
Indicates that the job ran successfully, but one or more members had warning messages issued. Review the warning messages in the X2U2REPT DD statement to see what is not in the converted job.
RC=8
Indicates that the job ran successfully, but one or more members had errors that prevented the creation of conversion statements. Review the error messages in the X2U2REPT DD statement, and determine the necessary action.
RC=12
Indicates that the job failed. No CONVERT commands were generated. Review the WTO in the job's JES JOBLOG for the cause of the failure.
SASSX2U2 Optional PARMLIB Processing
SASSX2U2 processes the Optional PARMLIB statements in the sequence in which they were entered. So, for duplicate entries, the last one is what is used for conversion. Consider the following Optional PARMLIB example.
SUBUSER=User1 SUBPASS=Pass1 PARM2=F=2048 SUBUSER=User2 SUBPASS=Pass2 PARM2=T=10
In this situation, the new AGJOB definition would use User2/Pass2 as the agent user ID/password. The ARGS statement would have T=10.