Joined: 19 Jan 2007 Posts: 4 Topics: 1 Location: Pune
Posted: Thu Jun 28, 2007 4:42 am Post subject: Check if value in file1 is >= to value in file2 using sor
Hi,
I two files one contains airthmatic value before any operation and the other has after i have to check if the valuein second file is greater than the first.
Thanks,
Vishal _________________ Vishal Gupta,
Infosys Technologies Lmtd.
Pune, INDIA
Joined: 19 Jan 2007 Posts: 4 Topics: 1 Location: Pune
Posted: Thu Jun 28, 2007 6:35 am Post subject:
I appologies for not follwoing the board rules, will take care of this in future.
1. LRECL for botht the files is 15 and RECFM = FB
2. Position of variables starting from 2 to 11, Numeric field.
3. Input data of file1 -' 0000000012'
data for file2 - ' 0000000013'
What i want is, if the value of second file is greater step should end with some return code else with RC 0 . _________________ Vishal Gupta,
Infosys Technologies Lmtd.
Pune, INDIA
Joined: 26 Nov 2002 Posts: 12401 Topics: 75 Location: San Jose
Posted: Fri Jun 29, 2007 7:16 am Post subject:
vishu19aug,
Try this
1. concatenate both files to sortin DD. Using IFTHEN we add a seqnum and based on that we change the sign of the first file value and sum it up and thus ending up with just 1 record. Now we use an include to see if the summed value is less than or equal to zero. If the summed value is less than zero than the file1 value is greater than file 2
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