Skip to main content

RTS163 on MOVE from numeric to numeric but one is a redefinition of an alphanume

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

We have the following code:

            MOVE WS-PROD-N-RDF TO WS-PROD-N-C3.

where WS-PROD-N-RDF contains 34567bb and bb = two Spaces

This works for INT code if I de-select the GUI option under Project>Project Settings,Execution tab,Cobol tab, 'Validate contents of numeric fields'. The problem with that is it is Project wide. ALL programs in the application will get numeric checking turned off.

Resolution:

  01  WS-PROD-RDF-AREA.

           05  WS-PROD-N    PIC X(7).

           05  WS-PROD-N-RDF REDEFINES WS-PROD-N PIC S9(7).

           05  WS-PROD-N-C3  PIC S9(7)V COMP-3 VALUE ZEROES.

    

If one wants it to be program specific, then one must create GNT code and use:

  - take the default 'validate contents...' for the project

  - select the desired program and right click on it

  - select 'build settings for <pgmname>'

  - select 'Create optimized code'

  - turn off (de-select) 'Create debug information'

  - in the Additional directives box add:

        anim nochecknum

   (yes, I know the online Help says its the default, request nochecknum anyway)

Now Animate your application. The desired program should be seen and will allow the MOVE to happen. The receiver, WS-PROD-N-C3 will contain 3456700.

Old KB# 6618

#EnterpriseDeveloper
#MFDS