Joined: 05 Jan 2003 Posts: 7 Topics: 4 Location: India
Posted: Mon Oct 27, 2003 10:28 am Post subject: Manipulating edited input using Sort
I need to find out the difference of I/P and O/P for Grand total revenue. Since this is masked field, can I use EDIT in the input of a Sort to get the difference? I tried using the follinwing JCL for this, but it's giving a syntax error:
The alternative could be EZ+, but sort can be worth trying.
Snapshot of the input:
FIELD DESCRIPTION I/P DATA O/P DATA
----------------- --------- --------
GRAND TOTAL REVENUE $84.03CR $22.96
TOTAL DDD CHRG AMOUNT $24.50 $24.50
TOTAL CC CHRG AMOUNT $0.00 $0.00
FIELD DESCRIPTION I/P DATA O/P DATA
----------------- --------- --------
GRAND TOTAL REVENUE $61.56 $19.70
TOTAL DDD CHRG AMOUNT $23.76 $23.76
TOTAL CC CHRG AMOUNT $0.00 $0.00
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Mon Oct 27, 2003 2:38 pm Post subject:
Jaidev,
shouldn't the edit mask be $$,$$$,$99.99CR instead of $$,$$$,$99.$$CR??
Assuming that the edit mask is correct, there is way to get the desired results. The varying dollar symbol along with thousands seperator , imbedded decimal is what makes this job a little complicated.
I did not have time to test the job but here is a solution that will work.
Split the input file into 'N' different files depending upon the position of the dollar symbol for the input and output data.Here is an untested code.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum