Monday, September 26, 2011

COBOL: Numeric editing - few examples



Below are some of the numeric editing examples.


01 X PIC ++++.99.
value      result
-123.25  : -123.25
+123.25  : +123.25
-1230.25 : -230.25

01 X PIC $$$$.99.
value     result
1230.25 : $230.25

01 X PIC 99CR.
01 Y PIC 99CR.
value   result
-23 X : 23CR
 23 Y : 23

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.