Kednos PL/I for OpenVMS Systems
User Manual


Previous Contents Index

  1. The compiler lists the names of all external entry points in the module and their attributes.
  2. For each procedure in the source program, the compiler lists each declared name, giving
  3. The Program Section (Psect) Synopsis lists the program sections created by the compiler and their attributes.
  4. The Procedure Definition Map lists each procedure and begin block in the program, giving the line number on which the block is defined.
  5. The Command Line shows the PLI command string that was processed, including input files, qualifiers, and library files.

When PLI/LIST/SHOW=MAP/CROSS_REFERENCE is specified, each name that is referenced is followed by a list of the numbers of all lines that contain references to that name. For example:


 Identifier Name       Storage     Size     Line  Attributes 
 ---------- ----       -------     ----     ----  ---------- 
 
 
BIRD                               30 BY    22    OFFSET FROM BASE IS 146 BY, MEMBER OF STRUCTURE 
                                                            SYMBOLS CHARACTER(30), UNALIGNED 
                                                            No references. 
 
CAPITAL                            24 BY    22    OFFSET FROM BASE IS 24 BY, MEMBER OF STRUCTURE 
                                                            STATE, STRUCTURE 
                                                            No references. 
 
EOF                    static      1 BI     6     BIT(1), UNALIGNED, INITIAL, INTERNAL 
                                                            Reference lines: 48, 53, 56, 60, 65, 68 
 
 
FLOWER                             30 BY    22    OFFSET FROM BASE IS 116 BY, MEMBER OF STRUCTURE 
                                                            SYMBOLS CHARACTER(30), UNALIGNED, 
                                                            Reference lines: 43, 54, 66 
 
Begin Block on line 29 
---------------------- 
 
 Identifier Name       Storage     Size     Line  Attributes 
 ---------- ----       -------     ----     ----  ---------- 
 
 
RUN                    automatic   1 BI     30    BIT(1), UNALIGNED 
                                                            Reference lines: 31, 32, 33, 34 
 
 
Begin Block on line 35 
---------------------- 
 
 Identifier Name       Storage     Size     Line  Attributes 
 ---------- ----       -------     ----     ----  ---------- 
 
 
INPUT_FLOWER           automatic   32 BY    36    CHARACTER(30), VARYING, UNALIGNED 
                                                            Reference lines: 37, 41 

Example 2-3 illustrates the statistical summary that PL/I includes in the listing if you specify /LIST/SHOW=STATISTICS qualifier.

Example 2-3 Compiler Performance Statistics for VAX Systems

FLOWERS              22-Nov-2003 09:59:16 Kednos PL/I   V3.8-001  Page 3 
01                   16-Nov-2003 11:35:49    LI$:[MALCOLM]FLOWERS.PLI;18 (1) 
 
 
                                        +------------------------+ 
                                        | Performance Indicators | 
                                        +------------------------+ 
 (1)                       (2)
phase                     buf i/o  dir i/o pageflt virtmem workset cputim 
-----                     -------  ------- ------- ------- ------- ------ 
pass 1 totals                 4      34     116       0    1350      78 
declare totals                0       0       4       0    1500       6 
pass 2 totals                 0       0      64       0    1800      41 
  live analysis               0       0      29       0    2048       7 
  reorder invariants          0       0      30       0    2048       3 
  eliminate redundancy        0       0      12       0    2048       9 
optimizer totals              0       0      98       0    2048      32 
allocator totals              1       3      28       0    2048      13 
  generate code list          0       0      26       0    2048      35 
  register allocation         0       0       0       0    2048       6 
  peephole optimization       0       0       3       0    2048      13 
  branch/jump resolution      0       0       0       0    2048       2 
  write object module         0       0       2       0    2048       8 
code generator totals         0       0      34       0    2048      66 
total compilation             8      45     827     432    2048     300 
71 lines compiled 
compilation rate was 1420 lines per minute 

The following notes are keyed to Example 2-3:

  1. The compiler accumulates statistics for each phase of its operation.
  2. For each phase of its operation, the compiler lists I/O, memory, and CPU time usage statistics.

If you specify /LIST/OBJECT/MACHINE_CODE when you compile a PL/I program, the compiler includes the generated assembly language code and object code in the listing. Example 2-4 illustrates this listing.

Example 2-4 Machine Code Listing for VAX Systems

FLOWERS                  22-Nov-2003 10:00:37 Kednos PL/I   V3.8-001              Page 1 
01                       16-Nov-2003 11:35:49    LI$:[MALCOLM]FLOWERS.PLI;18 (1) 
 
 
 
    1 |    /* This procedure obtains data about state flowers from STATEDATA.DAT */ 
    2 
    3 
    4           FLOWERS: PROCEDURE OPTIONS(MAIN); 
                                          0073  FLOWERS: 
                                    C00C  0073          .entry  FLOWERS,^m<dv,iv,r2,r3> 
                              5E 10 C2    0075          subl2   #10,sp 
                       00000000* EF 16    0078          jsb     PLI$OPTIONSMAIN 
                     5C 00000000 EF 9E    007E          movab   STATE_FILE,ap 
                     52 00000000 EF 9E    0085          movab   $DATA,r2 
                              53 5E D0    008C          movl    sp,r3 
    5    1 
    6    1      DECLARE EOF BIT(1) STATIC INIT('0'B); 
    7    1 
    8    1      %INCLUDE 'STATE.TXT'; 
   23    1 
   24    1              ON KEY(STATE_FILE) BEGIN; (1)
                            5E 53 14 C3   008F subl3   #14,r3,sp (2)
                              53 5E D0    0093          movl    sp,r3 
                           0C AE 6C 9E    0096          movab   (ap),0C(sp) 
                  04 AE 001E8024 8F D0    009A          movl    #1E8024,04(sp) 
                        08 AE 0D AF 9E    00A2          movab   sym.1,08(sp) 
                           6E F4 AD D0    00A7          movl    -0C(fp),(sp) 
                           F4 AD 5E D0    00AB          movl    sp,-0C(fp) 
                               0092 31    00AF          brw     sym.4 
                                          00B2  sym.1: 
                                    C000  00B2          .entry  vcg.code,^m<dv,iv> 
   25    2                  PUT SKIP LIST('Error on key',ONKEY(),'error no.',ONCODE()); 
                              51 5D D0    00B4          movl    fp,r1 
                           02 AF 6C FA    00B7          callg   (ap),sym.2 
                                 7D 11    00BB          brb     sym.3 
                                          00BD  sym.2: 
                                    C87C  00BD          .entry  vcg.code,^m<dv,iv,r2,r3,r4,r5,r6,r11> 
                         5E FEF8 CE 9E    00BF          movab   -0108(sp),sp 
                     5C 00000000 EF 9E    00C4          movab   SYSPRINT,ap 
                                 50 7C    00CB          clrq    r0 
                           FE AD 01 B0    00CD          movw    #1,-02(fp) 
                           52 FE AD 9E    00D1          movab   -02(fp),r2 
                                 53 7C    00D5          clrq    r3 
                       00000000* EF 16    00D7          jsb     PLI$PUTFILE_R6 
                           50 81 AF 9E    00DD          movab   $CODE+61,r0 
                              51 0C 3C    00E1          movzwl  #C,r1 
                       00000000* EF 16    00E4          jsb     PLI$PUTLCHAR_R6 
                            FF7E CD 9F    00EA          pushab  -0082(fp) 
                           7E 80 8F 9A    00EE          movzbl  #80,-(sp) 
                    00000000* EF 02 FB    00F2          calls   #2,PLI$ONKEY 
                         52 FF7E CD B0    00F9          movw    -0082(fp),r2 
                         50 FF7E CD 9E    00FE          movab   -0082(fp),r0 
                              51 52 3C    0103          movzwl  r2,r1 
                       00000000* EF 16    0106          jsb     PLI$PUTLVCHA_R6 
                         50 FF48 CF 9E    010C          movab   $CODE+58,r0 
                              51 09 3C    0111          movzwl  #9,r1 
                       00000000* EF 16    0114          jsb     PLI$PUTLCHAR_R6 

The following notes are keyed to Example 2-4:

  1. The machine code is generated in line with the PL/I source statements. Thus, you can see the code that is generated by each statement following the statement itself.
  2. The listing shows, in hexadecimal, the object module location of each generated statement directly to the left of the machine code. To the left of the object location is the object code generated by the Kednos PL/I for OpenVMS VAX compiler.

If you specify /LIST/SHOW=(INCLUDE,EXPANSION,TRACE) when you compile a program that uses the embedded preprocessor, the compiler includes additional preprocessor information in the listing. Example 2-5 illustrates some of the notations that can appear in the column to the right of the line numbers in the listing. Except as indicated, the notations seen here are enabled by default.

Example 2-5 Preprocessor Compiler Listing for VAX Systems

WR_SCHEDULE               12-Nov-2003 16:00:27 Kednos PL/I   V3.8-001              Page 1 
01                        12-Nov-2003 15:57:14    APLD$:[MALCOLM]SCHEDULE.PLI;1 (1) 
 
 
 
    1           WR_SCHEDULE:  PROCEDURE OPTIONS (MAIN); 
    2    1                    DECLARE I FIXED BINARY(15); 
    3    1                    %DECLARE (DOWN_PAGE,ACROSS_PAGE) CHAR; 
    4    1 
    5    1                    %ACROSS_PAGE = 'PAGE(ACROSS)'; 
    6    1                       %DOWN_PAGE   = 'PAGE(DOWN)'; 
    7    1                       %IF VARIANT() = 'DAYS' %THEN %INCLUDE 'DAYS.PLI'; 
(1)  8 |I 1     /*  THE INCLUDE FILE 'DAYS.PLI' CREATES AN ARRAY STRUCTURE DAYS AND     */ 
    9 |I 1 /*  INITIALIZES IT WITH THE DAYS OF THE WEEK.                           */ 
   10  I 1 
   11  I 1      %DO; 
   12  I 1 
   13  I 1         %DECLARE SCHEDULE CHAR,NUM_ITEMS FIXED; 
   14  I 1            %SCHEDULE = 'DAYS'; 
 
(2) 15  I 1        %NUM_ITEMS = 7; 
   16  I 1 
   17  I 1            DECLARE DAYS(7) CHAR(10) INIT( 
   18  I 1              'MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY', 
   19  I 1              'SATURDAY','SUNDAY'); 
   20  I 1      %END; 
(3) 21 *  1                      %ELSE %IF VARIANT() = 'MONTHS' %THEN %INCLUDE 'MONTHS.PLI'; 
   22    1 
   23 *  1                       %WRITE:  PROCEDURE(SCHEDULE,PAGE) STATEMENT RETURNS(CHAR); 
   24 P  1                                DECLARE (SCHEDULE,PAGE,F_SPEC) CHAR; 
   25    1 
   26    1                                  IF PAGE = 'DOWN' 
   27 P  1                                    THEN DO; 
(4) 28 P  1                                 F_SPEC = ' DO I = 1 TO NUM_ITEMS)) (A(10),SKIP);'; 
   29 P  1                              RETURN ('PUT SKIP EDIT(('||SCHEDULE||'(I)'||F_SPEC); 
   30 P  1                                       END; 
   31    1                                    ELSE IF PAGE = 'ACROSS' 
   32 P  1                                           THEN RETURN ('PUT SKIP LIST ('||SCHEDULE||');'); 
   33 P  1                                 END; 
   34    1 
   35    1                          WRITE(SCHEDULE) DOWN_PAGE; 
(5)    T                             WRITE(DAYS) DOWN_PAGE; 
      T                             WRITE(DAYS) PAGE(DOWN); 
      T                             PUT SKIP EDIT((DAYS(I) DO I = 1 TO 7)) (A(10),SKIP); 
(6)    E                             PUT SKIP EDIT((DAYS(I) DO I = 1 TO 7)) (A(10),SKIP); 
   36    1                          WRITE(SCHEDULE) ACROSS_PAGE; 
      T                             WRITE(DAYS) ACROSS_PAGE; 
      T                             WRITE(DAYS) PAGE(ACROSS); 
      E                             PUT SKIP LIST (DAYS); 
   37    1                    END; 
 
 
 COMMAND LINE 
 ------- ---- 
 
PLI/LIST/SHOW=(INCLUDE,EXPAN,TRACE)/VARIANT=DAYS SCHEDULE 

The following notes are keyed to Example 2-5:

  1. The operand symbol (|) denotes a line of source text that contains comment text.
  2. The I indicates text from an INCLUDE file. /SHOW=INCLUDE enables this indicator.
  3. The asterisk (*) indicates unused preprocessor text.
  4. The P indicates lines contained within a preprocessor procedure.
  5. The T indicates each instance of preprocessor variable value replacement. /SHOW=TRACE enables this indicator.
  6. The E indicates the final replacement value for the preprocessor variable. /SHOW=EXPANSION enables this indicator.

2.3.6 Kednos PL/I for OpenVMS Alpha Compiler Listing

The Kednos PL/I for OpenVMS Alpha compiler listing displays the the following information:

Example 2-6 illustrates the default listing (specified with the /LIST qualifier) and describes the information provided in the listing.

Example 2-7 illustrates a storage map of the program listed in Example 2-6. The Kednos PL/I for OpenVMS Alpha compiler generates a storage map if you specify /LIST/SHOW=MAP on the PLI command; it also generates a cross-reference listing if you specify /CROSS_REFERENCE.

Example 2-8 illustrates the statistical summary generated if the /LIST/SHOW=STATISTICS qualifier is specified.

Example 2-9 illustrates a portion of a listing of a program compiled with the /LIST/OBJ/MACHINE_CODE qualifiers.

Example 2-10 illustrates the effects of /SHOW=(TRACE,EXPANSION), which shows preprocessor activity in the program listing.

Example 2-6 Default Compiler Listing for OpenVMS Alpha Systems

 
FLOWERS (1)             Source Listing (2) 19-Nov-2003 10:26:27 Kednos PL/I V4.4-001  (3) Page   1 
01                                    (4) 19-Nov-2003 10:25:07    DISK$DISK4:[MAZORA.DECPLI.LZ]FLOWERS.PLI;1 
 
   |    (5)    1 /* This procedure obtains data about state flowers from STATEDATA.DAT */ 
              2 
              3                
       (6)     4 FLOWERS: PROCEDURE OPTIONS(MAIN); 
       1      5 
       1      6 DECLARE EOF BIT(1) STATIC INIT('0'B); 
       1      7 
       1      8 %INCLUDE 'STATE.TXT'; 
       1     23 
       1     24  ON KEY(STATE_FILE) BEGIN; 
       1     25      PUT SKIP LIST('Error on key',ONKEY(),'error no.',ONCODE()); 
       1     26      STOP; 
       1     27      END; 
       1     28 
       1     29 MODE: BEGIN; 
       1     30 DECLARE RUN BIT(1); 
       1     31         GET LIST(RUN) OPTIONS(PROMPT('List by state? ')); 
       1     32         IF RUN THEN GOTO LIST_BY_STATE; 
       1     33         GET LIST(RUN) OPTIONS(PROMPT('List by flower? ')); 
       1     34         IF RUN THEN GOTO LIST_BY_FLOWER; 
       1     35         ELSE BEGIN; 
       1     36                 DECLARE INPUT_FLOWER CHARACTER(30) VARYING; 
       1     37                 GET LIST(INPUT_FLOWER) OPTIONS(PROMPT('Flower? ')); 
       1     38                 OPEN FILE(STATE_FILE) KEYED ENV( 
       1     39                                 INDEX_NUMBER(1), 
       1     40                                 SHARED_READ); 
       1     41                 READ FILE(STATE_FILE) SET (STATE_PTR) KEY(INPUT_FLOWER); 
       1     42                 PUT SKIP EDIT('The flower of',STATE.NAME,'is the',FLOWER) 
       1     43                 (3(a)); 
       1     44         END; 
       1     45         END; 
       1     46         RETURN; 
       1     47         LIST_BY_STATE: 
       1     48                 ON ENDFILE(STATE_FILE) EOF = '1'B; 
       1     49                 OPEN FILE(STATE_FILE) SEQUENTIAL ENV( 
       1     50                 INDEX_NUMBER(0), 
       1     51                 SHARED_READ); 
       1     52         READ FILE(STATE_FILE) SET (STATE_PTR); 
       1     53         DO WHILE (^EOF); 
       1     54             PUT SKIP LIST(STATE.NAME,'flower is ',FLOWER); 
       1     55             READ FILE(STATE_FILE) SET (STATE_PTR); 
       1     56             END; 
       1     57             CLOSE FILE(STATE_FILE); 
       1     58             RETURN; 
       1     59 LIST_BY_FLOWER: 
       1     60         ON ENDFILE(STATE_FILE) EOF = '1'B; 
       1     61         OPEN FILE(STATE_FILE) SEQUENTIAL ENV( 
       1     62                                 INDEX_NUMBER(1), 
       1     63                                 SHARED_READ); 
       1     64         READ FILE(STATE_FILE) SET (STATE_PTR); 
       1     65         DO WHILE (^EOF); 
       1     66             PUT SKIP LIST(STATE.NAME,'flower is ',FLOWER); 
       1     67             READ FILE(STATE_FILE) SET (STATE_PTR); 
       1     68             END; 
       1     69         CLOSE FILE(STATE_FILE); 
       1     70         RETURN; 
       1     71         END; 
 
 COMMAND LINE 
 ------- ---- 
 
PLI/LIST FLOWERS (7)

The following notes are keyed to Example 2-6:

  1. The name of the first level-1 procedure in the source program and its identification. If the main procedure did not specify OPTIONS(IDENT), the compiler uses 01 for the identification.
  2. The date and time of compilation, and the version of the compiler that was used to compile the program.
  3. The page number of the listing file, and the page number of the source file.
  4. The date and time that the file containing the source program was created, and its full file specification (to a maximum of 44 characters).
  5. Compiler-generated line numbers. The compiler assigns a number to each line in the source program, including comment lines and lines read from INCLUDE files.
    Note that these line numbers do not necessarily correspond to the line numbers, if any, assigned to the file by an editor that is line-number oriented.
    A vertical bar (|) character indicates a line that contains only a comment.
  6. The nesting level, or depth, of each statement. The outermost procedure is always level 1. Additional level numbers are assigned to statements within internal procedures, begin blocks, and DO-groups.
  7. The PLI command line as it was entered for compilation.

If the program is compiled with the qualifier /LIST/SHOW=INCLUDE, the %INCLUDE statements are followed by the contents of the INCLUDE files, with line numbers. Notice that INCLUDE files are indicated by an 'I' in the column to the right of the line numbers.


 
       1      6 DECLARE EOF BIT(1) STATIC INIT('0'B); 
       1      7 
       1      8 %INCLUDE 'STATE.TXT'; 
    I  1      9 declare 1 state based (state_ptr), 
    I  1     10           2 name character (20),        /* Primary key */ 
    I  1     11           2 population fixed binary(31),/* 3rd alternate key */ 
    I  1     12           2 capital, 
    I  1     13             3 name character (20), 
    I  1     14             3 population fixed binary(31), 
    I  1     15           2 largest_cities(2), 
    I  1     16             3 name character(30), 
    I  1     17             3 population fixed binary(31), 
    I  1     18           2 symbols, 
 
 
    I  1     19             3 flower character (30),    /* secondary - 1st alternate - key */ 
 
 
    I  1     20             3 bird character (30),      /* tertiary - 2nd alternate - key */ 
    I  1     21         state_ptr pointer, 
    I  1     22         state_file file; 
       1     23 
       1     24         ON KEY(STATE_FILE) BEGIN; 
       1     25             PUT SKIP LIST('Error on key',ONKEY(),'error no.',ONCODE()); 
       1     26             STOP; 
       1     27             END; 
       1     28 
 

Example 2-7 Compiler Storage Map for OpenVMS Alpha Systems

 
FLOWERS  Source Listing 19-Nov-2003 10:44:46 Kednos PL/I V4.4-001   Page   2 
01                      19-Nov-2003 10:25:07    DISK$DISK4:[MAZORA.DECPLI.LZ]FLOWERS.PLI;1 
 
                                +-------------+ 
                                | Storage Map | 
                                +-------------+ 
 
External Entry Points and Variables Declared Outside Procedures (1)
--------------------------------------------------------------- 
 
Identifier Name (2)    Storage     Size     Line  Attributes 
 ---------- ----                 -------     ----     ----  ---------- 
 
 FLOWERS                                               4     ENTRY, EXTERNAL 
Procedure FLOWERS on line 4 
--------------------------- 
 
Identifier Name         Storage     Size     Line  Attributes 
---------- ----         -------     ----     ----  ---------- 
 
BIRD                               30 BY    20    OFFSET FROM BASE IS 146 BY, MEMBER OF STRUCTURE SYMBOLS, 
                                                  CHARACTER(30) UNALIGNED, NONVARYING 
 
CAPITAL                            24 BY    12    OFFSET FROM BASE IS 24 BY, MEMBER OF STRUCTURE STATE, 
                                                  STRUCTURE 
 
EOF                    static      1 BI     6     BIT(1), UNALIGNED, INTERNAL, INITIAL, NONVARYING 
 
FLOWER                             30 BY    19    OFFSET FROM BASE IS 116 BY, MEMBER OF STRUCTURE SYMBOLS, 
                                                  CHARACTER(30) UNALIGNED, NONVARYING 
 
LARGEST_CITIES                     68 BY    15    OFFSET FROM BASE IS 48 BY, MEMBER OF STRUCTURE STATE, 
                                                  STRUCTURE DIMENSION 
   . 
   . 
   .  
Begin Block on line 29 
---------------------- 
 
 Identifier Name                 Storage     Size     Line  Attributes 
 ---------- ----                 -------     ----     ----  ---------- 
 
 RUN                             automatic   1 BI     30    BIT(1), UNALIGNED, NONVARYING 
 
Begin Block on line 35 
---------------------- 
 
 Identifier Name                 Storage     Size     Line  Attributes 
 ---------- ----                 -------     ----     ----  ---------- 
 
 INPUT_FLOWER                    automatic   32 BY    36    CHARACTER(30), VARYING, UNALIGNED 
Procedure Definition Map (3)
--------- ---------- --- 
 
 Line    Name 
 ----    ---- 
 
 4        FLOWERS 
 24       BEGIN 
 29       BEGIN 
 35       BEGIN 
 
 
 COMMAND LINE (4)
 ------- ---- 
 
PLI/LIST/SHOW=MAP FLOWERS 

The following notes are keyed to Example 2-7:


Previous Next Contents Index