Format of the CALL statement
This topic explains the format of the required CALL statement.
The CALL statement that starts QMF for TSO as a Db2® for z/OS® stored procedure has the following format:
- object-name
- Input parameter that names a QMF procedure or query that will run after QMF starts.
The parameter value, including the name and any substitution variable
values that you pass, can be up to 32,704 bytes.
All types of QMF queries are accepted. The procedure can be either a QMF linear procedure or a procedure with logic.
The query or procedure that is named in this parameter must exist in the QMF catalog in the subsystem in which the stored procedure interface components are installed.
One result set is returned if the specified object is a query; up to 21 result sets can be returned from a procedure (including trace output returned as the last result set when trace-level is L2 and L2-destination is blank or null). QMF returns one result set to the calling program each time the following command is encountered in the procedure:PRINT REPORT (PRINTER=' '
Set the DSQEC_CC global variable to 0 to eliminate carriage control characters from any returned result sets.
The PRINTER option can be set on the command itself or you can issue the following command in the procedure to set the PRINTER option of the QMF profile:SET PROFILE (PRINTER=' '
Because QMF cannot display panels when it has been started as a stored procedure, no prompting for variable values is available. If the object is a query, values for all variables in the query must be passed on the CALL statement. If the object is a procedure, the procedure can contain SET GLOBAL commands to set the necessary values before they are required. Values can also be passed on the CALL statement.
This parameter is ignored when trace-level is set to PTF.
- trace-level
- Input parameter that specifies the level of trace detail. Valid
values include:
- blank
- No QMF trace output is generated.
- null
- No QMF trace output is generated.
- NONE
- No QMF trace output is generated.
- L2
- This option traces QMF messages and commands at the highest level of detail. Where the trace output is sent depends on how L2-destination is set.
- ALL
- This option traces QMF activity at the highest level of detail, including program initialization errors and other errors that might occur before the user's profile is established. Trace output is sent to the DSQDEBUG DD card that you defined when installing the QMF stored procedure interface.
- PTF
- This option is used to verify that the stored procedure interface is running correctly. Do not use this option unless instructed to do so in this information or by IBM® Software Support.
You can include a SET PROFILE (TRACE command in the initial procedure that is specified by the object-name parameter to change the level of trace detail for the duration of the stored procedure session as long as trace output is set to go to the DSQDEBUG data set. If trace-level is set to L2, L2-destination must be set to DSQDEBUG for SET PROFILE (TRACE commands to be accepted.
- L2-destination
- Input parameter that specifies the destination for the trace log
when trace-level is set to L2. Valid values
include:
- DSQDEBUG
- Sends the trace output to the DSQDEBUG DD card that you defined when installing the QMF stored procedure interface. Use this option if the procedure passed in the object-name parameter is likely to contain SET PROFILE commands that include the TRACE option.
- blank
- Returns the trace output as the last result set from the stored procedure run.
- null
- Returns the trace output as the last result set from the stored procedure run.
The DSQSDBLG parameter, which appears in the DSQSCMDn exec, takes its value from this input parameter. This parameter cannot be externally set outside the context of the stored procedure interface.
- language
- Input parameter that specifies the language in which QMF will
run.
Specify a 1-character national language identifier. A blank or null value for this input parameter invokes QMF in English.
- status-message
- Output parameter that contains the last message that was issued from the execution of the procedure or query that is passed in the object-name parameter. How the output parameter is defined depends on the software program that issues the CALL statement. For example, in QMF for Workstation, the output parameter containing the status message is defined as a question mark (?) character.