Skip to main content

Problem:

We are using a network location to share our source and executable files. For administrative reasons, we move the files from one network location to another, but after doing so; we find that we start getting error messages saying the source is not available. Doing a new re-compile at the new location resolves these error messages, but is there a way to avoid them?

Resolution:

The problem stems from the fact that the Micro Focus IDY file contains a hard-coded path to the sources (cbl and cpy files) by default. So when you moved the files, the path was no longer valid and we issued the error message about not being able to find the source. A re-compile resolved this by updating the path to the new location(s).

There is a way past this. We have a directive that will tell the compiler to not use hard-coded paths. In MFE (Mainframe Express), one can add at the project level for the Build settings the Additional Directive of IDYSRCPATH(). The parenthesis with nothing between them means use no path. The source files will be found using the project's Workgrouping. The documentation will be updated later for Mainframe Express, but

the Net Express Help contains the same directive:  

  

IDYSRCPATH

Controls the paths stored in .idy files for main source files.

Syntax:

>>-.---.-.----IDYSRCPATH-(-.----------.-)---.-.><

    -/- |                  -src-path-        |

         |                                    |

          ----NOIDYSRCPATH--------------------

Parameters:

src-path The path to insert into .idy files to override the

actual paths of main source files.

Properties:

Default: NOIDYSRCPATH

Phase: Syntax check

$SET: No

Comments:

NOIDYSRCPATH causes the names of main source files to be

stored in .idy files with their actual paths.

IDYSRCPATH(src-path) causes the names of main source files to be

stored in .idy files with their actual paths replaced by src-path.

IDYSRCPATH() causes the names of main source files to be

stored in .idy files with no paths.

Changing the main source file paths stored in .idy files

enables you to compile files on one machine then move them

to another machine and still have the debugger find all the

files it needs. To do this you would also need to set the

COBIDY, GNT and INT directives.

Old KB# 4157

#EnterpriseDeveloper
#MFDS