The assembler component is not integrated into the Enterprise Developer IDE, so all programs and data tables must be assembled and linked from a command prompt. To do this in Enterprise Developer perform the following steps:
MFASM <filename.MLC> [options] [;]
The most commonly-used assembly and linking options are:
Assembler executable subroutines are produced by running MFASM.EXE from a command line as follows:
MFASM TEST.MLC
This command will produce the following files:
In normal usage the following command line is used:
MFASM TEST.MLC NOANIM
Here the NOANIM option is also used to suppress the generation of unnecessary debug files. The resulting TEST.390 executable should be moved to the same subdirectory as other cobol executables in the application. At CALL time the cobol run time will search for and load executables with the .390 extension as it would any other executable file with extensions such as .DLL, .GNT, .INT etc.
Assembler data tables are produced by using the OMF (MOD) directive to generate files with the .MOD extension as follows:
MFASM TEST.MLC OMF(MOD)NOANIM NOLIST
The resulting TEST.MOD file should be moved into the same directory as other cobol executables where it is assumed that a CICS cobol program will load it into memory by use of the EXEC CICS LOAD command.
The OMF(OBJ) option can be used to only assemble a module and not automatically invoke the assembler linker.
Command line compatibility with the assembler component of Mainframe Express is maintained. Batch files used with Mainframe Express should work correctly under Enterprise Developer. In particular the MF370CHK (Micro Focus 370 Checker) module along with the MM370ASM (standalone assembler) and the MF370LK (standalone assembler linker) are present. So command lines used under Mainframe Express to assemble and link assembler modules will work:
RUN MF370CHK TEST.MLC OMF(390) NOANIM NOLIST;
as will command lines that assemble and link modules in separate commands:
RUN MM370ASM TEST.MLC NOANIM; RUN MF370LNK TEST.OBJ NOANIM NOLIST OMF(390);
The assembler in Enterprise Developer is the same assembler in the Micro Focus Mainframe Express product so it is possible to specify input and output directories for assembler macros, copybooks and other files in environment variables, configuration files or both. We supply a sample configuration file, MF370CTL.CFG, as an example. This file is located by default in the %ProgramFiles%\Micro Focus\Enterprise Developer\bin directory.
A series of SYSxxx variables control where input and output files can reside. All can be set using environment variables and any environment variable setting overrides any setting in an MF370CTL.CFG file. The relevant variables are listed in the tables below.
The following environment variables take a single directory:
Variable | Description |
---|---|
SYSIN | Macro input .MLC files |
SYSLIST | Assemble and Link listing files .MAT .PRN .LST |
SYSWORK | Assemble, Link and Animator/370 work files .BAL .IDF/.IDX |
SYSPUNCH | Assemble output .PCH files for PUNCH statements |
SYSMPC | Assemble input precompiled macros .MPC |
SYSLIN | Link input .LIN files and Assemble output .OBJ files |
SYSLMOD | Link output load-member .390 files |
The following environment variables take multiple directories
Variable | Description |
---|---|
SYSLIB | Assemble input macro and copy files .MAC .CPY |
OBJ370 | Link input .OBJ files (must contain SYSLIN) |
The following environment variable takes a single parameter:
All output directories are single directories but input variables will take multiple directories, separated by semicolons, which allows a user to specify several directories to be searched for macro and copy files. For example:
SET SYSLIB=.;C:\SYSLIB;C:\USERLIB1;"C:\USERLIB2 MFASM TEST.MLC"
tells the assembler to search the listed directories, in order, for macro and copy files as they are encountered during assembly. By setting SYSLMOD output files such as .390 files can be directed to specific output directories.
The assembler looks for MF370CTL.CFG in the current working directory before searching for it in the default location.