Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
Hi,
Here is my reqirement. I had 3 fields in my input file. Say name, city and amount.
The amount field is S9(6)V99 COMP-3.
When the amount field is -ive and the value is > 1500 i should populate name, city and -ive symbol to my output.
When the amount field is +ive or blank and the value is >1500 i should populate name, city and +ive symbol to my output.
If the amount field has value -1200. I should not consider this record.
If the amount field has value -1800. I should populate '-' to my output.
If the amount filed has value 1200. I should ignore this record.
If the amount field has value 2000. I should populate '+' to my output.
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
Bhaskar,
Quote:
When the amount field is -ive and the value is > 1500 i should populate name, city and -ive symbol to my output.
When the amount field is +ive or blank and the value is >1500 i should populate name, city and +ive symbol to my output.
Explain your above conditions properly. Its confusing.
Also we expcet some sample data (ip and op) with file attribs and file layout.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
The amount field is S9(6)V99 COMP-3.
This means the amount is a 5-byte PD field representing a value like sdddddd.dd (e.g. +1600.00 or -2000.00).
Quote:
If the amount is less than -1500 i should populate '-' and
if the amount is greater than 1500 i should populate '+'.
I take that to mean if the amount is < -1500.00, you want '-' and if the amount is > +1500.00, you want '+'.
Note that the decimal point is not stored internally for the PD value, so +1600.00 would be X'000160000C' and -2000.00 would be X'000200000D'. Thus we need to use -150000 and +150000 as the constants.
Given all that, here's a DFSORT job to do what you asked for:
Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
Hi Frank Yaeger,
Thank you so much.
Thanks for providing me the solution and also clear explanation.
Many more thanks for providing clear explanation.
Thank You So Much.