Created On:  04 November 2010

Problem:

First, some background on .ipf files:

.ipf files are created when using the Profiler facility in Server Express. This is the procedure to do that:

1. Use the PROFILE compiler directive with the cob command when compiling the program. That directive can be set in a number of ways, such as usage in a directives file or by placement in the compile command after the -C flag, as in this example:

    cob -xv -C PROFILE {program-name}

This creates an executable which can then be used to create the .ipf file.

(Note: .ipf files can also be created using .int, .gnt and .so files, not just when using executables. You would of course still use the PROFILE compiler directive as indicated in the compile commands used to create the .int, .gnt and .so files).

2. The .ipf file is then created when you run the program:

    cobrun {program-name}

This results in a .ipf file being created in your current working directory.  How can you then redirect where those .ipf files are placed?

Resolution:

To have the .ipf files placed someplace other than in your current working directory, follow this procedure:

1.  Create a directory where you want the files to be placed. For example, you can create a "myipfdir" directory off the current working directory:

    mkdir myipfdir

2.  Next, set the COBPRFDIR environment variable, such as in this example using the Korn shell:

    export COBPRFDIR=$PWD/myipfdir

3. Execute

    cobrun {program-name}

Examination will show that the .ipf file has been placed in the directory pointed to by the COBPRFDIR environment variable.