Under z/OS batch

Steps for compiling, binding, and running the C++ template example program under z/OS batch

Before you begin: Ensure that the Language Environment® runtime libraries SCEERUN and SCEERUN2, and the z/OS® XL C++ compiler are in STEPLIB, LPALST, or the LNKLST concatenation.

Perform the following step to compile, bind, and run the C++ template example program under z/OS batch:

CCNUNCL

Figure 1. JCL to compile, bind and run the template example
//Jobcard info
//PROC JCLLIB ORDER=(CBC.SCCNPRC,
//   CEE.SCEEPROC)
//*                                                                           
//* Compile MAIN program,creating an object deck                                      
//*                                                                                  
//MAINCC EXEC CBCC,                                                                  
//       OUTFILE='<userhlq>.SAMPLE.OBJ(CLB3ATMP),DISP=SHR ',                          
//       CPARM='XPLINK,OPTF(DD:COPTS)'                                               
//SYSIN DD PATH='/usr/lpp/cbclib/sample/CLB3ATMP.CPP'
//COPTS DD *                                                                         
 SEARCH('CEE.SCEEH.+', 'CBC.SCLBH.+')                                              
/*
//*                                                                                  
//* Bind the program                                                                  
//*                                                                                  
//BIND EXEC CBCXB,                                                                   
//     INFILE='<userhlq>.SAMPLE.OBJ(CLB3ATMP)',
//     OUTFILE='<userhlq>.SAMPLE.LOAD(CLB3ATMP),DISP=SHR'                             
//*                                                                                  
//* Run the program                                                                   
//*                                                                                  
//GO   EXEC CBCXG,                                                                   
//     INFILE='<userhlq>.SAMPLE.LOAD',    
//     GOPGM=CLB3ATMP                                                                
//GO.SYSIN DD *                                                                      
 1 2 5 3 7 8 3 2 10 11                                                               
/*