PROC and END-PROC statements
The PROC statement defines the beginning of a procedure in a JOB or SORT Activity Section. The END-PROC terminates the scope of the PROC.
A procedure can be perceived as a group of statements that perform a specific processing function.
Parameters
- &PROCNAME
- A label that identifies the procedure. It can:
- Be 128 characters in length
- Contain any character other than a delimiter
- Begin with A-Z, 0-9, or a national character (#, @, $)
- Not consist of all numeric characters
- STATEMENTS
- Any Easytrieve statements that are valid in the JOB or SORT Activity Section
- END-PROC
- Indicates the end of the defined procedure. END-PROC is required for each declared procedure name.
File I/O statements such as PUT or GET cannot be coded in procedures coded during SORT or REPORT processing.
Perform statement can be used to invoke other procedures from any given proc. Recursion is not permitted.
COBOL paragraph names can be 1 to 30 characters in length. All paragraph names longer than 30 characters are truncated by Migration Utility to conform to COBOL Standards.
