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


FLMLPGEN General Purpose Parser

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

Purpose

FLMLPGEN is a general purpose parser that can get dependency information and statistics for the following languages:
370 Assembler
PL/I
REXX
CLIST
TEXT
General information:
  • Comments and the contents of quoted strings are ignored.
  • DBCS strings (delimited by shift-out and shift-in characters) in comments and quotes are allowed.
  • Total lines and blank lines are always counted.
  • Control statements and assignment statements are always set to zero.

Using FLMLPGEN as an Assembler parser

The Assembler parser uses the following rules:
  • Set LANG=A for Assembler in the option list of the OPTIONS parameter, in the FLMTRNSL macro, and in the language definition macro (FLMLANGL).
  • COPY statements with a continuation character in column 72 will be ignored.
  • Any opcode not recognized as a standard 370 opcode is considered to be an external dependency (see next item).
  • Macros that are defined inline are not flagged as external dependencies.
  • Vector, ESA, and z/Series opcodes are recognized.
  • OPSYN, ISEQ, ICTL, and others that alter the language or defaults are ignored.
  • EXEC SQL INCLUDE statements are recognized and dependencies are generated (SQLCA and SQLDA are not flagged as external dependencies). SQL includes can span lines. All other EXEC statements are not flagged as a dependency.

Using FLMLPGEN as a PL/I parser

The PL/I parser uses the following rules:
  • In the language definition, set LANG=I or LANG=1 for PL/I.
  • A modifier (I) can be specified after the LANG keyword. If LANG=I(I) or LANG=1(I) is specified, include set dependencies will be generated. That is, when DD(A) is encountered, copybook A will be generated with an include set name of DD. This facilitates having copybooks with same name from different sources.
  • Statements are just the number of semicolons not in comments or quotes plus commas not in parentheses. The following example has six statements (note the first DCL statement counts as three statements, but the second only counts as one because the commas are in parentheses).
       EXAMPLE:PROC;
           DCL ONE   FIXED(31),
               TWO   FIXED(31),
               THREE FIXED(31);
    
           DCL (A_ONE, AN_A_TWO, AN_A_THREE) FIXED(31);
    
       END EXAMPLE;
  • Include statements cannot span lines.
  • Include statements can include a ddname (as per PL/I syntax).
  • Only the first %INCLUDE on a line will be recognized. Multiple dependencies are allowed on one line
       %INCLUDE A, B, DD1(C), DD2(D) ...
  • Preprocessor labels on include statements cause those includes to be missed.
  • EXEC SQL INCLUDE statements are recognized and dependencies are generated (SQLCA and SQLDA are not flagged as external dependencies). SQL includes can span lines.
  • Multiple EXEC SQL INCLUDE statements can appear on one line and the dependencies will be generated.
  • Dependencies are recognized from all ddnames.

Using FLMLPGEN as a CLIST, REXX or Generic parser

FLMLPGEN uses the following rules for the CLIST, REXX, and generic parsers.
  • In the language definition, set LANG=C for CLIST, LANG=R for REXX, or LANG=T for Generic Parser.
  • Source can be any format (fixed or variable) up to record length 255.
  • Sequence numbers are ignored.
  • Continuation of statements is recognized by the following characters:
    • + and - for CLIST
    • , for REXX
  • Open comments (/* only) for CLIST are allowed. They are considered closed at the end of the line if there is no continuation character.
  • The REXX language can be used to gather statistics for other languages that use /* and */ as delimiters such as ISPF panels. (Statistics might not be correct if any commas are at the end of any lines.)

Using FLMLPGEN as a TEXT parser

FLMLPGEN uses the following rules for parsing TEXT members.
  • In the language definition, set LANG=T for TEXT.
  • Source can be any format (fixed or variable) and any valid record length.
  • Sequence numbering is counted as nonblank lines.
  • Only total lines and blank lines are counted.
  • Control statements and assignment statements are always set to zero.

Parameters

The following keyword parameters are expected as input for FLMLPGEN:
LANG=A|T|R|C|I|1
Use the LANG= parameter to specify the language to use to parse the members. If you do not include the LANG= parameter, the members are parsed as 370 Assembler. Valid language values are:
LANG=A
Assembler only
LANG=T
TEXT... count lines only
LANG=R
REXX or similar languages that use /* and */ as comment delimiters
LANG=C
CLIST
LANG=I
PL/I. Append (I) to generate include set dependencies.
LANG=1
PL/I. Append (I) to generate include set dependencies.
Note: When LANG=I(I) or LANG=1(I), the parser generates an include set dependency for statements of the form INCLUDE DD(A). Copybook A will have an include set name of DD assigned.
LISTINFO
Pointer to the SCLM list information record. This parameter is required and must be set to @@FLMLIS.
LISTSIZE
The size of the LISTINFO buffer. This parameter is required and must be set to @@FLMSIZ.
SOURCEDD
The ddname of the source to be read. This parameter is required.
STATINFO
Pointer to the SCLM statistics information record. This parameter is required and must be set to @@FLMSTP.
SQL=
Maximum of eight characters specifying the name of the include set assigned to EXEC SQL INCLUDE dependencies.

Return codes

FLMLPGEN uses ISPF services. When a failure is the result of an ISPF service error, the message returned by the ISPF service is logged in the user's ISPF log (if there is one).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014