Easytrieve Plus Standards

Area:
Language

Topic:
Easytrieve Plus

Standard:
Production Easytrieve Plus must be written according to specified guidelines.

Procedures:
Easytrieve Plus programs should be organized as follows:

Environment Definition Section
Standard Heading
Library Definition Section
  File Descriptions
  Working Storage
Activities Definition Section
  JOB(s) and/or SORT(s)
  Logic
  PROC(s)
  REPORT(s)
  Special Reporting Procedures

Do not code LIST OFF for production programs.

Align all library definitions and code neatly and consistently. Continuation lines should be neatly indented.

A comment should be placed in the program's standard heading (under PARMS) to describe each substitution parameter.

All production files should use standard DD names.

All production files should have file descriptions in an Easytrieve Plus MACRO member.

All Easytrieve Plus production file descriptions should be prefixed with LIB.

All variables should use standard names.

System-defined edit masks should be used. To define a program-specific edit mask in Easytrieve Plus, use letters P through Y.

Indicate input file name(s) on the JOB statement.

Use a START procedure for initialization prior to the first record being read. Use a FINISH procedure for end-of-file processing.

Use adequate comment lines to explain complicated processing. Comments should indicate the purpose of code sections rather than the detail of how the code segment works.

Use procedures to perform repetitive or complex logic.

Avoid use of the REPORT-INPUT procedure.

Use descriptive procedure names. START procs should be named START-PROC and FINISH procs should be named FINISH-PROC.

When accessing a file by means other than automatic input, check the FILE STATUS to insure that the process was conducted successfully.

Use standard modules to retrieve data from the standard table system.

When necessary, use a return code of 6 or 7 to indicate a condition within a program that may affect subsequent job steps.

Just prior to each REPORT statement, include a comment which gives the report name and purpose.

Include title, program name and date on all reports unless otherwise specified by the user.

Use setups for labels and special forms.

User output should not go to SYSPRINT. Send user output to PRTFLxx, where "xx" is a number starting with "01". Use "02", etc., for subsequent output in the program that will go to a different print form.

Use edit masks that display data in a standard, readable form. For example, dates should be in mm/yy (or mm/ccyy) or mm/dd/yy (or mm/dd/ccyy) format. Numeric data should normally not use "blank when zero".

Jobs using multiple form types should use separate print files (not SYSPRINT).

In the START-PROC, display all input parameters to SYSPRINT. Also display relevant data that is critical to the functioning of the program (e.g., computed fiscal year, calculated year, derived quarter, etc.)

Use GO TO JOB in PROCs with caution.

Align END-IF with its associated IF. Align END-PROC with its associated PROC.

Macro substitution variables should use standard variable names.

Align continuation characters. Copy it from the standard member.

Notes:
All standard members are in ISP14 Panvalet. These are as follows:

Standard Header: STDPLUS
Continuation Character: PLUS
Payroll Table Lookup: PPSEARCH
Other Table Lookup: SEARCH

Changes to default Easytrieve Plus parameters are in ISP32.IS.XREF with a member name of EZPOPTS.

Use standard Easytrieve Plus system-defined edit masks where appropriate.

Easytrieve Plus programs in Panvalet should have a Language Type of PLUS.

The EASYPLUS proc should be used on the EXEC statement of an Easytrieve Plus step in JCL.

Document program assigned return codes.

Sample Easytrieve Plus Program


Standards


Last Modified: Tuesday, 28-Nov-2000 10:37:16 CST

©1999 All Rights Reserved