Figure 158 shows how QMF and your edit exit routine work together to format data using the edit codes you define.
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 three different versions of a sample edit exit routine. One version is for assembler (DSQUXDTA), one is for PL/I (DSQUXDTP), and one is for COBOL (DSQUXDTC).
The sample program supports two edit codes:
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 on the QMF production disk on CMS.
QMF supplies the user edit routine, DSQUEDIT, for CMS. DSQUEDIT is a relocatable module file and a text file on the QMF production disk. Delete or rename the QMF-supplied module and text file when you are ready to use your edit routine.
VM Note: The use of a relocatable module file facilitates user edit code development because a module file on the user's A-disk can be tested without renaming or deleting the QMF-supplied user edit routine from the QMF production disk. This reduces the impact on other QMF users. Once you have written and assembled or compiled your edit routine, you need to consider the method of making your routine available to QMF for execution. The user edit routine can be executed in text or module format. The use of a relocatable CMS module file is the preferred method of generating a user edit routine.
When QMF for VM is started, QMF attempts to load the edit routine as follows:
Different versions of the interface control block are used for Assembly, PL/I, and COBOL edit routines. However, the fields of the control block and the input they contain are the same regardless of the programming language the routine is written in. Figure 159 shows the general structure of the edit routines.