Starting the network SLAPM2 subagent as a started task

Use the S NSLAPM2 command on an MVS™ console or SDSF to start the Network SLAPM2 subagent. A sample procedure is included in member EZAPAGSB in SEZAINST.
  • Specify LIBPATH using the ENVAR parameter on the PARM statement in the started procedure. For example:
    // PARM=(’POSIX(ON) ALL31(ON)’, 
    // ’ENVAR("LIBPATH=/usr/lib")/’)
  • Export the LIBPATH environment variable in a file specified with the STDENV DD statement. For example:
    //STDENV DD PATH=’/etc/nslapm2.env’,PATHOPTS=(ORDONLY) 
    In the /etc/nslapm2.env file:
    LIBPATH=/usr/lib
For more information about specifying runtime options and environment variables, see z/OS Language Environment Programming Guide. For details about setting the LIBPATH environment variable, also see z/OS UNIX System Services Command Reference.

Following is a copy of the sample procedure:

Figure 1. NSLAPM2 sample procedure
//NSLAPM2 PROC
//*
//* z/OS Communications Server IP
//* SMP/E distribution name: EZAPAGSB
//*
Start of change//* 5650-ZOS Copyright IBM Corp. 2006, 2013End of change
//* Licensed Materials - Property of IBM
//*
//NSLAPM2 EXEC PGM=NSLAPM2,REGION=0K,TIME=NOLIMIT,
Start of change//       PARM='ENVAR("_CEE_ENVFILE_S=DD:STDENV")/'
//*
//* Example of passing parameters to the program (parameters must
//* extend to column 71 and be continued in column 16):
//*    PARM='ENVAR("_CEE_ENVFILE_S=DD:STDENV")/-c public -P 1234 -p TCP
//*            IP'
//*
//* Provide environment variables to run with the desired stack.  AsEnd of change
//* an example, the data set or file specified by STDENV could
//* contain:
//*
//*   RESOLVER_CONFIG=//'SYS1.TCPPARMS(TCPDATA)'
//*   LIBPATH=/usr/lib
Start of change//*
//*   If you want to include comments in the data set or
//*   z/OS UNIX file, specify the _CEE_ENVFILE_COMMENT
//*   environment variable as the first environment variable
//*   in the data set or file.  The value specified for
//*   the _CEE_ENVFILE_COMMENT variable is the comment character.
//*   For example, if you want to use the pound sign, #, as
//*   the comment character, specify this as the first
//*   statement:
//*     _CEE_ENVFILE_COMMENT=#End of change
//*
//* For information on the above environment variable, refer to the
//* IP Configuration Guide.  Other environment variables can also be
//* specified via STDENV.
//*
//STDENV   DD DUMMY
//* Sample MVS data set containing environment variables:
//*STDENV   DD DSN=TCPIP.NSLAPM2.ENV(NSLAPM2),DISP=SHR
//* Sample HFS file containing environment variables:
//*STDENV   DD PATH='/etc/nslapm2.env',PATHOPTS=(ORDONLY)
//*
//* Output written to stdout and stderr goes to the data set or
//* file specified with SYSPRINT or SYSOUT, respectively.  But
//* normally, NSLAPM2 doesn't write output to stdout or stderr.
//* Instead, output is written to syslogd.  When the -o parameter
//* is specified, however, output is written to stdout instead of
//* syslogd.
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//*
//CEEDUMP  DD SYSOUT=*,DCB=(RECFM=FB,LRECL=132,BLKSIZE=132)
Restriction: When you use the environment variable _CEE_ENVFILE with an MVS data set, allocate the data set with the value RECFM=V. You should not use RECFM=F because RECFM=F causes the environment variable values to be padded with blanks.