Building and Running V1.9 Samples

C++ Edition Samples
 an arrow pointing to the right File Names and Directory Paths

Building C++ Edition Samples:
an arrow pointing to the right XML Parser
 an arrow showing inclusion pointing to the right z/OS UNIX System Services
 an arrow showing inclusion pointing to the right Native MVS
 an arrow pointing to the right XSLT Processor
 an arrow showing inclusion pointing to the right z/OS UNIX System Services
 an arrow showing inclusion pointing to the right Native MVS
 

Running C++ Edition Samples :
an arrow pointing to the right XML Parser
 an arrow showing inclusion pointing to the right z/OS UNIX System Services
 an arrow showing inclusion pointing to the right Native MVS
 an arrow pointing to the right XSLT Processor
 an arrow showing inclusion pointing to the right z/OS UNIX System Services
 an arrow showing inclusion pointing to the right Native MVS
 

 
 C++ Edition File Names and Directory Paths
Component Release File Name Directory Path
Parser for z/OS V1.9 ixmc560b.pax (or latest PTF version) /usr/lpp/ixm/IBM/xml4c-5_6
[full path to C++ parser]
XSLT Processor for z/OS V1.9 ixmcx20b.pax (or latest PTF version) /usr/lpp/ixm/IBM/xslt4c-1_10
[full path to C++ XSLT processor]

  

Building C++ Edition Samples

 

XML Parser, C++ Edition samples

Before building the samples for either the UNIX System Services or Native MVS versions you need to obtain access to a copy of the samples directory that you have write access to. Unless you are a superuser you normally will not have write access to the samples subdirectory that was shipped with the product. In this case you will need to do the following:

  1. Create a new directory that you have write access to, for example:
    cd $HOME
    mkdir mysamples
    
  2. Set a new environment variable that contains the full path to this new directory:
    export XERCESCOUT=$HOME/mysamples
    
  3. Copy the samples directory to your directory:
    cp -r [full path to C++ parser]/samples $XERCESCOUT
    
Since the XERCESCOUT environment variable is set that copy of the samples subdirectory will be used. The binary files will be stored in a "bin" subdirectory.

If XERCESCOUT is not set then the copy of the samples in the HFS that the product resides in will be used and the binary files will be stored there.

z/OS UNIX System Services :

  1. Set the XML4C root path :

    export XERCESCROOT=[full path to C++ parser]
     

  2. Set the environment variables :

    unset _CXX_CXXSUFFIX
    export CXX=c++
    export CXXFLAGS="-O2" (only if you are using the XLC compiler utility)
    --otherwise--
    export CXXFLAGS='-2'

    (next statement only required for building XPLINK samples)
    export OS390_XPLINK=1
     

  3. Create Makefiles :

    cd $XERCESCOUT/samples (if you are building the samples
    in your own directory and set XERCESCOUT in an earlier
    step)
    -- or --
    cd $XERCESCROOT/samples (if building in the product HFS)
    configure
     

  4. Build the samples :

    export _CXX_CXXSUFFIX=cpp
    export _CXX_CCMODE=1
    gmake

     

    Note:If you are using the XLC compiler utility, you must add the following statement
    to your XLC config file:

    exportlist_cpp=
    
    where is the high level qualifier for SCEELIB and SCLBSID.



If you want to build the zsamples, return to Step 3, and instead of copying the samples directory, copy the zsamples directory to your directory. Then repeat the subsequent steps using zsamples in place of samples, for the directory you are building from.

To run the samples, follow these instructions.

 

Native MVS :

  1. Allocate a data set to hold the sample modules, as in the following example :

    [userid].SAMPLES.[release level].LOAD, 500 tracks on 3390, Record format: U,
    Record Length: 0, Block size: 32760, ORG: PDSE,
    Directory blocks: 0
     

  2. Issue the following z/OS UNIX UNIX commands :

    export XERCESCROOT=[full path to C++ parser]
    export LOADMOD='[userid].SAMPLES.[release level].LOAD'
    export LOADEXP='[hlq].SIXMEXP'
    export OS390BATCH=1
    unset _CXX_CXXSUFFIX
    export CXX=c++
    export CXXFLAGS="-O2" (only if you are using the XLC compiler utility)
    --otherwise--
    export CXXFLAGS='-2'

    (next statement only required for building XPLINK samples)
    export OS390_XPLINK=1
     

  3. Create Makefiles :

    cd $XERCESCOUT/samples (if you are building the samples
    in your own directory and set XERCESCOUT in an earlier
    step)
    -- or --
    cd $XERCESCROOT/samples (if building in the product HFS)
    configure
     

  4. Build the samples :

    export _CXX_CXXSUFFIX=cpp
    export _CXX_XSUFFIX_HOST=SIXMEXP
    export _CXX_CCMODE=1
    gmake

     

    Note: If you are using the XLC compiler utility, you need to add the following
    statements to your XLC config file:

    xsuffix_host=SIXMEXP
    cxxsuffix=cpp
    

To run the samples, follow these instructions.

 

XSLT Processor, C++ Edition samples :

In order to build a non-XPLINK version of the XSLT Processor samples or other applications you need access to the non-XPLINK Standard C++ Library. This replaces the STLPort support used in earlier releases. In order to use this support you must have the PTF for APAR PQ75251 installed.

To use the non-XPLINK Standard C++ Library DLL, you must first link your object modules with the non-XPLINK system definition side-deck. Use the {_PSYSIX} environment variable to pass the non-XPLINK side-deck information to c++/cxx. The {_PSYSIX} environment variable specifies the system definition side-deck list to be used to resolve symbols during the non-XPLINK link-editing phase.

If you do not have write access to the samples directory then you will need to be sure to set the XALANCOUT environment variable to the full path to a directory that you do have write access to where the executables generated can be stored.

 

z/OS UNIX System Services :

  1. Set the XALANC root path :

    export XALANCROOT=[full path to C++ XSLT processor]
    export XERCESCROOT=[full path to C++ parser]

  2. Create a new directory that you have write access to, for example:

    cd $HOME
    mkdir mysamples

  3. Set a new environment variable that contains the full path to this new directory, as follows:

    export XALANCOUT=$HOME/mysamples

  4. Copy the samples directory to your directory:

    cp -r ["full path to C++ XSLT processor" or $XALANCROOT]/samples $XALANCOUT/samples

  5. Since the XALANCOUT environment variable is set, that copy of the samples subdirectory will be used. The binary files will be stored ina "bin" subdirectory.

    After you have copied the samples directory, you need to set up environment variables. This is done through the following sequence:

    export CXX=c++
    export CXXFLAGS="-O2" (only if you are using the XLC compiler utility)
    --otherwise--
    export CXXFLAGS="-2"

    (next statement only required for building XPLINK samples)
    export OS390_XPLINK=1
     

  6. Set non-XPLINK Standard C++ Library sidedeck information :

    Note: The below export statement is not required if using XPLINK; the contents of the _CXX_PSYSIX variable are loaded by default when using XPLINK. Also, if _CXX_PSYSIX was previously set and you are now building an XPLINK version, unset the variable.

    For z/OS 1.9 or higher releases:

    export _CXX_PSYSIX=\
    "{_PLIB_PREFIX}.SCEELIB(C128N)":\
    "{_CLIB_PREFIX}.SCLBSID(IOSTREAM,COMPLEX)"

    For z/OS 1.8 and earlier releases:

    export _CXX_PSYSIX=\
    "{_PLIB_PREFIX}.SCEELIB(C128N)":\
    "{_CLIB_PREFIX}.SCLBSID(IOC,IOSTREAM,COMPLEX,COLL)"

    where {_PLIB_PREFIX} and {_CLIB_PREFIX} are set to a default (for example, CEE and CBC, respectively) during custom installation, or using user overrides.

  7. Set the environment variables :

    export _CXX_CXXSUFFIX=cpp
    export _CXX_CCMODE=1
    cd $XALANCOUT/samples
    gmake
     

    Note:If you are using the XLC compiler utility, you must add the following statement
    to your XLC config file:

    exportlist_cpp=
    
    where is the high level qualifier for SCEELIB and SCLBSID.



To run the samples, follow these instructions.

 

Native MVS :

  1. Check if a dataset has already been allocated to hold the sample modules when the XML Parser was installed. The dataset should have a name like in the following example:
    [userid].SAMPLES.[release level].LOAD
    
    It should have been allocated with the following attributes:
    500 tracks on 3390, Record format: U,
    Record Length: 0, Block size: 32760, ORG: PDSE,
    Directory blocks: 0
    
    If this has not been allocated yet go ahead and go to ISPF option 3.2 and allocate it now.
  2. Set the XALANC root path :

    export XALANCROOT=[full path to C++ XSLT processor]
    export XERCESCROOT=[full path to C++ parser]

  3. Set non-XPLINK Standard C++ Library sidedeck information:


    Note: The below export statement is not required if using XPLINK; the contents of the _CXX_PSYSIX variable are loaded by default when using XPLINK. Also, if _CXX_PSYSIX was previously set and you are now building an XPLINK version, unset the variable.

    For z/OS 1.9 or higher releases:

    export _CXX_PSYSIX=\
    "{_PLIB_PREFIX}.SCEELIB(C128N)":\
    "{_CLIB_PREFIX}.SCLBSID(IOSTREAM,COMPLEX)"

    For z/OS 1.8 and earlier releases:

    export _CXX_PSYSIX=\
    "{_PLIB_PREFIX}.SCEELIB(C128N)":\
    "{_CLIB_PREFIX}.SCLBSID(IOC,IOSTREAM,COMPLEX,COLL)"

    where {_PLIB_PREFIX} and {_CLIB_PREFIX} are set to a default (for example, CEE and CBC, respectively) during custom installation, or using user overrides.

  4. Set the environment variables :

    export LOADMOD=[userid].SAMPLES.[release level].LOAD
    export LOADEXP=[hlq].SIXMEXP
    export XALANCOUT=[the directory where you want to store your built sample executables]
    export OS390BATCH=1
    export CXX=c++
    export CXXFLAGS="-O2" (only if you are using the XLC compiler utility)
    --otherwise--
    export CXXFLAGS=-2

    (next statement only required for building XPLINK samples)
    export OS390_XPLINK=1

    export _CXX_CXXSUFFIX=cpp
    export _CXX_XSUFFIX_HOST=SIXMEXP
    export _CXX_CCMODE=1
     

  5. Build the samples :

    cd $XALANCROOT/samples
    gmake

     

    Note: If you are using the XLC compiler utility, you need to add the following
    statements to your XLC config file:

    cxxsuffix_host=SIXMEXP
    cxxsuffix=cpp
    

Follow the instructions below to run the samples.

  

Running C++ Edition Samples

 

XML Parser, C++ Edition samples

z/OS UNIX System Services :

  1. Ensure that the required library files are found in the $XERCESCROOT /lib directory. See the FAQ for required library files.
  2. Set the library path :

    (if not already set when building samples) :
    
    export XERCESCROOT=[full path to C++ parser]
    
    (required) :
    
    export LIBPATH=$XERCESCROOT/lib:$LIBPATH
    export PATH=$XERCESCROOT/bin:$PATH   (if you did not build samples)
    --or--
    export PATH=$XERCESCOUT/bin:$PATH    (if you built the samples) 
    
    (required only if running zsamples built non-XPLINK):
    
    export _CEE_RUNOPTS
    

Contact IBM

Browse z/OS