The header data of the default environment is the module entry
point. The module also includes three tables and, conditionally, three
exit routines. For more information about the Session Manager exit routines,
see Writing Session Manager exits.
The module attribute type must be refreshable and reentrant.
The default environment module contains four basic areas:
- Header area
- Stream definitions table
- Function definitions table
- Session Manager commands
table
The tables contain addresses of data that can be placed anywhere
in the default environment module except in the header area or in
the tables, themselves.
Figure 1 shows one possible configuration
for a default environment module that places the data pointed to by
the tables at the end of the module.
Figure 1. Default
environment module structureHeader area (116 bytes)
(Specified as EP for the module)
COMMAND TABLE:
Number of command strings (4 bytes)
Total number of bytes for
all command strings (4 bytes)
Command string entry (8 bytes)
Command string entry (8 bytes)
.
.
.
STREAM TABLE:
Number of stream entries (4 bytes)
Stream entry (32 bytes)
Stream entry (32 bytes)
.
.
.
FUNCTION TABLE:
Number of functions (4 bytes)
Function entry (32 bytes)
Function entry (32 bytes)
.
.
.
Stream header
Stream name
Stream name
Command string
Command string
Function name
Function name
- The 116-byte header area must be pointed to by the entry
point name for the environment because it contains required data and
addresses at fixed offsets into the module.
The first 8 bytes must
be the characters ‘ADFMDFLT’ to ensure that the default CSECT is the
entry point in the load module. If any other CSECT is the entry point,
the user receives an error message and enters TSO/E without the Session Manager.
The
second 8 bytes can be a time stamp or zeros.
The next 76 bytes
are not used. (In the IBM-supplied ADFMDFLT, this area is used for
the copyright statement.)
The addresses of the installation
management exit routines you can link-edit into this module start
at 92 bytes, (offset X'5C'). If no exits are present, these
twelve bytes must be zero.
The addresses of the three tables
in the default CSECT start at 104 bytes, (offset X'68').
Figure 2 shows the storage declarations for the
116-byte header area, followed by a pictorial representation.
Figure 2. Default environment
headerOFFSET LABEL
ADFMDFLT CSECT
0 DC CL8'ADFMDFLT'
8 DC CL8'&SYSDATE'
10 DS CL76
5C DC V(inst-exit-1)
60 DC V(inst-exit-2)
64 DC V(inst-exit-3)
68 DC AL4(ADFIDCMD)
6C DC AL4(ADFIDSTR)
70 DC AL4(ADFIDFUN)
- The stream definitions table begins with a fullword containing
the number of streams. The remainder of the table contains contiguous
32-byte entries, one entry for each stream. Each entry contains the
following information:
You must provide entries in this table for TSOIN, TSOOUT,
SMIN, and SMOUT, because some Session Manager commands
have operands that default to these particular stream names. Furthermore,
if you intend to use the IBM-supplied defaults for the screen layout
and PF key definitions, you must also have table entries for EXTRA1,
EXTRA3, and HEADER. Optionally, you can add other stream definitions.
See Stream definition descriptions for considerations in defining the number
of bytes, number of lines, and number of lines per IDB.
You
can place the actual stream names and stream header to which this
table points anywhere in the default environment module, provided
they are not within the header or any of the three tables.
- The function definitions table begins with a fullword containing
the number of functions. The remainder of the table contains contiguous
28-byte entries, one entry for each function. Each entry contains
the following information:
Session Manager supports
three functions and the entries must be in the order: TSO, SM, MSG.
You must provide entries in this table for each. Optionally, you
can add other function definitions, but Session Manager supports
them only with the CHANGE.FUNCTION and QUERY.FUNCTION commands.
You
can place the actual function names and stream names to which this
table points anywhere in the default environment module, provided
they are not within the header or any of the three tables.
- The Session Manager commands
table has the commands stacked in the SM input stream. These
commands initialize the screen layout and PF key definitions. The
table begins with a fullword containing the number of command strings,
followed by a fullword containing the total number of bytes taken
up by all of the command strings. (This number does not include the
first two fullwords of the table). The remainder of the table contains
contiguous eight-byte entries, one entry for each command string.
Each entry contains the length of the command string (four bytes),
followed by the four-byte command string address.
Figure 3 shows the storage declarations for the Session Manager commands
table, followed by a pictorial representation.
Figure 3. Session Manager Commands
TableLABEL
ADFIDCMD DC F'#entries'
DC F'#bytes'
command1 DC F'#bytes'
entry #1 DC AL4(command-string-addr)
command2 DC F'#bytes'
entry #2 DC AL4(command-string-addr)
Session Manager picks
up each of these command strings and stacks them in the SM function's
input stream during initialization. After Session Manager is initialized,
these commands are executed.
You can put an entry in this table
for any Session Manager command
that defines the screen layout, PF keys, the definitions of streams,
functions, terminal characteristics, and so on.
Note: You must
place entries in the Session Manager commands
table, otherwise there will be no screen layout in which users can
enter commands or see output. The only available alternative for users
would be using the CLEAR key, which allows them to enter Session Manager commands
separated by commas or blanks.
You can place the actual command
strings to which this table points anywhere in the default environment
module, provided they are not within the header or any of the three
tables.