Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: numeric fields

$
0
0

This only occurs during compilation if the compiler recognizes a statement that is trying to move an illegal value into a numeric field as this is not allowed.

So if you have something like:

01 my-group.

    05 num-field  pic 9(5).

01 aspace pic x value space.

   and you try:

   move space to num-field   *> you will get zero substitution because compiler knows illegal value

   but if you use instead the data-item aspace

   move aspace to num-field *> no compiler error but you may get rts163 error at run-time. if test for 0 fails

   if you move spaces to the group item you will not get compiler error but may get rts163 error at run-time but if test for 0 fails

          move space to my-group

          if num-field = 0

             display "yes"

          else

             display "no"

          end-if


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>