The Change (CHNG) call
In most application programs, you can provide the print data set descriptors using the change (CHNG) call interface. The IMS Spool API uses this existing technology.
The CHNG call supports two optional parameters for IMS Spool API:
- The options list parameter points to a character string containing a list of options. The IAFP keyword identifies the CHNG call as a request for IMS Spool API services.
- The feedback area parameter points to an area through which IMS can return error information to the application program when mistakes are found in the options list.
If your application creates multiple data sets with the same print options, or is wait-for-input (WFI), use the SETO call to reduce the parsing impact.
The CHNG call provides the data set characteristics in one of the following ways:
- The call can provide the data set options directly
by using the PRTO option.
When the PRTO option is used with the CHNG call, IMS activates z/OS® services (SJF) to verify the print options and calls z/OS services for dynamic output to create the output descriptors that are used when the print data set is allocated. This is the simplest way for the application program to provide print data set characteristics. Using the PRTO option involves the most overhead, because parsing must occur for each CHNG call with the PRTO option.
Use the PRTO option when you cannot significantly improve application performance by using pre-built text units across multiple CHNG calls.
- The call can reference a set of pre-built text units
for dynamic descriptors using the TXTU option.
Application programs that can reuse text units can achieve better performance by using the TXTU option. If the application program can manage the text units necessary for dynamic output, use the TXTU option to avoid parsing for many of the print data sets.
The application program builds the text unit in the necessary format within the application area and passes these text units to IMS.
The application program can provide the print options to IMS with a SETO call and provide a work area for the construction of the text units. Using the TXTU option, IMS can perform parsing and text unit construction so that the work area passed contains the text units necessary for dynamic output after a successful SETO call. Do not relocate this work area because it contains address-sensitive information.
- The call can refer to an OUTPUT JCL statement in the dependent
region's JCL by using the OUTN option.
This is a simple way of providing print data set information if it can be used by the application program. The output JCL statements are referenced by the OUTN option in the options list on the CHNG call. When the OUTN option is used, IMS references the output JCL statement at dynamic allocation so that the IMS Spool API obtains the print data set characteristics from the output JCL statement.