Calling your exit routine on OS/390

Figure 157 shows how QMF and your edit exit routine work together to format data using the edit codes you define.

Figure 157. How a user edit routine works with QMF for OS/390
DB2 Data connects to QMF Form which connects to QMF Interface  Control Block
which connect to User-written Edit Exit Routine which connects to another
QMF  Interface Control Block which connects to QMF Report.

When you enter your own code in a column of FORM.MAIN or FORM.COLUMNS, QMF passes certain characteristics of the data into the first interface control block. These characteristics reside in specific fields of the control block, which are discussed in Fields of the Interface control block. QMF also passes into the input area the data to be formatted and an output area that holds the formatted result.

IBM supplies six different versions of a sample edit exit routine in QMF720.SDSQSAPE.

Language TSO and native OS/390 Batch CICS
COBOL DSQUXDTC DSQUXCTC
PL/I DSQUXDTP DSQUXCTP
Assembler DSQUXDTA DSQUXCTA

The sample program supports two edit codes:

VSS
Adds dashes to a social security number or a character string.
UDN
Transforms a department number into its department name, using a table internal to the program.

The sample program is commented so you can more easily see how a user edit routine works. You can use the sample as a template for creating your own program. These routines can be found in QMF720.SDSQSAPE on OS/390.

QMF supplies the user edit routine DSQUEDIT for TSO and native OS/390, and a reentrant module, DSQUECIC, for CICS, which are located in the QMF library QMF720.SDSQLOAD. Delete or rename the QMF-supplied module when you are ready to use your edit routine.

See Figure 159for the general structure of an edit routine.

[ Previous Page | Next Page | Contents | Index ]