is it possible to read the next record for a condition

SyncSort's Sort Product, SyncTool for z/OS, SYNCINIT and SYNCLIST.
Previous topicNext topic

Topic Author
six digit
New Member
Posts: 1
Joined: Tue Sep 01, 2015 8:33 pm

is it possible to read the next record for a condition

Post by six digit » Tue Sep 01, 2015 9:50 pm

I will like to know if is is possible to read the next record when we are using a syncsort (icetool) base on a certain condition.

Exemple of the input

sort key will be account nbr + descending record type + amount

Code: Select all

account nbr amount rec. type   Comment
11111111111   10   reversal    not in the output
11111111111   10   deposit     not in the output
33333333333   20   deposit     in the output
44444444444   15   deposit     in the output
55555555555   20   reversal    in the output because reversal not having same amount as the deposit
55555555555   10   deposit     in the output
66666666666   30   reversal    in the output no match``
When a reversal type is read, a deposit should follow with the same amount, in this case it both record the reversal and deposit should not be in the output file. It is possible the amount is not the same for the reversal and the deposit, in this case both record should be in the output file.

output

Code: Select all

33333333333 20 deposit

44444444444 15 deposit

55555555555 20 reversal

55555555555 10 deposit

66666666666 30 reversal
Thanks
[coded]




RahmatKhan
New Member
Posts: 5
Joined: Tue Mar 24, 2015 9:33 pm

Re: is it possible to read the next record for a condition

Post by RahmatKhan » Thu Sep 03, 2015 1:57 pm

Hi,

What is LRECL and RECFM of the input file? Can there be duplicates in the input?




RahmatKhan
New Member
Posts: 5
Joined: Tue Mar 24, 2015 9:33 pm

Re: is it possible to read the next record for a condition

Post by RahmatKhan » Tue Sep 08, 2015 2:02 pm

I think, you can use JOINKEYS for this. You will need to use the same input for both input datasets with SORTED. But if you post more details, it'll help.




zprogrammer
Global Moderator
Global Moderator
Posts: 605
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars
Zodiac: Libra

Re: is it possible to read the next record for a condition

Post by zprogrammer » Sat Sep 19, 2015 10:06 pm

Rahmat

I appreciate your advice but we need to consider all conditions and suggest which would be better :) Good luck and Keep wandering here ..


Six digit,

Do we expect More deposits n reversal per account or is it Max 2 records per account?


zprogrammer

Previous topicNext topic

Return to “SyncSort, SyncTool, SyncGener.”