Skip to content

Blu Age not able to parse AIF macro in BMS during transformation of codebase

0

I'm encountering the following error in Blu insights when transforming a BMS map definition: "Error during BMS parsing (unexpected macro type: "AIF" in line " AIF ('&SYSPARM' EQ 'DSECT').SKIPSD")" (AIF - Assembler If)

The relevant code snippet is:

         AIF   ('&SYSPARM' EQ 'DSECT').SKIPSD
CSQ4VDM  CSECT
CSQ4VDM  AMODE 31
CSQ4VDM  RMODE ANY
.SKIPSD  ANOP ,
         PRINT NOGEN
CSQ4VDM  DFHMSD TYPE=&SYSPARM,MODE=INOUT,CTRL=(FREEKB),                *
               LANG=COBOL,STORAGE=AUTO,TIOAPFX=YES,TERM=3270-2

How to solve this?

asked 2 years ago144 views

1 Answer
1

The error you're encountering during the BMS parsing in Blu Age transformation is related to the AIF (Assembler If) macro, which is not directly supported by the Blu Age parser. This is a common issue when transforming legacy mainframe code that includes assembler macros.

To resolve this issue, you can try the following approach:

  1. Add a new Metadata section in the Transform step of your workflow.

  2. Configure this Metadata section with these details:

    • Type: File
    • Name: */
    • Properties: Select the 'encoding' property
    • Order: Move this to the last position
    • Update the property value to 'UTF-8' (Make sure to include the hyphen; 'UTF8' without the hyphen will not work)

This solution addresses potential file encoding issues that can cause the transformation engine to misread or fail to recognize certain macros in your files. By explicitly setting the encoding to UTF-8 for all files, you ensure that the engine can properly parse the content.

If this doesn't resolve the issue, you may need to manually preprocess the BMS file to remove or comment out the AIF macro and any other assembler-specific directives that Blu Age doesn't support. You could replace the AIF macro with an equivalent BMS-compatible construct or remove it entirely if it's not essential for the map definition.

For example, you might modify your code to:

*        AIF   ('&SYSPARM' EQ 'DSECT').SKIPSD
CSQ4VDM  CSECT
CSQ4VDM  AMODE 31
CSQ4VDM  RMODE ANY
*.SKIPSD  ANOP ,
         PRINT NOGEN
CSQ4VDM  DFHMSD TYPE=&SYSPARM,MODE=INOUT,CTRL=(FREEKB),                *
               LANG=COBOL,STORAGE=AUTO,TIOAPFX=YES,TERM=3270-2

After making these changes, try running the transformation again. If you continue to experience issues, you may need to review the entire BMS file for other assembler macros or directives that could be causing problems and handle them similarly.
Sources
AWS Blu Age Level 3 Self-Paced Troubleshooting Workshop - Codebase transformation - Transform Error | AWS re:Post
L3 Troubleshooting Workshop- Fatal errors when transforming project scope | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.