Keep programs small and manageable—500-1000 lines is the maximum length recommended.
Structured programming operations should be used where possible. For example, use IF rather than GOTO. The corresponding END and ELSE statements should indicate the matching operations by means of comments.

Use SELECT structures in preference to nested IF/ELSE statements— they are easier to follow:

Note: Avoid nesting structured programming operations too deeply, such as more than four or five levels of nesting in a given procedure level. If more are needed, use another procedure.
Programs should be as structured as possible. A program is not ‘structured’ just because it only uses structured operation codes. A structured program is one that is modularized in an efficient way, and built up out of the structured programming constructs - SEQUENCE, SELECTION (CASE) or ITERATION, and structured combinations thereof. The constructs might even be implemented logically (for instance with GOTOs and labels used in a structured manner) rather than with specific HLL structured operation codes.
Avoid testing compound negative conditions when possible—they are harder to understand, for example, not:

The PL/1 statements used to code the reading of a group of records from a file should be highly standardized. A standard loop:

| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |