Introduction


This simple tool  can be used to display some aspects of TCP/IP client configuration and also diagnose some TCP/IP configuration problems.

Warning! Not only is this made available with no promise of correctness or support, even the developer considers it beta!

Here is what it currently displays:

  • which TCPIP.DATA dataset/file will be used
  • which DATASETPREFIX will be used
  • which TCPIPJOBNAME will be used
  • which protocol dataset/file will be used
  • which services dataset/file will be used


It issues warning messages when TCPIP.DATA datasets/files are found but not used because something else was found earlier in the search sequence.

Here are the problems it currently finds:

  • no TCPIP.DATA configuration file found
  • no protocol dataset/file found (it suggests creating it from /usr/lpp/tcpip/samples/protocol)
  • no services dataset/file found (it suggests creating it from /usr/lpp/tcpip/samples/services)
  • no AF_INET stack is active
  • TCPIPJOBNAME specifies a stack which is not active
  • /etc/protocols exists (this is the UNIX name; it is never processed on OS/390)
  • environment variable RESOLVER_CONFIG specifies a file which does not exist


Hopefully clever people will submit enhancements and/or ideas so that it becomes more useful.

Command-line syntax

tcpcfg [-v][-d] {unix|nonunix}

The -v option is verbose mode, in which a great number of usually-useless debugging messages are issued.

The -d option is dump mode, in which TCPIP.DATA is displayed at the end of the report.

Either unix or nonunix must be specified. This tells tcpcfg which set of rules to use when searching for configuration files.

Installation
Download the HFS executable, which should work for OS/390 V2R5 and above: tcpcfg

You will need to rename it to tcpcfg.

After storing it in the HFS, run the following command to set the permissions:

chmod 755 tcpcfg

If you want to run it from TSO or batch, use the cploadmod utility to copy it to a library in your STEPLIB or link list. cploadmod is available from the z/OS UNIX - Tools and Toys page.

The following command will put it in USER.LINKLIB:

cploadmod tcpcfg user.linklib

Running it Currently you must specify parameter "unix" or "nonunix" to tell tcpcfg what set of rules to use in searching for the TCPIP.DATA file. tcpcfg needs this to know which resolver API will be used, which partially determines the rules for finding TCPIP.DATA.

Once you build it into an MVS PDS, you can run it from the shell, from TSO, and from JCL. There are slightly different TCPIP.DATA search rules for those environments, so you may get different output depending on your system.

You can also get different output based on "unix" versus "nonunix" as seen in the following output:

[MVS165:/u/user1/trawick]$ tcpcfg unix
VMCF Node: MVS165 System: MVS165 Env: OMVS User: USER1 Job: USER19

TCPIP.DATA configuration:
Env var RESOLVER_CONFIG specifies <my.tcpip.data>
<my.tcpip.data> will be used.
Warning! <//'SYS1.TCPPARMS(TCPDATA)'> exists but will be ignored.

DATASETPREFIX is "TCPV34"
TCPIPJOBNAME is "TCPCS"

The stack specified by TCPIPJOBNAME is active.

Protocol database configuration:
<//'TCPV34.ETC.PROTO'> will be used.

Services database configuration:
</etc/services> will be used.
Warning! <//'TCPV34.ETC.SERVICES'> exists but will be ignored.

[MVS165:/u/user1/trawick]$

Here is output when running from TSO:

READY
tcpcfg nonunix
VMCF Node: MVS165 System: MVS165 Env: TSO User: USER2 Job: (unknown)

TCPIP.DATA configuration:
<//DD:SYSTCPD> will be used.
Warning! <//'SYS1.TCPPARMS(TCPDATA)'> exists but will be ignored.

DATASETPREFIX is "CSUSERR6"
TCPIPJOBNAME is "TCPCS"

The stack specified by TCPIPJOBNAME is active.

Protocol database configuration:
Error: no protocol database was found. Consider creating
//'CSUSERR6.ETC.PROTO' from /usr/lpp/tcpip/samples/protocol.

Services database configuration:
Error: no services database was found. Consider creating
//'CSUSERR6.ETC.SERVICES'from /usr/lpp/tcpip/samples/services.

It can be run from batch with JCL like the following: < pre>//TCPCFGJOBCLASS=A,MSGCLASS=C,MSGLEVEL= (1,1),//USER=USER1,PASSWORD= TCPSUP/*JOBPARMLINES=9999,TIME= 1440 //JOBLIBDDDSN=USER.LINKLIB,DISP=SHR //* //STEP1 EXEC PGM=TCPCFG, // REGION=0M, // PARM='unix' //*

 

Feedback


Send your comments and other feedback to trawick@us.ibm.com.

 

 

Contact IBM

Browse z/OS