IBM Support

PM11756: Some IF and WHILE statements are incorrectly converted by the VisualAge Generator to EGL Migration tool

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Rational Business Developer V7.5.1.4:
    
    Some IF and WHILE statements are incorrectly converted by the
    VisualAge Generator to EGL Migration tool.
    
    Case 1:
    
    Problem description:
      The OR or AND keywords are not converted to the EGL equivalent
      || and && in IF or WHILE statements.  Instead the MISSINGAND
      or MISSINGOR keywords are substituted for the logical
      operators.  Additionally, in the logical expression that
      follows the OR( or AND( :
    
      - The VisualAge Generator comparison operator is not converted
        to the equivalent EGL comparison operator.
      - The variable, comparison operator, and second variable are
        all smashed together without any blanks.
    
      The following is an error message that is generated when this
      problem occurs:
    
        IWN.SYN.2105.e Syntax error.  "||" expected instead.
    
      When this occurs:
        This problem occurs when there is no blank between the OR or
        AND keywords and the (.  For example, OR( and AND(.
    
    Examples:
      Example 1 shows an example of this problem.
    
        - The EGL statement has MISSINGAND in the middle of an IF
          statement
    
             || (WSPEP64.DRICR == "Y"
            MISSINGAND(WSSPDWLL-S.DSTORMSH="Y" || WSSPPIT-S.DSTSHGL
              == "Y" || WSSPPIT-S.DRFWLA == "8")))
    
        - The corresponding External Source Format (ESF) statement
          has:
    
            OR (WSPEP64.DRICR = 'Y'
            AND(WSSPDWLL-S.DSTORMSH = 'Y' OR WSSPPIT-S.DSTSHGL = 'Y'
            OR WSSPPIT-S.DRFWLA = '8'));
    
          where the AND( is smashed together at the beginning of the
          second line.
    
      Example 2 shows a case with MISSINGOR and how to manually fix
                the source.
    
        - ESF Source
    
            OR(WSPNPCM.DPRCST EQ 'NY' AND WSSPDWLL-S.DSTORMSH = 'Y')
            OR (WSSPDWLL-S.DSTORMSH = 1 OR WSSPDWLL-S.DSTORMSH = 2
              OR(WSSPDWLL-S.DSTORMSH = 3)
    
        - Bad EGL Source
    
            MISSINGOR(WSPNPCM.DPRCSTEQ"NY" && WSSPDWLL-S.DSTORMSH ==
            "Y") || (WSSPDWLL-S.DSTORMSH == 1 ||
            WSSPDWLL-S.DSTORMSH == 2MISSINGOR(WSSPDWLL-S.DSTORMSH=3)
    
        - Corrected EGL Source
    
            || (WSPNPCM.DPRCST == "NY" && WSSPDWLL-S.DSTORMSH ==
            "Y") || (WSSPDWLL-S.DSTORMSH == 1 ||
            WSSPDWLL-S.DSTORMSH == 2 || (WSSPDWLL-S.DSTORMSH == 3)
    
        In this example:
    
        - The MISSINGOR phrase is incorrectly substituted for the
          logical operator and does not include a blank on either
          side of MISSINGOR so it is smashed together with the
          following variable, comparison operator, and second
          variable.
        - In the logical expression that follows the OR(
          - The VisualAge Generator comparison operator is not
            converted to the equivalent EGL comparison operator.
            For example, the EQ is not converted to == and = to ==.
          - The variable, comparison operator, and second variable
            are all smashed together without any blanks.
          - This could happen following an AND( also.
    
    Case 2:
    
    Problem description:
      This is similar to case 1.  The OR or AND keywords are not
      converted to the EGL equivalent || and && in IF or WHILE
      statements.  In the logical expression that follows the )OR or
      )AND :
    
      - The VisualAge Generator comparison operators are not
        converted to the equivalent EGL comparison operators.
      - The variable, comparison operator, and second variable are
        all smashed together without any blanks.
    
      The following is an error message that is generated when this
      problem occurs:
    
        IWN.SYN.2106.e Syntax error.  Delete this token.
    
    When this occurs:
      This problem occurs when there is no blank between the ) and
      the OR or AND keywords.  For example, )OR and )AND.
    
    Examples:
    
      Example 1 shows an example of this problem with the specific
                error message received.
      - The EGL statement has the AND and the variable that follows
        it smashed together and also the LT and the number
    
          if ((WSSPCUS-S.DCANTR == "0" || WSSPCUS-S.DCANTR ==
            "00")ANDWSPEACM.DEFFDTLT080704)
    
      - The corresponding ESF statement is:
    
          IF (WSSPCUS-S.DCANTR = '0' OR WSSPCUS-S.DCANTR = '00')AND
            WSPEACM.DEFFDT LT 080704;
    
        where the AND is smashed against the previous ).
    
      Example 2 shows a case with both OR and AND and how to
                manually fix the source.
    
      - ESF Source
    
          IF ((WSSPCUS-S.DCANTR NE '0')OR WSSPCUS-S.DCANTR EQ
            '00')AND WSPEACM.DEFFDT GT 080704;
    
      - Bad EGL Source
    
          if (((WSSPCUS-S.DCANTR !=
            "0")ORWSSPCUS-S.DCANTREQ"00")ANDWSPEACM.DEFFDTGT080704)
    
      - Corrected EGL Source
    
          if (((WSSPCUS-S.DCANTR != "0") || WSSPCUS-S.DCANTR ==
            "00") && WSPEACM.DEFFDT > 080704)
    
      In this example:
    
      - The OR or AND are not converted to the EGL equivalent || and
        &&.
      - In the logical expression that follows the  )OR or )AND :
        - The VisualAge Generator comparison operators are not
          converted to the equivalent EGL comparison operators.  For
          example, the EQ is not changed to == and the GT is not
          changed to >.
        - The variable, comparison operator, and second variable are
          all smashed together without any blanks.
    
    Case 3:
    
    Problem description:
      Missing closing ) in IF and WHILE statements where the IN
      operator is used to search for a value in a table column with
      a starting index provided.
    
      The following is an error message that is generated when this
      problem occurs:
    
        IWN.SYN.2110.e Syntax error.  ")" expected before this
                       token.
    
    When this occurs:
      This problem occurs when a starting index is provided.
    
    Examples:
    
      Example 1 shows an example of this problem.
    
      - The EGL statement is missing a ) on the 4th line.
    
          if (((WPSEA10.DCOVID == "HLG"
             && "DLG" in WAPCOV.DCOVID from WPSEA10.DCNT04)
             || (WPSEA10.DCOVID == "HNC"
             && "DNC" in WAPCOV.DCOVID from WPSEA10.DCNT04)
             && sysVar.arrayIndex <= WPSEA10.DCNT05)
    
      - The corresponding ESF statement and has the extra )/
    
          IF ((WPSEA10.DCOVID EQ 'HLG'
            AND 'DLG' IN WAPCOV.DCOVID[WPSEA10.DCNT04])
            OR (WPSEA10.DCOVID EQ 'HNC'
            AND 'DNC' IN WAPCOV.DCOVID[WPSEA10.DCNT04]))
            AND EZETST LE WPSEA10.DCNT05;
    
      Example 2 shows how to manually fix the source by adding the
                missing closing ).
    
      - ESF Source
    
          AND 'DNC' IN WAPCOV.DCOVID[WPSEA10.DCNT04]))
    
      - Bad EGL Source
    
          && "DNC" in WAPCOV.DCOVID from WPSEA10.DCNT04)
    
      - Corrected EGL Source
    
          && "DNC" in WAPCOV.DCOVID from WPSEA10.DCNT04))
    

Local fix

  • A temp fix is available from support.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Users Affected: The VAGen to EGL migration customers.
    Problem description:
    OR(   and  AND(     -- no blank between the OR or AND and
    the (
    substitutes the phrase MISSINGOR   or MISSINGAND   for the
    logical operator and does not include a blank on either side
    of MISSINGOR or MISSINGAND -- so smashed together with other
    things
    in the logical expressing that follows the OR( or AND(:
    does not convert the VAGen comparison operator to the
    equivalent EGL comparison operator  (e.g. does not convert
    EQ to ==   or = to ==)
    smashes the variable, comparison operator, and 2nd variable
    all together without any blanks
    Example:   red shows the error;  blue shows the ESF source
    and the corrected EGL source
    ESF Source
        OR(WSPNPCM.DPRCST EQ 'NY' AND WSSPDWLL-S.DSTORMSH = 'Y')
    /* @270 AC23270
        OR (WSSPDWLL-S.DSTORMSH = 1 OR WSSPDWLL-S.DSTORMSH = 2
    OR(WSSPDWLL-S.DSTORMSH = 3)    /* @336 AC39160-001
    Bad EGL Source
      MISSINGOR(WSPNPCM.DPRCSTEQ"NY" ?? WSSPDWLL-S.DSTORMSH ==
    "Y")     /* @270 AC23270*/
       || (WSSPDWLL-S.DSTORMSH == 1 || WSSPDWLL-S.DSTORMSH ==
    2MISSINGOR(WSSPDWLL-S.DSTORMSH=3) /* @336 AC39160-001*/
    Corrected EGL Source
       || (WSPNPCM.DPRCST == "NY" ?? WSSPDWLL-S.DSTORMSH == "Y")
           /* @270 AC23270*/
       || (WSSPDWLL-S.DSTORMSH == 1 || WSSPDWLL-S.DSTORMSH == 2
    || (WSSPDWLL-S.DSTORMSH == 3) /* @336 AC39160-001*/
    
    
    )OR   and  )AND(     -- no blank between the ) and the OR or
    AND
    does not convert the OR or AND to the EGL equivalent  || and
    ??
    in the logical expressing that follows the  )OR or )AND
    does not convert the VAGen comparison operator to the
    equivalent EGL comparison operator  (e.g. does not convert
    EQ to ==   or = to ==)
    smashes the variable, comparison operator, and 2nd variable
    all together without any blanks
    Example:  red shows the error; blue shows the ESF source
    and the corrected EGL source:
    ESF Source
       IF ((WSSPCUS-S.DCANTR NE '0')OR WSSPCUS-S.DCANTR EQ
    '00')AND WSPEACM.DEFFDT GT 080704;
    Bad EGL Source
     if (((WSSPCUS-S.DCANTR !=
    "0")ORWSSPCUS-S.DCANTREQ"00")ANDWSPEACM.DEFFDTGT080704)
    Corrected EGL Source
     if (((WSSPCUS-S.DCANTR != "0") || WSSPCUS-S.DCANTR == "00")
    ?? WSPEACM.DEFFDT ? 080704)
    
    if/while IN where the table has a starting index
    seems to lose a closing )
    Example:  blue shows the missing )
    ESF Source
        AND 'DNC' IN WAPCOV.DCOVID[WPSEA10.DCNT04])) /* (06)
    Bad EGL Source
       ?? "DNC" in WAPCOV.DCOVID from WPSEA10.DCNT04) /* (06)*/
    Corrected EGL Source
       ?? "DNC" in WAPCOV.DCOVID from WPSEA10.DCNT04)) /* (06)*/
    

Problem conclusion

  • Code has been updated to fix the problem.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM11756

  • Reported component name

    VAGEN2RBD MIGRA

  • Reported component ID

    5724S5002

  • Reported release

    751

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-04-07

  • Closed date

    2010-10-14

  • Last modified date

    2010-10-14

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    VAGEN2RBD MIGRA

  • Fixed component ID

    5724S5002

Applicable component levels

  • R751 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
14 October 2010