My requirement is I am doing SORT/SUM. In that I have to move 0(ZERO) to my OUTREC field Commission amount. It is declared as S9(13)V99 PACKED-DECIMAL. It's LRECL=172,RECFM=FB.
For Example it is having data in the pos (145-152) as foll.
-189.91
-1614.93
-1484.63
-571.60
-1722.63
If it is CHAR field we can move like
C'12.01.2001', 'DATE FIELD.
As it is COMP filed i don't know how to do that..
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I don't understand what you're trying to do. You've used some COBOL terms and some Sort terms, but it isn't clear how it all fits together.
You show a packed decimal field with a decimal point. Packed decimal fields only have an implied decimal point - the decimal point is not actually stored internally in the field. You say something about moving zero to some field, but I don't see how that fits in. You also talk about a COMP field, but PD is COMP-3, not COMP.
You need to explain what you're trying to do more clearly before I can help you.
We are loading these Output filelds into DB2 table. Now i got the
requirement like i have to move Zeroes externally to the field
Gross-Writen-Comm(GWC) in the pos(145,8). Could u please help me
out?