z/OS TSO/E Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Formatting a default environment module

z/OS TSO/E Customization
SA32-0976-00

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 structure
Header 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
  1. 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 header
    OFFSET     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)
     
  2. 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:
    • Pointer to the stream name
    • Number of bytes in the stream
    • Maximum number of lines in the stream
    • Number of lines per IDB
    • Stream type
    • Length of stream header line
    • Pointer to the stream header line
    • Flags for stream attributes
      LABEL
      
      ADFIDSTR     DC A(# streams)
      
      stream       DC AL4(stream-name-addr)
      entry#1      DC A(# bytes)
                   DC A(# lines)
                   DC A(# lines/IDB)
                   DC A(stream-type)   0=extra
                                       1=input
                                       2=output
                   DC A(header-length)
                   DC A(header-addr)
                   DC BL4('xx0...0')     1x...=non-wrappable
                                         x1...=alarm is on

    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.

  3. 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:
    • Pointer to the function name
    • Pointer to the input stream name for this function
    • Pointer to the output stream name for this function
    • Intensity of output lines
    • Pointer to the copy stream name for this function
    • Intensity of copied lines
    • Flags for function attributes
      LABEL
      
      ADFIDFUN     DC A(# functions)
      
      function     DC AL4(function-name-addr)
      entry#1      DC AL4(input-stream-name-addr)
                   DC AL4(output-stream-name-addr)
                   DC A(output-intensity)   0=non-display
                                            1=normal
                                            2=high
                   DC AL4(copy-stream-name-addr)
                   DC AL4(copy-intensity)   0=non-display
                                            1=normal
                                            2=high
                   DC BL4('xx0...0')    1x...=alarm on output
                                        x1...=alarm on input

    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.

  4. 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 Table
    LABEL
    
    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 Commands Table

    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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014