Compare and issue a Return code!!!



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Compare and issue a Return code!!!

Postby ibmmf4u » Tue May 15, 2012 10:00 pm

Hi Everyone,

My requirement goes this way , Where i will be joining two files and will be sending the data which is matched into one file and other that doesn't match into an another file.I would like to issue a return code of RC4 if the unmatch file contains any data.

Below mentioned were the files:-

File1:-
TEST1      0100
TEST2      0200
TEST3      0300
TEST6      0400


File2:-
TEST1     A123
TEST2     B123
TEST4     C123
TEST5     D123


Match file:-
TEST1     0100    A123
TEST2     0200    B123


UnMatch file:-
TEST3    0300
TEST6    0400


Here i will be joining the two files based on fields present in column1 (TEST) as a key and will be writing the contents that match in both the files into a Match file , and others that doesn't match will be writing the details present in file1 into an UnMatch file , where i would like to issue an RC4 if the UnMatch file contains any data.

Can some one provide me the sort card in achieving the above.

Thanks in advance!!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Compare and issue a Return code!!!

Postby BillyBoyo » Wed May 16, 2012 5:25 am

OK, check your documentation for NULLOUT, you can search here, there are some examples of its use.

I think the simplest way to use it will be in a second step, which just copies (one record is enough) the file. You'd have to reverse your condition code checking so that non-zero is OK, zero is not.

It might be more flexible to use an IDCAMS step, as you can set the MAXCC - if LASTCC = 0, set MAXCC to 4, for instance.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Compare and issue a Return code!!!

Postby dick scherrer » Wed May 16, 2012 7:40 am

Hello,

Why are TEST4 and TEST5 in neither output file?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Compare and issue a Return code!!!

Postby ibmmf4u » Fri May 18, 2012 11:41 pm

Hi Bill,

Thanks a lot. Will follow your inputs and shall let you know the outcome.

Hi Dick,

I was trying to move the unmatched contents present in file1 hence its present in the output file2.
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Compare and issue a Return code!!!

Postby dick scherrer » Fri May 18, 2012 11:53 pm

Hello,

So, unmatched file2 records are to be completely ignored - right?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Compare and issue a Return code!!!

Postby ibmmf4u » Sat May 19, 2012 12:04 am

Yes dick it should be ignored!!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post