Under TSO
Steps for compiling, running, and binding the C++ template example program using TSO commands
Before you begin: Ensure that the Language Environment® runtime libraries SCEERUN and SCEERUN2, the z/OS® Class Library DLLs, and the z/OS XL C++ compiler are in STEPLIB, LPALST, or the LNKLST concatenation.
Perform the following steps to compile, bind, and run the C++ template example program using TSO commands:
- Compile the source files:
- cxx /usr/lpp/cbclib/sample/clb3atmp.cpp (lsearch(/usr/lpp/cbclib/sample)
search('cee.sceeh.+','cbc.sclbh.+') obj(sample.obj(clb3atmp)) tempinc(//tempinc)
This step compiles CLB3ATMP with the default compiler options, and stores the object module in userhlq.SAMPLE.OBJ(CLB3ATMP), where userhlq is your user prefix. The template instantiation files are written to the PDS userhlq.TEMPINC.
- cxx TEMPINC (lsearch(/usr/lpp/cbclib/sample) search('cee.sceeh.+','cbc.sclbh.+')
This step compiles the PDS TEMPINC and creates the corresponding objects in the PDS userhlq.TEMPINC.OBJ.
_______________________________________________________________
- cxx /usr/lpp/cbclib/sample/clb3atmp.cpp (lsearch(/usr/lpp/cbclib/sample)
search('cee.sceeh.+','cbc.sclbh.+') obj(sample.obj(clb3atmp)) tempinc(//tempinc)
- Create a library from the PDS userhlq.TEMPINC.OBJ:
For more information see Creating an object library under TSOC370LIB DIR LIB(TEMPINC.OBJ)
_______________________________________________________________
- Bind the program:
CXXBIND OBJ(SAMPLE.OBJ(CLB3ATMP)) LIB(TEMPINC.OBJ) LOAD(SAMPLE.LOAD(CLB3ATMP))
This step binds the userhlq.SAMPLE.OBJ(CLB3ATMP) text deck using the userhlq.TEMPINC.OBJ library and the default bind options. It also creates the executable module userhlq.SAMPLE.LOAD(CLB3ATMP).
Note: To avoid a binder error, the data set userhlq.SAMPLE.LOAD must be a PDSE.For more information see Binding under TSO using CXXBIND._______________________________________________________________
- Run the program:
CALL SAMPLE.LOAD(CLB3ATMP)
This step executes the module userhlq.SAMPLE.LOAD(CLB3ATMP) using the default runtime options.
For more information see Running an application under TSO._______________________________________________________________