PL/I and SAS flow charts

Visustin generates flow charts from PL/I and SAS source code. Convert your .pli, .pl1 and .sas files to flow charts automatically.

PL/I or PL/1 flowcharting support has been built according to IBM PL/I Language Reference, 10th Edition (Oct 2008). Visustin is not limited to IBM PL/I systems, though. The reference document is compatible with Enterprise PL/I for z/OS, PL/I for AIX and Rational Developer for System z PL/I for Windows.

SAS flowcharting support is current up to SAS (Statistical Analysis System) version 9.4. Visustin flowcharts both DATA step and SAS %macro code.

Supported statement types

PL/I and SAS resemble each other. Visustin supports the following statement types.

Statement typePL/ISAS
Conditional statementsIF..THEN..ELSEIF..THEN..ELSE, IF expr;
Multiway decisionSELECT..WHEN..OTHERWISESELECT..WHEN..OTHERWISE
LoopingDO..END;DO..END;
Loop exit and continueLEAVE, ITERATELEAVE, ITERATE
JumpGOTO, GO TOGOTO, GO TO, LINK
ReturnRETURNRETURN
End programEXIT, STOPABORT
Error handlingON
Error raisingSIGNAL, RESIGNAL
Inline dataCARDS, CARDS4, LINES, LINES4, DATALINES, DATALINES4, PARMCARDS, PARMCARDS4
Line numbers and labelsMyLine:MyLine:
Comments/* Comment *//* Comment */, *Comment;
Functions and sub-programsPROC, PROCEDURE, ENTRYDATA and PROC step
Pre-processing%preprocessor%macros

%Preprocessor directives and %macros. Visustin supports the extensive macro languages of PL/I and SAS. The default setting handles them as comments. To turn on full processing as flow chart symbols, use the Compiler directives setting in the Options menu.

Most other statements are handled as regular statements. Unhandled compiler directives are displayed as comments.

PL/I line length, sequence numbers and printer control

PL/I code can exist in two formats, both supported by Visustin: either 1) variable line length or 2) fixed line length. Variable length code causes no problems. On the contrary, fixed length code may include special columns for sequence numbers and/or printer control characters. These special columns must be detected and ignored. Typically, source code appears between columns 272. Column 1 is for printer control and columns 7380 for sequence numbers. Other values may be used. The source code may indicate its own format with a line such as *PROCESS MARGINS(2,72). In many cases, this line doesn't exist, and the columns are either defined with a compiler switch or system default values are used.

Visustin auto-detects the format of most PL/I code. If it finds fixed length code, it ignores sequence numbers and/or printer control characters. A ruler appears above the source code in Visustin main window. The ruler displays the currently detected column format. Columns with an empty symbol are ignored when flowcharting. Columns with a non-empty symbol are flowcharted.

Column detection rules:

  1. Look for a *PROCESS MARGINS or %PROCESS MARGINS line. If found, use the setting in it, and create a flow chart.
  2. Else: Look for sequence numbers in the 8 last columns (typically 7380) and columns 18. Sequence numbers are assumed 8 characters long. Ignore them if found.
  3. And: Look for printer control characters (0, 1, -, +) in column 1. Remove if found.

If Visustin does not correctly treat fixed length PL/I, manually add *PROCESS MARGINS(n,m) as the first line of code, where n=first column, m=last column. Example: *PROCESS MARGINS(2,72) processes code in columns 2..72 ignoring other columns.

SAS line length

Visustin only supports variable line length for SAS code. If your SAS code is in a fixed format or if it uses a sequence number column, use an external utility to remove any extra columns and convert the source files in a variable length format.

EBCDIC

If your files are in EBCDIC, set the encoding option to an EBCDIC codepage before loading the files in Visustin.

Unsupported constructs

The following statement types are unsupported. Unsupported means you see the code in the graph as a normal statement, not as a branch or a jump.

PL/I dialects

PL/I comes in several dialects such as PL/M, XPL, PL/P, PL/C, PL/S, PL/AS, PL/X, PL/8 and EPL. While we do not suggest that Visustin is fully compatible with them, we encourage you to try Visustin and report your findings to us. Visustin is tolerant of small syntactical changes and dialects and it can readily process subsets of PL/I. We may add proper support for PL/I dialects in a future version if there is demand.

©Aivosto Oy Visustin Help