Sample Job for Multiple Element Component List

Document created by Eoin Employee on Dec 31, 2014
Version 1Show Document
  • View in full screen mode

To make it easier for anybody who is interested in following along with the Table Tool discussions (ACMQ for Multiple Copybooks at the Same Time) - I'd like to post the complete sample job here (to make it easier to upload/annotate)

 

//OCLEO01C  JOB (108400000),'CSV COMP',REGION=4096K,                 

//  RESTART=TBL#TOOL,                                                

//  MSGCLASS=X,CLASS=B,MSGLEVEL=(1,1),NOTIFY=&SYSUID                 

/*JOBPARM  SYSAFF=CA31                                               

//***********************************************************        

//* STEP 1 - PREVENTIVE DELETE OF DATASETS USED IN THE TEST          

//***********************************************************        

//DDSDEL   EXEC PGM=IDCAMS,COND=(12,LT)                              

//SYSPRINT DD SYSOUT=*                                               

//SYSIN    DD *                                                      

  DELETE PUBLIC.CSVAPI.CSVOUT                                        

//*                                                                  

//*****************************************************              

//* STEP 2 - ALLOCATE SEQUENTIAL DATASETS FOR CSV OUTPUT             

//******************************************************             

//DDSALOC  EXEC PGM=IEFBR14                                          

//*                                                                  

//STEP1DD  DD DSN=PUBLIC.CSVAPI.CSVOUT,                              

//         DCB=(DSORG=PS,RECFM=VB,LRECL=4092,BLKSIZE=4096),          

//         DISP=(NEW,CATLG,DELETE),                                  

//         SPACE=(TRK,(5,1),RLSE),                                   

//         UNIT=SYSDA                                                

//$$$$$$@  EXEC PGM=NDVRC1,REGION=4M,                                

//         PARM='CONCALL,DDN:CONLIB,BC1PCSV0' (EXEC FROM NON-AUTH LIB)

//STEPLIB  DD DISP=SHR,DSN=BST.QA.SUPPNDVR.AUTHLIB                   

//         DD DISP=SHR,DSN=BST.C11600.CSIQAUTU                       

//         DD DISP=SHR,DSN=BST.C11600.CSIQAUTH                       

//CONLIB   DD DISP=SHR,DSN=BST.C11600.CSIQLOAD                       

//*TEPLIB  DD DISP=SHR,DSN=BST.QA.SUPPNDVR.AUTHLIB.C11501            

//*        DD DISP=SHR,DSN=BST.C11501.CSIQAUTU                       

//*        DD DISP=SHR,DSN=BST.C11501.CSIQAUTH                       

//*ONLIB   DD DISP=SHR,DSN=BST.C11501.CSIQLOAD                       

//SYMDUMP  DD DUMMY                                                  

//C1MSGS1  DD SYSOUT=*                                               

//BSTERR   DD SYSOUT=*                                               

//BSTIPT01 DD *                                                      

  LIST ELEMENTS USING COMP ELE CASTPACK TO FILE APIEXTR OPTION NOCSV.

  LIST ELEMENTS USING COMP ELE C1UEXITS TO FILE APIEXTR OPTION NOCSV.

  LIST ELEMENTS USING COMP ELE COMMITPK TO FILE APIEXTR OPTION NOCSV.

//APIEXTR  DD DSN=PUBLIC.CSVAPI.CSVOUT,DISP=MOD                            

//**********************************************************************   

//* Print Raw                                                              

//**********************************************************************   

//IEBGENER EXEC PGM=IEBGENER                                               

//SYSPRINT DD   SYSOUT=*                                                   

//SYSUT1   DD   DISP=SHR,DSN=PUBLIC.CSVAPI.CSVOUT                          

//SYSUT2   DD   SYSOUT=*                                                   

//SYSIN    DD   DUMMY                                                      

//**********************************************************************   

//* Sort and De-Dup                                                        

//**********************************************************************   

//SORTDDUP EXEC PGM=SORT                                                   

//SORTIN   DD DISP=SHR,DSN=PUBLIC.CSVAPI.CSVOUT                            

//SORTOUT  DD DISP=SHR,DSN=PUBLIC.CSVAPI.CSVOUT                            

//SYSIN    DD *                                                            

  SORT  FIELDS=(17,43,CH,A)                                                

  SUM   FIELDS=NONE                                                        

//SYSOUT   DD SYSOUT=*                                                     

//**********************************************************************   

//* Print De-Duped records                                                 

//**********************************************************************   

//IEBGENER EXEC PGM=IEBGENER                                               

//SYSPRINT DD   SYSOUT=*                                                   

//SYSUT1   DD   DISP=SHR,DSN=PUBLIC.CSVAPI.CSVOUT                          

//SYSUT2   DD   SYSOUT=*                                                   

//SYSIN    DD   DUMMY                                                      

//**********************************************************************   

//* Format records using Tabel Tool (ENBPIU00)                             

//**********************************************************************   

//TBL#TOOL EXEC PGM=IRXJCL,PARM='ENBPIU00 A'                               

//SYSEXEC  DD DISP=SHR,DSN=BST.C11700.CSIQCLS0                             

//TABLE    DD DISP=SHR,DSN=PUBLIC.CSVAPI.CSVOUT                            

//OPTIONS  DD *                                                            

  IF $row# < 1 THEN Linecount = 0           /* Initialize line count */    

  $StripData = 'N'                          /* preserve spaces */          

  If LCMSEYE  /= 'LCMS' then $SkipRow = 'Y' /* Expected record type? */    

  If LCMSRTYP /= '1'    then $SkipRow = 'Y' /* Component Record? */        

  Linecount = Linecount + 1                 /* Increment line count */     

  IF Linecount // 60 = 1 then x = BuildFromMODEL(MODELH) /* write headers */

//POSITION DD *  The Position DD is used to describe the input table       

  LCMSLEN         1  2 <  2 > Block Length                                 

  LCMSFLGS        3  4 <  2 > Response Flags                               

  LCMSID          5  6 <  2 > Block ID 1793                                 

  LCMSVER         7  8 <  2 > Block Version                                 

  LCMSEYE         9 12 <  4 > Eye Catcher                                   

  LCMSRTYP       13 13 <  1 > Rec-Type 1-6                                  

  LCMSRLVL       14 15 <  2 > Record Level                                  

  LCMSRSYN       16 16 <  1 > Synonum flag, "*" if indirect                 

  LCMSELE10      17 26 < 10 > Element name                                  

  LCMSTYP        27 34 <  8 > Type                                          

  LCMSENV        35 42 <  8 > Environment                                   

  LCMSSYS        43 50 <  8 > System                                        

  LCMSSBS        51 58 <  8 > SubSystem                                     

  LCMSST#        59 59 <  1 > StageNum                                      

  LCMSSTG        60 60 <  1 > StageID                                       

  LCMSSTN        61 68 <  8 > StageName                                     

//MODELH   DD * This Header block is demanded as needed                     

                        Referenced Component List                    &$date 

                                                                     &$time 

  Element     System    SubSystem  Type      Environment  Stage             

  ----------  --------  ---------  --------  -----------  --------          

//MODEL    DD *                                                             

  &LCMSELE10  &LCMSSYS  &LCMSSBS   &LCMSTYP  &LCMSENV     &LCMSSTN          

//TBLERR   DD SYSOUT=*                                                      

//TBLOUT   DD SYSOUT=*                                                      

//SYSTSPRT DD SYSOUT=*                                                     

Attachments

    Outcomes