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


FLMLRASM REXX Assembler Parser

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

Purpose

This is the assembler parser translator, written in REXX, that parses the source identified by the SOURCE DDNAME.

Functions

One of the functions of an SCLM parser is to determine all of a module's dependencies. FLMLRASM determines all of the names that are to be copied into the Assembler source.

The parser uses the following syntax rules to locate dependency names:
  • The search for tokens is restricted to columns 2-71. Column 72 is checked for a non-null element (treated as a continuation). The use of non-null elements to continue strings for forming reserved words or dependency names is not supported.
  • An opcode or dependency token that extends into the continuation column will not be added as a dependency; the parser return code will be set to 4, the line in error will be written to the error listing data set (userid.SCLMERR.LISTING), and processing will continue.
  • When a line that is not a comment line or a continuation line has COPY after column 1, the next token is taken as the name of a dependency.
    Note: If the member name is enclosed in single or double quotes, the quotes are ignored.
  • When searching for the next token on a line and there are no more tokens on that line, the search continues with the next continued line, if there is one. Comment statements must not appear between an instruction statement and its continuation lines.
  • Tokens inside quoted strings will be ignored (except that quotation marks around a member following a COPY or EXEC SQL INCLUDE statement are removed).
  • Labels starting in column 1 to the end of the token are considered white space.
FLMLRASM will generate a dependency for the MEMBER# token under the following conditions:
  • MEMBER# is the first token of a statement and is not one of the opcodes for the z/Series processors (including assembler extended mnemonics, Vector facility and some obsolete 360/370 instructions).
  • MEMBER# is the first token after a COPY or EXEC SQL INCLUDE instruction. It can be on a continued line.
The following example illustrates conditions under which dependencies will and will not be formed. Each MEMBER# token appears in an example of syntax that the parser recognizes as creating a dependency. A MEMBER# token can be from 1 to 8 characters. The BADCPY# statements in the example will not create dependencies for the following reasons:
  • BADCPY1 follows an EXEC CICS® instruction; dependencies are only generated for precompiler instructions (EXEC SQL INCLUDE).
  • BADCPY2 first appears in a macro definition, so no dependency is created on subsequent appearances.
  • BADCPY3 begins with an ampersand.
  • BADCPY4 is not the first token of the statement in which it appears.
*<-Column 1                                                 Column 72->
 MEMBER1 rest of line
LABEL MEMBER2 rest of line
 COPY MEMBER3 rest of line
 COPY                                                                  X
               MEMBER4
* A COMMENT LINE ******************************************************
* DB2 PREPROCESSOR STATEMENTS  - each is 1 statement, 1 dependency
 EXEC SQL INCLUDE MEMBER5
 EXEC SQL INCLUDE                                                      X
               MEMBER6
* CICS PREPROCESSOR STATEMENT  - 1 statement, no dependency
 EXEC CICS BADCPY1
* Statements for which no dependency is generated
 MACRO                                                                 X
               BADCPY2
 &BADCPY3   rest of line
* previously defined macros ignored
 BADCPY2                                                               X
               BADCPY4
* continued lines ignored, except after COPY & EXEC SQL INCLUDE

Another function of the parser is to gather statistics or metrics for each module to be parsed. There are ten such statistics saved by SCLM, but only 8 are generated by this parser. For assembler, this parser defines the ten statistics as follows:

Total lines
The total number of records in the file.
Comment lines
The number of lines with an asterisk in the first column.
Noncomment lines
The number of total lines minus the number of comment lines.
Blank lines
The number of lines that contain only blanks.
Prolog lines
The number of comment lines and blank lines that are found before the first noncomment line.
Total statements
The number of comment statements plus the number of noncomment statements.
Comment statements
This value is equal to the number of comment lines.
Control statements
This value is always 0.
Assignment statements
This value is always 0.
Noncomment statements
The number of statements whose first token is a reserved word, plus the number of EXEC SQL and EXEC CICS instructions.

Parameters

The following guidelines apply when specifying parameters:
  • The order of the parameters is not important.
  • See the language definitions provided by SCLM for the actual usage of the parameters for FLMLRASM.
The following keyword parameters, separated by commas, are required as input to FLMLRASM:
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. The parser checks to make sure that the LISTSIZE parameter is large enough to hold at least one entry of 228 bytes.
STATINFO
Pointer to the SCLM statistics information record. This parameter is required and must be set to @@FLMSTP.

Return codes

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014