PL/1 - 1.1

Extension ID


What’s new?

See PL1 1.1 - Release Notes .


This extension provides support for applications written using Enterprise PL/I for z/OS languages.

Supported Versions of PL/I

Although this extension is officially supported by CAST, please note that it has been developed within the technical constraints of the CAST Universal Analyzer technology and to some extent adapted to meet specific customer needs. Therefore the extension may not address all of the coding techniques and patterns that exist for the target technology and may not produce the same level of analysis and precision regarding e.g. quality measurement and/or function point counts that are typically produced by other CAST AIP analyzers.

This version of the extension provides support for:

Enterprise PL/I for z/OS Supported
5.x (tick)
4.x (tick)
3.x (tick)

Function Point, Quality and Sizing support

This extension provides the following support:

  • Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
  • Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
Function Points
Quality and Sizing (tick)


CAST Imaging Core release Supported
8.3.x (tick)

Download and installation instructions

The extension will be automatically downloaded and installed in CAST Console when you deliver PL/1 code. You can manage the extension using the Application - Extensions interface.

Prepare and deliver the source code

The following file extensions are recognised by CAST Console:

  • .PLC
  • .PLI

However, PL/I source code files can sometimes be created with any extension (most commonly a .TXT extension) or no extension at all. If these type of files are encountered during the source code delivery process, CAST will try to determine whether the file is a valid PL/I source file and if so, a built-in preprocessor will change the extension to .PLI or .PLC (for files with extensions other than .PLI or .PLC, such as .TXT) and will add a .PLI or .PLC extension for files with no extension.

Please note the following recommendations and notes about source code:

  • It is important to organize the PL/1 source code in a specific way otherwise the preprocessor will not be launched during the delivery:
    • In general, CAST recommends ensuring that all PL/I source code (.PLC / .PLI / .TXT / files with no extension) is located in one single folder dedicated to PL/1 in the delivery. You can also use multiple folders for your PL/1 source code if necessary. Other source code for other technologies should be located in separate dedicated folders.
    • When using CAST Console, to trigger the PL/1 preprocessor, the presence of at least one .PLC or .PLI file in a folder in the delivery (including the root if this is used) is OBLIGATORY - this is not the case when delivering source code using the CAST Delivery Manager Tool when the preprocessor will always be triggered.
    • Do not mix other file types with the PL/1 source code in the same folder (including the root if this used) - these other files may be processed by the PL/1 preprocessor rendering them corrupt and causing the subsequent analysis to fail.
  • The PL/I extension ignores empty files and they will not be considered as valid source code files.
  • Binary files should be avoided since it is not always possible to detect whether a given file is binary or not. Presenting binary files in the source code delivery will not result in a packaging failure, but an error message can be expected in the packaging/extraction log.

Source code discovery

A discoverer is provided with the extension to automatically detect PL/1 code: a PL/1 project will be discovered for the package’s root folder when at least one  .PLC or .PLI file in a folder (including post preprocessing) is detected in the root folder or any sub-folders. For every PL/1 project located, one Universal Technology Analysis Unit will be created:

Deliver the source code

  • Upload the ZIP file containing your Application source (or define a folder in which to deposit your source code)
  • Configure any file/folder exclusions and objectives
  • If you want to inspect the version (recommended), disable the analysis/snapshot at this point
  • Start the delivery process - the extension will be auto-downloaded during this phase.
  • Validate and accept the version - inspect the delivered files and ensure that you have an Analysis Unit for your PL/I source code:

Logging mechanism

Analysis log files

Analysis logs are stored in the default locations used by the CAST Management Studio/AIP Console:

Error/Warning Message


Unable to find the object end for type 'XXXXXXX' 

This is caused by complex source code that makes the engine miss the end of the object, whereas the begin of object type was captured. Object won't be created in Analysis Service, will lead to incomplete analysis. Issue must be reported to CAST Support, along with source code (original source file + preprocessed source code) to allow reproduction and investigation.

A few such warnings for object types like PLIProcedure, PLCProcedure, PLIFunction could be acceptable.

Same warning for PLIMainProcedure is problematic : the whole program is not saved in Analysis Service.

An unnamed object of type 'PLIWhenCall' has been detected This is because PLIWhenCall has no specific name, as such, the CAST framework will give them the name "unnamed". You can safely ignore this warning.
  • Duplicate object of type 'PLIWhenCall' has been detected: '<unnamed>'
  • Duplicate object of type 'PLIErrorBlock' has been detected

As mentioned above, PLIWhenCall and PLIErrorBlock have no specific name and are automatically given the name "unnamed" by CAST - as such multiple objects with the name "unnamed" will exist and will cause this error. You can safely ignore this warning.

Same for PLIProcSubscriptedVar object type.

  • Duplicate object of type 'PLIProcedure' has been detected
  • Duplicate object of type 'PLCProcedure' has been detected

PLIProcedure and PLCProcedure are supposed to be unique within the same source file. So such warning is the sign of an incorrect object type identification.

Issue must be reported to CAST Support.

  • end of string ''' not found
  • end of string '[']' not found
  • File skipped

UA engine did not find the end of a string, whereas the begin of the string was captured.

This generally leads to a second warning : File skipped, meaning the source file and contained objects have not been saved in Analysis Service.

On large applications, a few such warnings could be acceptable.

Otherwise, issue must be reported to CAST Support, along with source code (original source file + preprocessed source code) to allow reproduction and investigation.

end of comment '[\*][/]' not found

Alone, this warning can be safely ignored.

Check if other warnings are present for the same source file.

  • Could not calculate code depth correctly for file File: <file path>
  • Could not calculate code depth correctly for file, added <TAG> File: <file path> where TAG can be $END or $$END.
The analyzer is not capable of detecting the source code depth correctly.
PL1 Extractor Version: <version> A simple information message to help identify the version of the extractor that is being used.

PL/I Preprocessor

PL/I source code needs to be preprocessed so that CAST can understand it and analyze it correctly. This source code preprocessing is actioned automatically. In other words you only need to package, deliver and launch an analysis/generate a snapshot for the preprocessing to be completed.

Note that as part of the source code pre-processing phase, from PL1 1.0.5 onwards, CAST will now add “$$” to all PL/I source code just prior to the “;”. For example:

Original source code


Source code after pre-processing in ≥ 1.0.5


The impact of this change is as follows:

  • When upgrading to PL1 ≥ 1.0.5, existing objects will be shown as updated when a post upgrade snapshot is run.
  • There will be a reduction in the number of messages of the type “end of object of type <PLC\PLIProcedure|Function> not found” that were previously displayed in the log.

This change has been implemented because of a limitation in the analyzer with regard to the way object start and end patterns are handled. In PL/I, object start and end patterns do not match (contrary to most other languages, such as PHP where { and } are used) and therefore the analyzer is not able to correctly identify when an object ends.

Analysis failures

The PL1 extension needs to process all the file extensions delivered in the version because PL/I files can have any extension. During this parsing if the file is from a different technology, a failure will occur. The file that has caused the failure will be stored under a “ParsingFailures” folder at the package level and the file extension of the file will be changed to “pfail”. A reason for the failure will also be recorded in each subfolder with name of the exception that caused it. For example StringCommentProcessorException:

What results can you expect?



Icon Metamodel description

PLI DB2 Table

PLI Error Block

PLI FileStructure

PLI Function

PLI MainProcedure

PLI Procedure

PLI Project


Icon Metamodel description

PLC DB2 Table

PLC FileStructure

PLC Function

PLC Include

PLC Procedure

PLC Project

Structural Rules

The following structural rules are provided:

Release Link

You can also find a global list here:|| .

Known Limitations

PL/1 integration

  • PL/I integration with Database is supported.
  • PL/I integration with IMS DB, IMS DC, CICS is not supported.

Rules searching for the use of the builtin DATE function

The following two rules do not work as expected. Instead of searching for use of the DATE builtin function, they search for inclusion of the function. This is a limitation. These rules are disabled from 1.1.0-funcrel “out of the box”. If they are enabled, it will list all the files that include DATE function through “declare DATE BUILTIN;” statement rather than actual use of function DATE.

  • Avoid Main procedures using the DATE builtin function (PL1) - 1001164

  • Avoid Main procedures using the DATE builtin Function via include PLC (PL1) - 1001166

Metrics Assistant (embedded in CAST Imaging Core)

Searches not limited only to embedded SQL

The MA (Metric Assistant) which is used for metric search cannot search only in embedded SQL. In order to overcome this limitation the processing for some metrics/rules has been moved to the extractor in 1.1.0-funcrel. However, the following rules still can be affected by this limitation and may produce false violations:

  • Avoid Main Procedures having queries with joins on more than 4 Tables (PL1) - 1001128
  • Avoid Main Procedures with High Raw SQL Complexity (SQL complexity greater than X) (PL1) - 1001130

Cannot calculate metric excluding comments

The MA (Metric Assistant) which is used for metric search cannot search correctly while excluding comments especially if comments start or end adjacent to the keyword. If such a condition exists, random false violations may occur.