MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need a SYNCSORT solution...please !

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Wed Jul 23, 2008 8:45 am    Post subject: Need a SYNCSORT solution...please ! Reply with quote

Hi,

We are using SYNCSORT FOR Z/OS 1.2.2.1R.

My requirement is as give below:

I have two files to compare.

1st File:

Code:

##00002
##00093


2nd File:

Code:

01   ##00002
02   ##00002
03   ##00002
07   ##00002
08   ##00002
14   ##00002
19   ##00002
99   ##00002
01   ##00093
02   ##00093
03   ##00093
07   ##00093
08   ##00093
14   ##00093
19   ##00093
99   ##00093
01   ##00193
02   ##00193
03   ##00193
07   ##00193
08   ##00193
14   ##00193
19   ##00193
99   ##00193


The requirement is to copy the records from 2nd file if the number matches between 1st and 2nd files. So, the output should look as given below:

Code:

01   ##00002
02   ##00002
03   ##00002
07   ##00002
08   ##00002
14   ##00002
19   ##00002
99   ##00002
01   ##00093
02   ##00093
03   ##00093
07   ##00093
08   ##00093
14   ##00093
19   ##00093
99   ##00093


Note: Number starts in 1st column in 1st file and in 6th column in 2nd file.

Please help me with a SYNCSORT solution.

TIA.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Jul 23, 2008 9:40 am    Post subject: Reply with quote

sorry if I hurt your FEELINGS, but have you bothered to look thru the threads in the utilites forum? even though the recl is different and what you are trying to compare is different, the mechanics are the same.

search for alisa m's posts. they all concern syncsort.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Wed Jul 23, 2008 9:55 am    Post subject: Reply with quote

dbzTHEdinosauer,

I did search and found few entries that used JOINKEYS concept. I tried to modify one but always ended up getting different output. Embarassed

I thought, will ask expert's help on this.

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Wed Jul 23, 2008 11:18 am    Post subject: Reply with quote

Here is a SyncSort job that should give you the desired results:
Code:
//SORT1  EXEC PGM=SORT
//SORTJNF1 DD *       
01   ##00002         
02   ##00002         
03   ##00002         
07   ##00002         
08   ##00002         
14   ##00002         
19   ##00002         
99   ##00002         
01   ##00093         
02   ##00093         
03   ##00093         
07   ##00093         
08   ##00093         
14   ##00093         
19   ##00093         
99   ##00093         
01   ##00193         
02   ##00193         
03   ##00193         
07   ##00193         
08   ##00193         
14   ##00193         
19   ##00193         
99   ##00193         
//SORTJNF2 DD *     
##00002             
##00093             
//SORTOUT  DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *                       
   JOINKEYS FILES=F1,FIELDS=(6,7,A)
   JOINKEYS FILES=F2,FIELDS=(1,7,A)
   REFORMAT FIELDS=(F1:1,12)       
   SORT FIELDS=COPY               
/* 

_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Wed Jul 23, 2008 12:25 pm    Post subject: Thank you very much. Reply with quote

Hi, Alissa.

Thank you very much for your immediate help. I've started writing COBOL program to achieve it.

You saved my time. Very Happy

Have a good day.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Wed Jul 23, 2008 2:04 pm    Post subject: Reply with quote

MF,

Glad I could help.
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group