PL/I usage restrictions


This topic describes required conditions or conditions not supported by the PL/I language processor and provides examples. Some restrictions apply only to particular products. Other product-specific restrictions may also apply when using the PL/I language processor. Consult your product documentation for more information.

Restricted Compiler Options

  1. The "QUOTE" compiler option is not supported by the language processor. This option allows the user to change the quote character into some other character. The language processor does not support compiler options that allow alterations of any character into other characters.
  2. The "BLANK" compiler option is not supported by the language processor. This option allows the user to change the blank character into some other character. The language processor does not support compiler options that allow alterations of any character into other characters.
  3. Use of the NAMES compiler option is not supported. The NAMES option allows the user to change certain characters, such as a pound sign (#) into some other character. The language processor does not support alterations of any characters into other characters.
  4. As IDENTIFY is not written in OBJECT deck by CSS if GOFF is used, the GOFF compiler option is not supported by the language processor. For embedded source listings, that is, ESS(YES) to work, GOFF and OBJECT must be specified. GOFF can work only in this case.

Restrictions or Limitations Using Compiler Directives

  1. The character strings '%INCLUDE' and '%NOPRINT' cannot be split and continued on the next line. For example:

    %NOP
    RINT;
  2. %NOPRINT is not supported by the postprocessor.  Programs containing this directive must be preprocessed.  Because %NOPRINT prevents sections of code from being written to the compiler listing, the postprocessor cannot scan this code and place it into the DDIO file. The postprocessor stops if it detects this situation since the listing is incomplete. The language preprocessor, however, supports the use of %NOPRINT, and processing will proceed normally.
  3. %INCLUDE statements in unusual locations, while syntactically correct, may not be recognized by the Language Processor. For example,

    DCL 1 AA,
    2 BB FIXED BIN(%INCLUDE INC1;),
    2 CC FIXED;

     

  4. Comments started, and not ended on a line that contain a compiler directive are not supported. This is not a restriction against multi-line comments. Rather, it is only a restriction when compiler directives and comments are mixed together on the same line. For example:

    %INCLUDE INC1; /*

    This comment does not end on the same line that it started, but instead ends on the second line */

Restrictions or Limitations Using Comments

  1. Comments in unusual locations, although syntactically correct, will not necessarily be recognized by the language processor. The following is invalid:

    D/*example comment*/CL ALPHA CHAR(4)
    IF ALP/*check alpha name*/HA = 'ABCD' THEN DO;

    In effect, no comments may split a complete word, whether it is a compiler recognized word, such as DECLARE, or a user defined dataname.

Data Declaration Restrictions

  1. Adjustable length variables that are defined in automatic storage are not supported. For example:

    DCL ARRAY(X,Y) CHAR(1);
    or,
    DCL AREA_VAR AREA(X);

    In addition to variables with explicitly defined adjustable lengths, any variable with a length that is determined by the compiler to be adjustable is not supported. These variables are denoted in the aggregate length table section in the compiler listing by an 'ADJ' or a '*' notation in the length columns. The IBM compiler flags all entries of an adjustable structure as adjustable, even the elements where the adjustable element starts. Thus, the language processor may not be able to determine the proper offset for these items, which could affect the display of these items by other BMC AMI products.

  2. AREA variables greater than 32K are not supported. For example:

    DCL VARA AREA(32769);
  3. For a BASED group, arrays must have their indices directly after the array dataname. The following example illustrates this restriction:

    DCL 1 a based (myptr),
                5  a1(10),
                  10  a2(10),
                      15 n1        PIC'99',

    In this example, a1(2).a2(1).n1 would be a supported expression, however, a1.a2.n1(2,1) would not be a supported expression.

  4. PIC clauses over 163 characters are not supported. For example:

    DCL BIGPIC PIC 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

    If you are using a PIC clause when declaring a variable, the number of characters that make up the clause must not exceed 163.

  5. Declared Labels, Label arrays and declared FORMAT statements are not supported. This is a documented IBM Enterprise PL/I compiler restriction for non-data attributes. The language processors will tolerate the usage but the declared names may not be usable or displayed correctly by other BMC AMI products that use the resulting source listing member. For example:

    DECLARELABEL_ARRAY(12)LABEL;
    DECLAREFORLAB(3)LABEL;
    FORLAB(1):FORMAT(A(6)),P'(6)Z9');
  6. Breakpoints cannot be set for PL/I words used as datanames or labels. For example:

    DECLAREDECLAREFIXEDBIN(31);
    DCLEND(2)FIXED;
    :
    END(1)=DECLARE+1;
    :
  7. Multiple label names specified on a procedure or entry statement are not supported. For example:

    ABC:   XYZ:  PROC OPTIONS(MAIN);
    :
    ENT1:   ENT2:   ENTRY;

    The use of multiple label names on other types of executable statements is supported.

  8. Forward references of TYPE declarations are not supported. The Language Processor will tolerate the usage but some attributes and lengths may not be assigned to the variable whose type is being declared. For example:

    DCL DOG TYPE ANIMAL;
    DEFINE ALIAS ANIMAL FIXED BIN(31);

    In order to be processed completely, define the ALIAS variable name prior to its usage in any TYPE reference (that is, reverse the order of the DCL and DEFINE statements).

  9. TYPE declarations that refer to another TYPE declaration are not supported.  The Language Processor will tolerate the usage but some attributes and lengths may not be assigned to the variables whose types are being declared. For example:

    DEFINE ALIAS ANIMAL FIXED BIN(31);
    DCL  DOG TYPE ANIMAL;
    DCL  POODLE TYPE DOG;

    This restriction also applies to structures or structure members that use TYPE to refer to another TYPE declaration. Any combination of TYPE referring to another TYPE is not supported.

Dataname Qualification and Coding Restrictions

  1. Datanames that are split across two or more lines are not currently supported. For example:

    DCL READSWITCH CHAR(1) INIT('N');
    IF READSW
    ITCH='Y' THEN DO;
Success

Tip

  • For the Enterprise PL/I compilers and higher, this restriction is removed. The dataname must cross exactly at the margin boundaries.
  • Usage of the compiler option "Macro" may inhibit the splitting of datanames across lines in the listing.

Datanames that are qualified can be split at the point of qualification. For example:

DCL 1 SWITCHES,
2 READSWITCH CHAR(1),
2 WRITESWITCH CHAR(1);
:
IF SWITCHES.
READSWITCH='Y' THEN DO;

The qualification delimiter character "." must immediately follow the dataname qualifier without intervening spaces.

Miscellaneous Restrictions

  1. Support for multiple unique and separate source programs compiled in a single batch compilation is limited.  Multiple compiler listings in SYSPRINT (read in as CWPPRTI) are not supported.  Multiple programs that are compiled together in a single job step are not supported. For example:

    %PROCESS...
    PROC1: PROC OPTIONS(MAIN)
    %PROCESS...
    PROC2: PROC OPTIONS(MAIN)
  2. Program names and/or external procedure names that exceed seven characters if the $NIDR parameter is used are not supported. For example:

    LONG_PROC_NAME: PROC OPTIONS(MAIN);
    DCL LONG_EXTRN_NAME EXTERNAL;

    Long procedure names are truncated by the compiler and assigned a new name. The new name assigned will not match the program name of the member in the DDIO file. We recommend that the names chosen should not exceed seven characters.  For VisualAge and Enterprise PL/I programs only, long procedure names that exceed seven characters are permitted if a CSS shared directory data set is used in the Language Processor's CWPDDIO DD statement.

  3. Language preprocessor SYSIN and SYSLIB data sets must be fixed length 80-byte records.  The compiler allows the SYSIN input stream and included members or macros in SYSLIB to be variable or fixed-length records, up to 100 bytes in length. However, the language processor only supports PL/I programs that use standard 80-byte records.
  4. If you use PL/I macro processing to generate actual source code as well as %INCLUDE or %NOPRINT directives, the macro processing must be performed by the compiler prior to invoking the BMC AMI PL/I Language Preprocessor. Because the language preprocessor scans the source program before compilation, any PL/I macros that internally generate source code or compiler directives cannot be detected since the macro is not resolved and expanded until compile time. The language processor is dependent on each line in the macro having a different line number. Any undetected compiler directives are then passed to the language postprocessor, which stops if they are detected in the compiler listing.
    The best way to resolve this situation, if you must use macro generation, is to preprocess the source program using the PL/I compiler first by using the INCLUDE, MACRO, and NOCOMPILE options. This will generate a source program with all of the macros resolved. This source can then be passed to the language preprocessor in a subsequent JCL step for proper scanning and compilation.
  5. Source programs or listings with missing commas, semicolons, or other syntax errors are not supported. The compiler may detect some of these situations and will make assumptions as to where a misplaced comma may belong. Normally when this happens, the compiler will generate an error message containing "COMMA ASSUMED AFTER..." or "EXTRANEOUS COMMA DETECTED AFTER...COMMA IGNORED". The compiler will continue in these cases, but the resulting compiler listing is not changed to reflect the assumption made (that is, the compiler does not insert the missing punctuation into the listing). Therefore, when the language processor encounters these same lines, it may not make the same assumption as the compiler and may be unable to process correctly.
    Similarly, semicolons must be included where needed according to standard PL/I language syntax. While the compiler may or may not successfully compile the program and provide appropriate warning messages, the language processor expects semicolons at the end of each line in order to provide reliable results in the DDIO listing member. The processor may not be able to process correctly if semicolons are missing, resulting in unpredictable results during listing processing, or in actual use of the resulting DDIO listing member during execution by Code Debug or Abend-AID.
  6. Use of the language processor's CONDDDIO parameter is not recommended. CONDDDIO can be used to force the language processor to scan and process a PL/I program that contains errors flagged by the compiler.  These situations are unpredictable and may result in parsing errors, loops, or abends in the language processor.  Further, the language processor may appear to process successfully and create a DDIO listing member; but this member may not function correctly when used by the Code Debug debuggers.  All types of situations that could result from the use of CONDDDIO are not supported.
  7. If the postprocessor is used, the listing must be compiled complete with carriage control characters.
  8. If the XINFO(XML) option is used with the PL/I preprocessor, the SYSXMLSD DD must be written to a sequential data set and not to a PDS.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Enterprise Common Components 17.02