Monday, February 6, 2012

Xpedite a batch COBOL DB2 program in TSO


Usually run JCL for a batch DB2 program will be something like the below one. Using this run JCL, we wont be able to debug the program thru Xpeditor/TSO.


//RUNJCL  JOB CLASS=X,PRTY=15,                   
// MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID                            
//*                                                                    
//JOBLIB DD DISP=SHR,DSN=TSUXXXX.TEST.LOAD                             
//GO   EXEC  PGM=IKJEFT01  
//IFILE DD ...
//OFILE DD ...
//SYSTSPRT DD SYSOUT=*  
//SYSOUT DD SYSOUT=*                                                   
//SYSTSIN  DD *                                         
 DSN SYSTEM(DB1T)                                       
 RUN PROGRAM(TESTPGM) PLAN(PTESTDTA) PARM('001XB98')    
 END                                                    
/*                                                      
//*                                                     

To Xpedite the program, we need to convert the run JCL as shown below. Let us call this as XPEDJCL.

//RUNJCL  JOB CLASS=X,PRTY=15,                   
// MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID                            
//*                                                                    
//JOBLIB DD DISP=SHR,DSN=TSUXXXX.TEST.LOAD                             
//GO    EXEC PGM=TESTPGM,PARM('001XB98')                                                  
//IFILE DD ...
//OFILE DD ...
//SYSOUT DD SYSOUT=*                                                    
//*                                                                    
                    
Then in the below XPED screen, we need to input the fields highlighted in yellow. Xpediter will NOT read the PARM parameter from the JCL. So, we need to manually input the PARM value in the below screen. Input the dataset name containing the customized JCL for XPED against the “File List/JCL member”. Make sure “DB2 TEST” is “YES” and supply the plan name and DB2 subsystem name.  You also need to supply the LOADLIB which contains the program to be debugged and DDIO file which has DDIO member of the program by accessing “Setup Menu”. After setting up all these values, press ENTER key, it will show you the XPED debug screen.



Profile: DEFAULT ------  XPEDITER/TSO - STANDARD (2.1)  -----------------------
 COMMAND ===>                                                                  
                                                                               
 COMMANDS:  SEtup (Display Setup Menu)                                          
            PROFile (Display Profile List)                                     
 TEST SELECTION CRITERIA:                                                      
                                                                               
                Program ===> TESTPGM                                           
            Entry Point ===>                                                   
            Load Module ===>                                                   
                                                                                
         Initial Script ===>                                                   
            Post Script ===>                                                   
                                                                                
   PARM  ( Caps = YES ) ===> '001XB98'                                         
                                                                               
   File List/JCL Member ===> 'TSUBXXX.TEST.JCL(XPEDJCL)'                        
         Preview Files? ===> NO                                                
    Code Coverage Test? ===> NO   (YES, NO, TDO)  System Flow? ===> NO         
    Is This a DB2 Test? ===> YES   Plan ===> PTESTDTA   System ===> DB1T       
                                                                               
            Press ENTER to process  or  enter END command to terminate         


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.