Skip to main content

question on valid numeric moves

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

Does this move line up correctly ??? In other words the receive field size matches the sending field size?

WF-DOLLAR-AMT           PIC S9(15)V99 PACKED-DECIMAL.

D-DOLLAR-AMT              PIC  ZZZ,ZZZ,ZZZ,ZZZ,ZZZ.99-.

MOVE WF-DOLLAR-AMT  TO   D-DOLLAR-AM

Resolution:

  It should. The signed field should be interpreted by compiler code to be 15 significant digits and two decimal digits. The editing field will be able to receive the same number

of digits as those sent. Zero suppression will only be used if the value had leading Zeroes, so there should be 15 significant digits and two decimal digits. The sign will be carried by the compiler and placed into the final output. If you were to display the numbers, they would contain all numeric digits. For a positive number the number would be displayed as   1234.56  For a negative number it would be displayed as   1234.56-  because of the editing for the sign field.

Old KB# 6691

#MFDS
#EnterpriseDeveloper