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 

Can we do this via Sort?

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


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Tue Mar 08, 2005 8:44 am    Post subject: Can we do this via Sort? Reply with quote

Hi,
I am having 2 files with FB and lrec as 80.The data of the files is like below.

File1:

XXXXXX1 0 CA07 NVM@3
PS010
PS020
PS030
XXXXXX2 0 CA07 NVM@3
PS010
PS020
PS030
XXXXXX3 0 CA07 NVM@3
PS010
PS020
PS030

File2:

NVM@3 AAAAAAA BBBBBBBBBBBB
PS010 AAAAAAA ASASASASAASS
PS030 AAAAAAAA AAAAAAAAAAAA
PS040 AAAAAAA AAASSSSSAAAA
PS050 AAAAAAA AAAAAAAAAAAAA
NVM@3 AAAAAAA BBBBBBBBBBBB
PS010 AAAAAAA ASASASASAASS
PS030 AAAAAAAA AAAAAAAAAAAA
NVM@3 AAAAAAA BBBBBBBBBBBB
PS010 AAAAAAA ASASASASAASS
PS030 AAAAAAAA AAAAAAAAAAAA

Now I need to create a new file like below.

XXXXXX1 NVM@3 AAAAAAA BBBBBBBBBBBB
XXXXXX1 ps010 AAAAAAA ASASASASAASS
XXXXXX1 PS030 AAAAAAAA AAAAAAAAAAAA
XXXXXX1 PS040 AAAAAAA AAASSSSSAAAA
XXXXXX1 PS050 AAAAAAA AAAAAAAAAAAAA
XXXXXX2 NVM@3 AAAAAAA BBBBBBBBBBBB
XXXXXX2 ps010 AAAAAAA ASASASASAASS
XXXXXX2 ps020
XXXXXX2 ps030 AAAAAAA AAAAAAAAAAAA
XXXXXX3 NVM@3 AAAAAAA BBBBBBBBBBBB
XXXXXX3 ps010 AAAAAAA ASASASASAASS
XXXXXX3 ps020
XXXXXX3 ps030 AAAAAAA AAAAAAAAAAAA


is this possible to achive throught Sort? Here the number of records in both the files are not
same.But the number of NVM@3 are equal in both the files.Ezt solution is also ok to me.

Thanks
Prasanna
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Mar 08, 2005 11:41 am    Post subject: Reply with quote

It's not clear what you're trying to do. For XXXXXX1, you don't include the PS020 record in the output, but for XXXXXX2 and XXXXXX3, you do. Why?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Wed Mar 09, 2005 1:36 am    Post subject: Reply with quote

Sorry Frank,
I need to include the PS020 IN XXXXXX1 as well.But I need the solution with SYNCSORT.

Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Mar 09, 2005 10:29 am    Post subject: Reply with quote

bprasanna,

What is the matching field in both the files? is it NVM@? There are multiple NVM@3 records in both the files. How do you link the records?

Is the matching to be done by sets ?

Since you are interested in syncsort solution , please post the version of syncsort you have . Run the following job.You can find this as the first line in your sysout.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
TEST
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
   SORT FIELDS=COPY
/*


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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