Binding under TSO using CXXBIND

This topic describes how to bind your z/OS® XL C++ or z/OS XL C program in TSO by invoking the CXXBIND REXX EXEC. This REXX EXEC invokes the binder and creates an executable program object.

Note: This REXX EXEC does not support 64-bit binding. You must use the PROCs or c89, cc, c++, or cxx commands under z/OS UNIX System Services to perform 64-bit binding.

If you specify a data set name in an option, and the high-level qualifier of the data set is not the same as your user prefix, you must use the fully qualified name of the data set and place single quotation marks around the entire name.

If you specify a z/OS UNIX file name in an option, it must be an absolute file name; it must begin with a slash (/). You can include commas and special characters in file names, but you must enclose file names that contain special characters or commas in single quotation marks. If a single quotation mark is part of the file name, you must specify the quotation mark twice.

The syntax for the CXXBIND EXEC is:
Read syntax diagramSkip visual syntax diagram
                    .-,------------------.      
                    V                    |      
>>-CXXBIND--OBJ--(----+-input-object---+-+--)------------------->
                      '-'input-object'-'        

>--+-----------------------------------+------------------------>
   |         .-,------------------.    |   
   |         V                    |    |   
   '-OPT--(------binder_option;---+--)-'   

>--+------------------------------------------+----------------->
   |         .-,-------------------------.    |   
   |         V                           |    |   
   '-LIB--(----+-search-library-name---+-+--)-'   
               '-'search-library-name'-'          

>--+-----------------------------------------+------------------>
   '-LOAD--(--+-output_program_object---+--)-'   
              '-'output_program_object'-'        

>--+--------------------------------------------+--------------->
   '-IMP--(--+-file_of_generated_imports---+--)-'   
             '-'file_of_generated_imports'-'        

>--+----------------------------------+--+--------+------------><
   '-LIST--(--+-output_listing---+--)-'  '-XPLINK-'   
              '-'output_listing'-'                    

OBJ
You must always specify the input file names by using the OBJ keyword parameter. Each input file must be one of the following:
  • An object module that can be a PDS member, a sequential data set, or a z/OS UNIX file
  • A load module that is a PDS member
  • A program object that can be a PDSE member or a z/OS UNIX file
  • A text file that contains binder statements. The file can be a PDS member, a sequential data set, or a z/OS UNIX file
OPT
Use the OPT keyword parameter to specify binder options. For example, if you want the binder to use the MAP option, specify the following:
  CXXBIND OBJ(PLAN9.OBJ(PROG3)) OPT('MAP')...
LIB
Use the LIB keyword parameter to specify the PDS and PDSE libraries that the binder should search to resolve unresolved external references during a library search of the DD SYSLIB.

The default libraries that are used when the XPLINK option is not specified are the CEE.SCEELKED, CEE.SCEELKEX, and CEE.SCEECPP C/C++ libraries and the CBC.SCLBSID C++ class library. The default libraries that are used when the XPLINK option is specified are the CEE.SCEEBND2 and CEE.SCEELIB C/C++ libraries and the CBC.SCLBSID C++ class library . The default library names are added to the ddname SYSLIB concatenation if library names are specified with the LIB keyword parameter.

LOAD
Use the LOAD keyword parameter to specify where the resultant executable program object (which must be a PDSE member, or a z/OS UNIX file) should be stored.
IMP
Use the IMP keyword parameter to specify where the generated IMPORT control statements should be written.
LIST
Use the LIST keyword parameter to specify where the binder listing should be written. If you specify *, the binder directs the listing to your console.
XPLINK
Use the XPLINK keyword parameter when you are building an XPLINK executable program object. Specifying XPLINK will change the default libraries as described under the LIB option.