Skip to main content

This article provides a sample Extfg.Cfg file for Mainframe Express.

Problem:

The EXTFH configuration file and its options are not documented in Mainframe Express.

Resolution:

This is being addressed with an open documentation request, RPI 1060072, asking that we include the EXTFH configuration file description and its options in the Mainframe Express documentation. Although this file and its options are not documented yet, it is honored by Mainframe Express.

A sample file is listed here:

[XFH-DEFAULT]

# for MFE place at root of project or

# set environment variable as:

# set extfh=filename.cfg

# or

# set extfh=c:\\mydir\\filename.cfg

mainframeprint=on

[lorince.lv0701.dat]

openinputshared=on

trace=on

TraceFileName=c:\\mfetraces\\trace.xfh

[lorince.large.qsam.dat]

filemaxsize=8

[lorince.large.vsam.dat]

idxformat=8

filemaxsize=8

filepointersize=8

[lorince.A811.dat]

# places entire file into memory during open, remains there until close

loadontoheap=on

Notice the following about the Extfh.Cfg file:
  • It is a Text file and as such can be created using the Mainframe Express IDE Editor. It is our recommended Editor of choice because each line will be terminated in the expected format (x'0D0A', Carriage Return/Line Feed).
  • A comment is the character '#' in the first column.
  • The header line must be capital letters within square brackets: [XFH-DEFAULT] and must start in column 1 just as all options specified in the Extfh.Cfg file.
  • As seen in the comments in this sample, the file can be placed at the root of the Mainframe Express project folder (the location where the .MVP file exists) or it can be pointed to by the environment variable EXTFG and it must point to the filename, not just a pathname.
  • Blank lines are ignored as is the case used in the filenames and options.

The sample uses these definitions:
  • mainframeprint=on, this is used for WRITE AFTER ADVANCING or WRITE BEFORE ADVANCING statements, this option determines if a mainframe printer file format (filetype 11) will be used. In this case, it is set globally for all files in the project.
  • The section labeled ' [lorince.lv0701.dat] ' means the options following this label apply only to this file. For this file:

    openinputshared=on, means other users can have the file open but for INPUT only.

    trace=on, set tracing on just for this individual file.

    TraceFileName=c:\\mfetraces\\trace.xfh, names the trace file. Note that it specifies a complete path and filename but it could use just a filename if the trace file is to be written to the current/working directory.

  • The section labeled, ' [lorince.large.qsam.dat] ' illustrates the option to use for large QSAM files over 2Gig with the option 'filemaxsize=8' .
  • The section labeled, ' [lorince.large.vsam.dat] ' illustrates the option to use for large VSAM files over 2Gig with the options 'idxformat=8' 'filemaxsize=8' 'filepointersize=8' .
  • The section labeled, ' [lorince.A811.dat] ' has a comment describing the option 'loadontoheap=on' which means the Micro Focus File Handler loads the entire file into memory when it opens the file, then executes all I/O operations on the file in memory, and writes the file back to disk when it is closed.

There are many other options available, but this sample can be used as a template for a starting place in using EXTFH in Mainframe Express.

Incident Number: 2157104 2177297

Old KB# 14646

#EnterpriseDeveloper
#MFDS