Introduction


This simple tool is used to execute other programs with a specified set of environment variables. (Important note: Currently, seff does not clear the existing environment; it merely sets those variables which are specified.)

seff reads a specified file of environment variables. Lines with environment variables have the following syntax:

-e<whitespace>var=val<whitespace>

-e must be the first text on the line. Any other lines are ignored.

This is the same syntax for environment variables as /etc/init.options. Since other lines are ignored, /etc/init.options can be used if desired. See UNIX System Services Planning for more information on the use of /etc/init.options.

Command-line syntax
 

Usage: seff [-d] pgmname pgmname [pgm args]
       -d     display environment variables

Program output
If stderr is a terminal, all output from seff will go to the terminal. Otherwise, all output will go to the syslog.

Exit status
seff will end with one of the following exit status::

0 No error occurred.
1 A command-line syntax error was encountered.
2 A system call failed.
20 + n The invoked program exited with error code n. An error message of the following form will be displayed:
exit status: n

Installation


Download seff.

You will need to rename it to seff.

After storing it in the z/OS UNIX file system, run the following command to set the permissions:

chmod 755 seff

If you want to run it from TSO or batch without using BPXBATCH, use the cploadmod utility to copy it to a library in your STEPLIB or link list. cploadmod is available from the  Tools and Toys page.

The following command will put it in USER.LINKLIB:

cploadmod seff 'user.linklib'

Examples

Run the  telnet server, pointing to non-standard terminfo files
Depending on the level of otelnetd (the z/OS UNIX telnet server) and other factors, the inability to find terminfo files may result in dropped connections, improper terminal type negotiation, or the TERM variable set to "dumb" in the new login shell.

As part of negotiation of the telnet terminal type option, otelnetd must determine whether or not a terminal type specified by the client is supported by z/OS. It does this by checking if there is a terminfo file for the specified terminal type.

Administrators who augment the terminal definitions but don't want to intermix their own terminal definitions with those which ship with z/OS need a way to set TERMINFO to point to their definitions and make that environment variable visible to otelnetd. But inetd does not pass through environment variables other than TZ and PATH (modified), so an intermediate program like seff is needed. Here is the way to set TERMINFO for otelnetd via seff:

Add "-e TERMINFO=mydir" to /etc/init.options.

Use a line like the following in /etc/inetd.conf to start otelnetd:

623 stream tcp nowait 
bpxroot/usr/local/bin/seff 
seff /etc/init.options /usr/sbin/otelnetd otelnetd

In this example, we assume that port 623 is used for otelnetd, seff is stored in /usr/local/bin, and we want to use the environment variables defined in /etc/init.options.

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

 

Contact IBM

Browse z/OS