PROC

Generate the batch program template, including a PROCEDURE DIVISION USING clause that enables a called program to receive data from the calling program.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Target:

Non-IMS batch programs

Syntax:

 PROC   [variablename1 variablename2 ... variablenameN]

Comments:

  • Use PROC instead of NTRY in non-IMS batch programs called by other programs. Use NTRY for IMS programs.
  • Code Linkage Section data structures for the variables that the called program receives.
  • Code an NTRY, PROC, or OPT statement for each program.
    • The generated $TP-ENTRY generates a program template to send the appropriate window depending on the program invocation mode. To suppress the window and program invocation logic from your program template, code OPT PROG.
    • To generate a program template that fully defines all parts of your program except for the procedural code that you supply, code NTRY.

Examples:

Program Painter code:

 PROC   REC-2 REC-2 REC-3

Generated COBOL code:

PROCEDURE DIVISION USING REC-2 REC-2 REC-3