Previous Topic Next topic Print topic


COPYSEARCH

Specifies how copybooks are located.

Syntax:

>>-.---.--COPYSEARCH--"parameter"-----------------><
   +-/-+

Parameters:

MF
Sets standard copybook search behavior, which is that if you specify only the copybook name, for example, COPY "mycopyfbook.cpy", the Compiler looks in the same directory as the source file and any locations specified by the COBCPY directive to locate the copybook.
RM
Emulates the standard RM copybook search behavior:
  • If you specify only the copybook name, for example, COPY "mycopyfbook.cpy", the Compiler looks in the current COBOL working directory (i.e. where the program is run from), not the same directory as the source file, to locate the copybook.
  • If you specify the full path to the copybook, for example COPY "c:\mydir\mycopybook.cpy", the Compiler will only search for the copybook of that name and in that location.
RM-EXPANDED
Emulates RM/COBOL's EXPANDED-PATH-SEARCH behavior, which is the same as COPYSEARCH"RM" and additionally, if a copybook cannot be located when you use a relative path, the path is appended to the value(s) set by COBCPY to try and locate the copybook.

Properties:

Default: COPYSEARCH"MF"
Phase: Syntax check
$SET: Initial

Dependencies:

DIALECT"RM" sets COPYSEARCH"RM" immediately.

Previous Topic Next topic Print topic