CHANGE and NOMATCH not working, help!



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

CHANGE and NOMATCH not working, help!

Postby adelewalsh » Thu Sep 30, 2010 1:36 am

I have 2 files that I'm matching. If a match is found, I want to change a field on the first file.
I'm using the following code :
 JOIN UNPAIRED,F1                                       
 JOINKEYS FILE=F1,FIELDS=(1,4,A,16,4,A,55,5,A)           
 JOINKEYS FILE=F2,FIELDS=(1,4,A,16,4,A,10,5,A)           
                                                         
 REFORMAT FIELDS=(F1:1,59,F2:10,5),FILL=X'40'           
                                                         
 SORT FIELDS=COPY                                       
 SUM FIELDS=NONE                                         
 OUTFIL OUTREC=(1:1,9,                                   
                10:10,5,CHANGE=(5,C'ALPHA',55,5),       
                        NOMATCH=(10,5),                 
                15:15,45)                               

Where
F1 looks like
----+----1----+----2----+----3----+----4----+----5----+----         
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0011;00113 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0012;01545 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0013;00542 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0014;00467 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0015;00378 
5076  00;02032;AGED;3;00;0900104;01;1;A; ;  ;   ;0016;02032   

and
F2 like
5076  00;00113;AGED;1;00;1010827;01;2;C; ;  ; Í ;0013 


What I want returned from this sample would be just the matched record to have the word ALPHA changed to 00113:
5076  00;00113;AGED;1;00;0900104;01;1;A; ;  ;   ;0011;00113 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0012;01545 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0013;00542 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0014;00467 
5076  00;ALPHA;AGED;1;00;0900104;01;1;A; ;  ;   ;0015;00378 
5076  00;02032;AGED;3;00;0900104;01;1;A; ;  ;   ;0016;02032 


But what I'm getting is all records changing the word ALPHA to what's in the last field, regardless of match or not...not sure what I have wrong on my card???
5076  00;00113;AGED;1;00;0900104;01;1;A; ;  ;   ;0011;00113 
5076  00;01545;AGED;1;00;0900104;01;1;A; ;  ;   ;0012;01545 
5076  00;00542;AGED;1;00;0900104;01;1;A; ;  ;   ;0013;00542 
5076  00;00467;AGED;1;00;0900104;01;1;A; ;  ;   ;0014;00467 
5076  00;00378;AGED;1;00;0900104;01;1;A; ;  ;   ;0015;00378 
5076  00;02032;AGED;3;00;0900104;01;1;A; ;  ;   ;0016;02032
adelewalsh
 
Posts: 3
Joined: Mon Sep 20, 2010 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CHANGE and NOMATCH not working, help!

 

Re: CHANGE and NOMATCH not working, help!

Postby adelewalsh » Thu Sep 30, 2010 2:31 am

Please ignore...I should have been using an IFTHEN with an overlay...thank you anyway to anyone that may have been looking at this for me.
adelewalsh
 
Posts: 3
Joined: Mon Sep 20, 2010 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CHANGE and NOMATCH not working, help!

Postby dick scherrer » Thu Sep 30, 2010 3:01 am

Good to hear it is working - thank you for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post