Previous Topic Next topic Print topic


% INCLUDE

Open, read, and process a user-defined rule, copybook, or other file in a AMB program.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax:

% INCLUDE directory(filename)

Comments:

  • Use % INCLUDE to include copybooks when either of the following conditions are true.
    • You use a COBOL compiler other than OS/VS COBOL
    • Your copybook contains an indexed table
  • Use a COBOL COPY statement to including copybooks, when both of the following conditions are true.
    • You use an OS/VS COBOL compiler
    • Your copybook does not contain an indexed table
  • You can code % INCLUDE in a file that is INCLUDEd; you can have up to ten levels of nested INCLUDEs.
  • Always use a SY* keyword, such as SYM1, with an % INCLUDE to specify where to put the included file in the program.

Examples:

Include a rule at the top of the program.

   SYM1   % INCLUDE USERMACS(MY-RULE)

Include a rule at the bottom of the program.

   SYBT   % INCLUDE USERMACS(MY-RULE)

Include a copybook in Working-Storage.

   SYWS   % INCLUDE COPYLIB(MY-COPYBOOK)

Include a copybook in Linkage.

   SYLK   % INCLUDE COPYLIB(MY-COPYBOOK)
Previous Topic Next topic Print topic