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


Programming considerations

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

The exits must follow standard linkage conventions. They must save the registers on entry and restore the registers when they return. The exits must be reentrant, refreshable, reusable, and not APF-authorized.

The exits can use any of the TSO/E service routines. For a description of the service routines, see .

In some cases, you may not need to write a termination exit. This depends on:
  • Whether the processing that the initialization exit performs requires a termination exit to perform clean-up activities
  • How you use the exits to customize PRINTDS processing.

If the initialization exit obtains a system resource, you must write a termination exit to free the resource. For example, the initialization exit may obtain storage to return a new command buffer to the PRINTDS command processor. In this case, you must provide a termination exit to free the storage for the new command buffer. If the initialization exit obtains storage, for example, for a new command buffer, it must obtain the storage from subpool 1.

To monitor how long it takes the PRINTDS command to execute, you need an initialization and a termination exit. Use the exits to calculate the time difference between when the initialization exit gets control and when the termination exit gets control.

The PRINTDS command has three classes of operands:
  1. Operands that have a fixed default value if the user does not specify the operand (for example, BIND and PAGELEN)
  2. Operands that PRINTDS sets dynamically based on the data set's attributes and other operands the user specifies (for example, DCF/NODCF and TRC/NOTRC)
  3. Operands that do not have a default value (for example, FLASH and CHARS).
For more information about the PRINTDS command and its operands, see .
The initialization exit can change PRINTDS operands using the command buffer. The exit checks the command buffer it receives and determines whether to change any operands. To change the operands, the exit must:
  • Obtain storage for a new command buffer
  • Build the new command buffer
  • Update the key, length, and data fields for the new command buffer (parameter entry 2)
  • Set return code 0 and return control to PRINTDS
For more information about the parameter entries, see TSO/E standard exit parameter list. For more information about the format of the command buffer, see Command buffer.

In addition to changing the command buffer, the initialization exit lets you easily change the first class of PRINTDS operands, which are operands that have a fixed default value. If the user does not explicitly specify these operands on the PRINTDS command, PRINTDS uses the fixed default value. The fixed default values do not change based on the data set's attributes or other operands the user specifies.

The initialization exit receives the fixed default values as exit-dependent data in the default exit parameter list (DEPL). To change these values, the initialization exit updates the value in the DEPL, sets a return code of 0, and returns control to the PRINTDS command processor.

If the initialization exit returns a value for an operand in the DEPL and that operand is also specified in the command buffer, PRINTDS uses the value from the command buffer rather than the value in the DEPL. For example, suppose the user issues the following PRINTDS command:
PRINTDS DATASET(MY.DATA) CLASS(3)

If the initialization exit sets the CLASS value in the DEPL to ‘Z’, PRINTDS ignores the value in the DEPL and uses the value for the CLASS operand in the command buffer, which is ‘3’.

Table 1 shows the PRINTDS operands with a fixed default value that the initialization exit receives in the DEPL. The table shows the fixed default value and the possible values for each operand. The default value is the value that PRINTDS uses if the user does not explicitly specify the operand on the PRINTDS command. PRINTDS also provides the value of the TITLE/NOTITLE operand in the DEPL even though PRINTDS will change the value if it conflicts with the data set's attributes. For more information about TITLE/NOTITLE, see Restrictions and limitations.

For more information about the format of the DEPL, see Parameter descriptions for the initialization exit.

Table 1. PRINTDS operands in the default exit parameter list (DEPL)
Operand Fixed default value Possible values
BIND 0 (binary) 0 - 255
TMARGIN 0 (binary) 0 - 4094
BMARGIN 0 (binary) 0 - 4094
PAGELEN 60 (binary) 6 - 4095
CLASS/SYSOUT (note 1) A (character) A - Z and 0 - 9
BURST/NOBURST (note 1)
  • NOBURST
  • 2 (binary)
  • 1 - BURST
  • 2 - NOBURST
COPIES (note 1) 1 (binary) 1 - 255
HOLD/NOHOLD (note 1) NOHOLD 2 (binary)
  • 1 - HOLD
  • 2 - NOHOLD
MEMBER/DIRECTORY/ALL
  • ALL
  • 3 (binary)
  • 1 - MEMBER
  • 2 - DIRECTORY
  • 3 - ALL
NUM/SNUM/NONUM
  • NONUM
  • 3 (binary)
  • 1 - NUM
  • 2 - SNUM
  • 3 - NONUM
TITLE/NOTITLE (note 2) TITLE, if possible 1 (binary)

Otherwise, NOTITLE 2 (binary)

  • 1 - TITLE
  • 2 - NOTITLE
Note:
  1. These operands apply only when users print a SYSOUT data set.
  2. For more information about TITLE/NOTITLE values, see Restrictions and limitations.

The PRINTDS command processor invokes Dynamic Allocation to allocate and de-allocate data sets during its processing. Allocation-attribute operands such as COPIES, CLASS, and HOLD/NOHOLD are passed as text units to Dynamic Allocation, which provides the allocation input validation exit routine (IEFDB401) that you can also use. For more information about IEFDB401, see .

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014