z/OS ISPF Software Configuration and Library Manager Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Defining a preprocessor to SCLM

z/OS ISPF Software Configuration and Library Manager Guide and Reference
SC19-3625-00

Suppose that some of your Finnoga 4 users run a preprocessor step on their Finnoga 4 source before compiling it. How do you define that two-step build process to SCLM? Using another fictitious product, the Panda Universal Preprocessor (PUPP), you can specify that some Finnoga 4 source is to be run through PUPP before it gets compiled.

Again, you need to list the ddnames used by the translator you want to define. In this case, assume that PUPP uses three ddnames:

Table 1. DDnames Used by a Hypothetical Preprocessor
DDname Description of file(s) allocated
SYSIN A sequential data set containing the Finnoga 4 source to be preprocessed.
SYSOUT A sequential data set to which the preprocessed Finnoga 4 source is written. You want to compile the contents of this data set.
SYSPRINT A listing data set containing Panda Universal Preprocessor messages and warnings.

In this example, the ddnames are not numbered because you will not use the PUPP ddname substitution list. Instead, you will use the ddname substitution list supported by the Finnoga 4 compiler to link the two build steps together.

Your users want SCLM to keep the listing data set produced by PUPP, but they do not want to keep the intermediate copy of the preprocessed source (the output in SYSOUT). The preprocessed source should be passed to the Finnoga 4 compiler and then deleted.

Because you want to preprocess some but not all of the Finnoga 4 source, you should define two different build processes to SCLM. You have already defined the latter build process (for language FINNOGA), and you will not change that language definition. For the two-step build process, however, you will create a new language definition with a different language name. The users must assign the correct language name to each Finnoga 4 source member.

The new language definition is very much like the first language definition, so you can copy the first definition into a second PROJDEFS.SOURCE member and modify it there.

The new language definition (copied from the first definition) has two FLMTRNSL macros: one for the parser, and the other for the Finnoga 4 compiler. You will add a third FLMTRNSL for the preprocessor, using the same macros and keywords as you used in the previous example. Enter this example before the FLMTRNSL for the Finnoga 4 compiler and after the last FLMALLOC for the parser. The order of execution is then parse, preprocess, and compile.

Figure 1. Panda Universal Preprocessor
         FLMTRNSL   CALLNAM='PANDA U PREP',                            C
               FUNCTN=BUILD,                                           C
               COMPILE=PANDA01,                                        C
               GOODRC=0,                                               C
               PORDER=1,                                               C
               OPTIONS='NOTRACE'
*
*   -- SOURCE
*
           FLMALLOC IOTYPE=S,KEYREF=SINC,DDNAME=SYSIN
*
*   -- PREPROCESSED SOURCE
*
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000,            C
               DDNAME=SYSOUT
*
*   -- LISTING
*
           FLMALLOC  IOTYPE=O,KEYREF=OUT1,RECFM=VBA,LRECL=125,         C
               RECNUM=5000,PRINT=Y,DFLTTYP=PUPLIST,DDNAME=SYSPRINT
*
The following list describes the keywords that change so you can invoke the new language definition:
Keyword
Description
FUNCTN=
Identifies this translator as a build translator. There are now two build translators in this language definition: one for PUPP and one for the Finnoga 4 compiler. Define the PUPP translator first and the Finnoga 4 translator second to tell SCLM the order in which the translators are to be invoked.
OPTIONS=
Specifies the options string to be passed to the PUPP compiler. In this case, you do not want the trace option activated.
DDNAME=
Specify the DDNAME= keyword because you are not using a ddname substitution list to pass ddnames to PUPP. This parameter specifies which ddnames to allocate (the ddnames that PUPP uses).
IOTYPE=W
Specifies that ddname SYSOUT is to be allocated as a work file. In this example, the users do not want to save the processed source. When the build completes, this file is deleted. In a later step, this file is passed to the Finnoga 4 compiler.
KEYREF=OUT1
Specifies that the listing PUPP writes to ddname SYSPRINT is to be saved under SCLM control. You usually use KEYREF=LIST for this purpose. However, KEYREF=LIST is already being used by the translator definition for the Finnoga 4 compiler. Because you have already used the standard set of CC ARCHDEF keywords, you must use the OUTx keywords.

OUTx keywords are used to identify additional build outputs. You can use OUT0, OUT1, …,OUT9 to specify additional outputs that SCLM is to control.

PRINT=Y
This listing and the Finnoga 4 listing are both written to the build listing data set.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014