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:

  1. Compile the source files:
    1. 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.

    2. 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.

    See Compiling under TSO for more information.

    _______________________________________________________________

  2. Create a library from the PDS userhlq.TEMPINC.OBJ:
    C370LIB DIR LIB(TEMPINC.OBJ)
    For more information see Creating an object library under TSO

    _______________________________________________________________

  3. 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.

    _______________________________________________________________

  4. 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.

    _______________________________________________________________