Previous Topic: IF Processing Subroutine for JCLNeatNext Topic: JCLLIB Processing Subroutine for JCLNeat


PROC Processing Subroutine for JCLNeat

The PROC processing subroutine checks for anything that is related only to PROC statement processing. You can still reference the JOB, EXEC, DD, and other statement variables as needed. Only one PROC statement is active at any one time.

/******************************************************************************/
/*  PROC Processing Logic                                                     */
/******************************************************************************/
/*  The value of all PROC variables are only maintained within a given        */
/*  PROC statement. When another statement is encountered, the values change. */
/******************************************************************************/
A    PROC_PROCESSING:
B     If PROC.PARM_COUNT > 0 then
      Do
        Say 'PROC.PROCNAME is '||PROC.PROCNAME
        Say 'PROC.PARM_COUNT is '||PROC.PARM_COUNT
        Do I = 1 TO PROC.PARM_COUNT
          SAY 'Parm '||I||' 'PROC.PARM_NAME.I'='PROC.PARM_VALUE.I
        End
      End
C    Return
A

Defines the name of this subroutine to the DO WHILE loop.

B

IF statement selects PROC statements that have at least one parameter and then lists out all supplied parameters and their values.

C

Causes control to return to the main DO WHILE loop.