Level 66 and managed code

We're converting some REALLY old mainframe code to VC 2.3 for VS 2013 and we are getting a COBCH1710 when a Level 66 data item is referenced in the Procedure Division, specifically as an operand in an IF statement. I've dug around in the product documentation and can't find anything that says Level 66 shouldn't be used in managed code, but I've missed stuff in the past. Does anyone know of a restriction of Level 66 data items in managed code?
Parents
  • First, we're running 2.3 Update 1 also. Second, we are doing class libraries instead of console apps. And third, we found how to get rid of the error. But being a career mainframe procedural programmer, the only idea I have as to why this works would mean multiple instances sharing memory.

    This is what doesn't work:

          class-id Level66dll.Class1.

          working-storage section.

          01  PREV-BC-CTL.

            10  P-BRCLGROUP             PIC 9          VALUE ZERO.

            10  P-ENPG                  PIC 9          VALUE ZERO.

            10  P-ERATE                 PIC X(5)       VALUE SPACES.

            10  P-FORM                  PIC X          VALUE SPACE.

          66  P-BC-NPG-RATE  RENAMES P-BRCLGROUP THRU P-ERATE.

          method-id InstanceMethod.

          local-storage section.

          procedure division.

             MOVE SPACES TO P-BC-NPG-RATE

             if P-BC-NPG-RATE = spaces

                display "ok"

             else

                display "no"

             end-if

              goback.

          end method.

          end class.

    And this does:

          class-id Level66dll.Class1.

          working-storage section.

          01  PREV-BC-CTL.

            10  P-BRCLGROUP             PIC 9          VALUE ZERO.

            10  P-ENPG                  PIC 9          VALUE ZERO.

            10  P-ERATE                 PIC X(5)       VALUE SPACES.

            10  P-FORM                  PIC X          VALUE SPACE.

          method-id InstanceMethod.

          local-storage section.

          66  P-BC-NPG-RATE  RENAMES P-BRCLGROUP THRU P-ERATE.

          procedure division.

             MOVE SPACES TO P-BC-NPG-RATE

             if P-BC-NPG-RATE = spaces

                display "ok"

             else

                display "no"

             end-if

              goback.

          end method.

          end class.

    In a nutshell, can someone explain to this dinosaur what is going on in memory?

Reply
  • First, we're running 2.3 Update 1 also. Second, we are doing class libraries instead of console apps. And third, we found how to get rid of the error. But being a career mainframe procedural programmer, the only idea I have as to why this works would mean multiple instances sharing memory.

    This is what doesn't work:

          class-id Level66dll.Class1.

          working-storage section.

          01  PREV-BC-CTL.

            10  P-BRCLGROUP             PIC 9          VALUE ZERO.

            10  P-ENPG                  PIC 9          VALUE ZERO.

            10  P-ERATE                 PIC X(5)       VALUE SPACES.

            10  P-FORM                  PIC X          VALUE SPACE.

          66  P-BC-NPG-RATE  RENAMES P-BRCLGROUP THRU P-ERATE.

          method-id InstanceMethod.

          local-storage section.

          procedure division.

             MOVE SPACES TO P-BC-NPG-RATE

             if P-BC-NPG-RATE = spaces

                display "ok"

             else

                display "no"

             end-if

              goback.

          end method.

          end class.

    And this does:

          class-id Level66dll.Class1.

          working-storage section.

          01  PREV-BC-CTL.

            10  P-BRCLGROUP             PIC 9          VALUE ZERO.

            10  P-ENPG                  PIC 9          VALUE ZERO.

            10  P-ERATE                 PIC X(5)       VALUE SPACES.

            10  P-FORM                  PIC X          VALUE SPACE.

          method-id InstanceMethod.

          local-storage section.

          66  P-BC-NPG-RATE  RENAMES P-BRCLGROUP THRU P-ERATE.

          procedure division.

             MOVE SPACES TO P-BC-NPG-RATE

             if P-BC-NPG-RATE = spaces

                display "ok"

             else

                display "no"

             end-if

              goback.

          end method.

          end class.

    In a nutshell, can someone explain to this dinosaur what is going on in memory?

Children
No Data