Compiling an Assembler copybook or macro that contains
EXEC CICS statements results in error
ASMCM0060S ("Undefined operation code") if the file extension
.MLC is used instead of
.CAP.
This is because with these extensions, the
EXEC CICS statements are not pre-processed before the copybook or macro is compiled, and the Assembler Compiler tries to interpret the
EXEC statement as a macro. This results in the
ASMCM0060S error mentioned above.
If Assembler modules with
EXEC CICS in them are given the file extension
.CAP, then the assembler runs the Assembler CICS preprocessor on them before assembling, and no errors result.
You can also set
Enterprise Developer to run the Assembler CICS preprocessor on an assembler file with the
.MLC extension. To do this, perform the following additional steps:
- Right-click the program in
COBOL Explorer, and then click
Properties.
- Click
Assembler Compiler > CICS Preprocessor and specify the following build settings on the page:
- Check
Enable file specific settings.
- Check
Use CICS preprocessor.
- Ensure
Insert standard prolog macros (PROLOG) and
Insert standard epilog macro (EPILOG) are set to
True, if needed for your Assembler module. For example, if your module has already coded an
EXEC CICS compatible prolog then there is no need for the Assembler CICS preprocessor to insert one.
- Click
OK.
If you have not changed the Eclipse defaults, the IDE now performs a build and compiles the program with your changes.
- Compile the module -
By default, Eclipse compiles the entire project when it detects changes in any of the sources. If you have disabled the default behavior (by clicking
Project and disabling
Build Automatically), to compile an individual program, right-click the file in COBOL Explorer and click
Compile.
.
This creates
loadlib\<program name>.bal (the preprocessor output with macros expanded) and
loadlib\<program name>.pac (the preprocessor output without macros expanded).
- Copy
loadlib\<program name>.pac to
copylib\program name.cpy as appropriate.
You can now compile without errors.
Note: We recommend you create a separate
Enterprise Developer project to handle Assembler copyboooks and macros that contain
EXEC CICS statements as this enables you to keep your other projects separate from those that require special processing.