Previous Topic Next topic Print topic


Environment Variables

These are the most common environment variables that can be used with the Micro Focus products.

The following environment variables are set in the system registry. You can change the values using the SET command, but values you set are only added to the values already set in the registry.

CCITCP2 Specifies the machine that the CCITCP2 daemon is running on.
COBCPY The location of COBOL copybooks.
COBDATA Specifies the locations in which to search for data files.
COBDIR The location of the COBOL system directory.
COBHNF The location of .hnf files.
COBPATH Specifies the locations in which to search for .int, .gnt and .lbr files.

To specify more than one location, use the ; (semicolon) separator .

LIB Tells the Linker where to find .lib files.
INCLUDE Specifies which directories should be searched for such things as resource include files.
PATH Indicates which directories Windows should search for executable files.

The following environment variables can be set from within your environment using the SET command:

COBCONFIG_ The location of COBOL configuration files.
COBCONFIG.BLOCK The location of the application configuration file.
COBFSTATCONV Specifies name of a user-supplied module that the Callable File Handler should use to convert the file status codes if an I/O error is encountered on a file.
COBIDY The location of debugger .idy files.
COBLANG Tells the COBOL system in which language environment you want to run your COBOL program. COBLANG can be used in conjunction with third party products using values of the LANG environment variable which are in a different format than that used by the COBOL system.
COBPRFDIR Specifies a directory to be used for storing .ipf files created by programs compiled with the PROFILE compiler directive.
COBSW Used to pass COBOL run-time system and user switch settings to user application programs.
DD_ Used to identify environment variables that define file-name mappings.
ENTRYNAMEMAP Specifies entry name map files and folders containing them.
EXTFH Specifies the File Handler configuration file to use.
FHREDIR Used to override the default configuration filename a Fileshare V2 client program user.
FSIDXINTEGRITY When this is set to OFF, this writing to disk any changed nodes held in the index cache, until space in the cache is needed for other nodes.
HELPFILES The list of files to be loaded at initialization by HyHelp.
LANG Tells the system in which language environment you want to run your program.
MAINFRAME_FLOATING_POINT Specifies the floating point format used.
MFCSCFG Specifies a configuration file to be used by the Client/Server Binding client program. It is also used by the Client/Server Binding server program when the srvtier facility is used.
MFJSERET Determines the response to an unsuccessful sort, copy or merge operation. Set to ABEND for an unsuccessful operation to abend and its program to continue instead of terminating with an unrecoverable error (return code 16).
MFJSTATS When this is set to ON, creates a report containing statistics for the SORT that is displayed to SYSOUT. If a report file already exists for a previous SORT, the new statistics are appended to the end of the previous one.
MFEXTMAP Used by the External File Mapper to locate the file mfextmap.dat.
MFLOGDIR Specifies a directory to be used by the Client/Server Binding for log files.
OOSW Used to set run-time switches that effect OO programs.
SORTCOMPRESS Tells the system whether or not to execute a compression routine on each record to be sorted. SORTCOMPRESS=5 allows for run-length encoding of sort records, resulting in much better performance when records contain multiple repeated characters. Note that 5 is the only valid value for this.
SORTSCHEME Use in conjunction with SORTSPACE for improved performance. This is activated by setting SORTSCHEME=1. This is the only valid value for the environment variable. See SORTSPACE below for more information.
SORTSPACE The amount of memory to be allocated to internal workspace for SORT operations. This can be specified in different formats: for example, you could specify 64M, 2G, and 1000000 to give sort memory areas of 64 Megabytes, 2 Gigabytes and 1000000 bytes respectively.
Typically, increasing SORTSPACE will improve the overall performance of your SORT. This can be further improved by the use of SORTSCHEME when the files to be sorted are over 1GB. Consider:
  • Setting SORTSCHEME when your files are in excess of 1GB.
  • The size of the record minus the key-size when setting SORTSCHEME on.
  • The SORTSPACE levels for SORTSCHEME. The following are the minimum settings for SORTSCHEME to take effect with the key size:
    • 1Mb or greater - records up to 5k non key
    • 4Mb or greater - records of 12K non key
    • 8Mb or greater - records of 28K non key
    • 16Mb or greater - records of 62k non key
    • For very large SORTs, a greater SORTSPACE maybe required.
  • Setting SORTSPACE to a higher value may result in more temporary file space being used.
SORTTEMPSPACE The amount of temporary memory to be allocated to internal workspace for SORT operations. This can be specified in different formats much like the SORTSPACE environment variable. By using SORTTEMPSPACE, you can maximize available memory.

To maximize the use of available memory to improve performance, particularly in systems suffering from memory fragmentation, the memory allocation strategy used by SORT can be adjusted through use of the SORTTEMPSPACE environment variable. Increasing the amount of SORTTEMPSPACE can help prevent "SORT020U SORT(EXTSM) failed - sort engine status = 9/105" error messages.

SORTTYPE Setting SORTTYPE=2 forces SORT to use the file handler, so that format modifications are picked up from the extfh.cfg file. Not setting this means SORT will try to use CBL_ routines to read and write files to improve performance. Note that 2 is the only valid value for this environment variable.
TESTCOVER Enables you to use the test coverage tool, which creates a statistical execution profile of a program. This should be set to the path of the test coverage configuration file.
TMP Tells the run-time system where to put paging files Normally it puts these files in the current directory. By using TMP you can specify a different drive or path for them.
Previous Topic Next topic Print topic