Previous Topic Next topic Print topic


Compiling Assembler Copybooks and Macros Containing EXEC CICS Statements

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:

  1. Right-click the program in Solution Explorer, and then click Properties.
  2. Specify the following build settings on the CICS Support page; then click OK:
    1. Ensure EXEC CICS is checked.
    2. Click Options.
    3. Check or uncheck Insert standard prolog macros (DFHEIENT, DFHEIEND & DFHEISTG) and Insert standard epilog macro (DFHEIRET) as 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.
    4. Click Close.
  3. Compile the module - right-click the file in Solution 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).

  4. 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.
Previous Topic Next topic Print topic