IBM Support

Specifying TCP/IP server parameters in JCL

Troubleshooting


Problem

How to specify parameters and options in the started procedure JCL for various TCP/IP servers. Additionally, how to specify several environment variable values within the 100 character PARM field limitation in JCL. Problems associated with syntax restrictions and unexpected environment variable values are addressed.

Cause

Several of the servers supplied as a part of CS/390 are generated as C/C++ programs and use Language Environment and UNIX facilities. Examples include:
  • File Transfer Server (FTPD and TFTPD) and Client (FTP)
  • Dynamic Routing (OMPROUTE)
  • Express Logon Certificate Server (DCAS)
  • CSSMTP
  • Policy Agent (PAGENT)
  • Resource Reservation (RSVP)
  • SNMP Agent (OSNMPD)
  • SNMP Query Engine (SNMPQE)
  • Policy SNMP Subagent (SLAPM2 and PAGTSNMP)
  • SNMP Trap Forwarder (TRAPFWD)
  • Portmapper (OPORTRPC)
  • Time Server (TIMED and SNTPD)
  • Traffic Regulation Manager Daemon (TRMD)

The result is that when these servers are started with a JCL procedure, the PARM field has several options that can be specified beyond those options, which are unique to that server.

Resolving The Problem

The PARM specification on the EXEC statement for these programs (and any application that uses Language Environment) is specified in the following format:

PARM='LanguageEnvironmentOptions/ServerOptions'
The ServerOptions are documented in the section describing that server in the IP Configuration Reference and IP Configuration Guide.

Note: The TCPIP address space itself does not use this format. See the IP Configuration Reference for the PARM string format. The TN3270 server does not support passing Language Environment options in the PARM string.

The LanguageEnvironmentOptions portion is documented in the Language Environment Programming Reference. Some of these options have a direct impact on the operation of these servers, and these options are mentioned in the IP Configuration Reference and IP Configuration Guide (for example, POSIX(ON),ALL31(ON)) and IP Diagnosis Guide (TRAP(ON,NOSPIE),TERMTHDACT(UAIMM)).

Another consideration, since most of these applications are POSIX enabled that run as UNIX processes, is the specification of Environment Variables. Some of these servers have variables unique to their process, which are documented in the IP Configuration Reference and IP Configuration Guide. But many other variables are available that might be useful for a system. These other variables are documented in the UNIX System Services Planning, the UNIX System Services Command Reference, and the C/C++ Programming Guide manuals. Some frequently used variables are _BPX_JOBNAME, _BPXK_SETIBMOPT_TRANSPORT, and TZ.

Environment Variable values are specified by way of the ENVAR Language Environment option. You can specify all of the variables to be set as a comma-separated list within the ENVAR specification, in the form ENVAR("variable=value","variable=value"). However, it can be easier (especially if there are several variables to be set) to use one of the following forms of specification:

 

NOTE: Ensure that the data set does not contain sequence numbers.

  • ENVAR("_CEE_ENVFILE=/zfs/file.name") Place the specified file in the same directory as other related configuration files for the server for ease of reference.
  • ENVAR("_CEE_ENVFILE=DD:SYSENV")
    The DDNAME specified can be any unique name, and can point to any appropriate data set. It is recommended that any MVS data set referenced by the DD needs to be RECFM=VB. It also cannot have any line sequence numbering.

    You can use a RECFM=FB data set but it requires terminating the end of each specified value with a null (zero) byte. If you fail to take this action, it causes the remainder of the line to be included as part of the value, which can lead to unexpected errors.
  • ENVAR("_CEE_ENVFILE_S=DD:SYSENV") For z/OS 1.8 and later releases, this format can be used. The advantage is that the trailing blanks on each line are removed before the value is assigned to the variable. This option allows use of RECFM=FB data sets without having to add the null byte to the line, as would be needed for _CEE_ENVFILE. This specification is not an option if the trailing blanks are required for one of the variables being set. Note that the SYSENV DD referenced by this option can also be specified inline in a proc (z/OS 1.10 or higher).
In either case, each line of the file or data set specifies a single Environment Variable in the form:

VariableName=Value
Case is significant for both the name and for most values. For z/OS 1.12 and higher releases, you might also want to specify the _CEE_ENVFILE_COMMENT and _CEE_ENVFILE_CONTINUATION variables to allow more flexible coding in this file.

The last consideration for specifying the PARM value for these procedures is the JCL syntax rules involved.

  • Most of these specifications contain blanks and other special characters. Thus, the PARM specification must be a quoted string.
  • The combination of all of these specifications might be long enough to require usage of JCL continuation. The JCL Syntax rules for continuations need to be carefully applied to ensure the wanted string is properly passed to the server program.
  • Many of these servers do not accept commas within the ServerOptions portion of the specification. Thus, any continuation specification used must be in a form that does not insert commas in the resultant string.
  • If a single quotation mark is to be passed to the program, code two consecutive quotation marks within the string (not to be confused with the double quotation mark character).
  • Note:  JCL limits the length of the PARM field to 100 characters.
Beginning with z/OS 1.7, Language Environment options can be specified in a data set referenced by the CEEOPTS DD in the JCL. This data set must be RECFM=FB, or inline input (DD *). The Language Environment runtime uses only the first 3000 non-comment bytes from this input (37 lines for LRECL=80).
Restriction: Language Environment options specified in the CEEOPTS DD (except for the ENVAR value) are not passed on to spawned processes that switch user IDs, such as those created by FTPD or INETD. For these servers, use the _CEE_RUNOPTS environment variable to specify the options to be passed.
Restriction:  Use of an inline input (DD *) in a proc cannot be used for systems running z/OS 1.9 or before.

Use the system wide defaults for Language Environment options that are to be applicable to all processes on the system.   For z/OS 1.7 and higher, these options can be specified in the CEEPRMxx PARMLIB member.
Hint: Specify the TZ environment variable here.

The following examples show the coding of the Language Environment options in addition to options for the OSNMPD server:

   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
   //OSNMPD EXEC  PGM=EZASNMPD,REGION=0K,TIME=NOLIMIT,
   //  PARM=('POSIX(ON),ALL31(ON),TRAP(ON,NOSPIE),TERMTHDACT(UAIMM)',
   //  '/-i 10 -d 15 -s /var/TCPIP.SNMP')

   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
   //OSNMPD EXEC  PGM=EZASNMPD,REGION=0K,TIME=NOLIMIT,
   //             PARM=('POSIX(ON),ALL31(ON),TRAP(ON,NOSPIE)',
   //             'TERMTHDACT(UAIMM)/-i 10 -d 15 -s /var/TCPIP.SNMP')

   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
   //OSNMPD EXEC  PGM=EZASNMPD,REGION=0K,TIME=NOLIMIT,
   //  PARM='POSIX(ON),ALL31(ON),TRAP(ON,NOSPIE),TERMTHDACT(UAIMM)/-i 10 -*
   //             d 15 -s /var/TCPIP.SNMP'

[{"Type":"MASTER","Line of Business":{"code":"LOB35","label":"Mainframe SW"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSSN3L","label":"z\/OS Communications Server"},"ARM Category":[{"code":"a8m0z0000000Ad4AAE","label":"z\/OS Comm Server->TCPIP->Build \/ Installation->INST - Installation"}],"ARM Case Number":"","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"1.10.0;1.11.0;1.12.0;1.13.0;1.6.0;1.7.0;1.8.0;1.9.0;2.1.0;2.2.0;2.3.0;2.4.0"}]

Product Synonym

CS/390 CS390

Document Information

Modified date:
05 July 2021

UID

swg21177026