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 

Diff btw SORT & MERGE.

 
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: Thu Jul 19, 2007 6:08 am    Post subject: Diff btw SORT & MERGE. Reply with quote

Hi,

I wanted to combine two files into a single file. File A and File B content should be present in File B. I am using SYNCSORT. I am getting the same resultant output file (File B) when used the below statements:

Code:

SORT FIELDS = COPY

OR

MERGE FILEDS = COPY


Would there be anything wrong or is it ok?

Please help.

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: Thu Jul 19, 2007 6:20 am    Post subject: Reply with quote

mf_user,

you have been around long enough to know that when you post a question and only provide very little information you will receive very little help. What is you jcl? and job output msgs?

If I understand you correctly, File A and File B are your input files, File B - containing File A is your output. How do you know what you have when you have nothing to compare? destructive updates are not very professional.

When you use the COPY parm of the fields operand of merge, are you not just appending A onto B? Why don't you use an iebgener copying A to B, with B as disp=(mod,keep,keep)?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
blitz2
Beginner


Joined: 23 Jan 2007
Posts: 84
Topics: 14

PostPosted: Thu Jul 19, 2007 7:10 am    Post subject: Reply with quote

Quote:
File A and File B content should be present in File B.

I think this is the requirement.

Quote:
I am getting the same resultant output file (File B)

Looks like files are not getting merged i.e. File B contents have not changed.

mf, you will need to post the jcls that you used.
________
Teen Vid


Last edited by blitz2 on Thu Mar 10, 2011 5:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Thu Jul 19, 2007 9:23 am    Post subject: Reply with quote

mf_user,

Yes, please post the complete JCL that you coded for this job.

Please also note, that for a COPY or MERGE, the output file must not be the same as any of the input files. Therefore, please make sure that although you want the contents of File A and File B in File B, write it out to File C.
_________________
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
krisprems
Beginner


Joined: 13 Dec 2006
Posts: 101
Topics: 4
Location: india

PostPosted: Thu Jul 19, 2007 12:42 pm    Post subject: Reply with quote

mf_user
If your i/ps are already in sorted order, then use merge to combine them; This increases the efficiency(by using merge).
If the i/ps are not in sorted order, than just use SORT to combine.

regarding this,
Quote:
File A and File B content should be present in File B.

It would be clear if you provide the JCL that you are using.
_________________
cHEERs
krisprems
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Mon Jul 23, 2007 6:36 am    Post subject: Thanks Reply with quote

Hi, dbzTHEdinosauer & others.

Thank you all for the replies and info you have provided.

Here is the JCL:

Code:

//JS001  EXEC PGM=SORT                                   
//*                                                     
//SORTIN   DD DSN=XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT01,
//            DISP=(OLD,KEEP,KEEP)                       
//         DD DSN=XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT08,
//            DISP=(OLD,KEEP,KEEP)                       
//*                                                     
//SORTOUT  DD DSN=XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT08,
//            DISP=(SHR,KEEP,KEEP)                       
//*                                                     
//SYSIN    DD  *                                         
 SORT FIELDS=COPY                                       
/*                                                       
//*                                                     


------
Code:

//JS001  EXEC PGM=SORT                                   
//*                                                     
//SORTIN   DD DSN=XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT01,
//            DISP=(OLD,KEEP,KEEP)                       
//         DD DSN=XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT08,
//            DISP=(OLD,KEEP,KEEP)                       
//*                                                     
//SORTOUT  DD DSN=XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT08,
//            DISP=(SHR,KEEP,KEEP)                       
//*                                                     
//SYSIN    DD  *                                         
 MERGE FIELDS=COPY                                       
/*                                                       
//*                                                     


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
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jul 23, 2007 6:44 am    Post subject: Reply with quote

mf_user,

wow. Your sortin and sortout is the same ? You concatenated the DSN "XXXXX.XXXXX.XXXX.XXXXX.XXXXXXX.XXXXT08" to SORTIN and also it is the same DSN for Sortout? .Also you did not provide us with the sysout messages and how did you expect us to help?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Mon Jul 23, 2007 8:57 am    Post subject: SYSOUT Reply with quote

sysin:
Code:

//SYSIN    DD  * 
 MERGE FIELDS=COPY
/*               


sysout:
Code:

SYSIN :                                                                 
 MERGE FIELDS=COPY                                                     
WER276B  SYSDIAG= 10597, 239187, 239187, 1050729                       
WER164B  6,904K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER164B     0 BYTES RESERVE REQUESTED, 6,104K BYTES USED               
WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED                         
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920           
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920           
WER410B  5,876K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B     0 BYTES RESERVE REQUESTED, 5,860K BYTES USED               
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           
WER416B  SORTIN   : EXCP'S=2,UNIT=3390,DEV=73B2,CHP=FAFBFCFD,VOL=XXX826
WER416B  SORTOUT  : EXCP'S=3,UNIT=3390,DEV=73B6,CHP=FAFBFCFD,VOL=XXX830
WER416B  TOTAL OF 5 EXCP'S ISSUED FOR COPYING                           
WER054I  RCD IN       2156, OUT       2156                                   
WER169I  RELEASE 1.2 BATCH 0460 TPF LEVEL 2.1                                 
WER052I  END SYNCSORT - XXXXXXM1,JS001,,DIAG=CC00,D3C4,E031,28FD,85DE,68CB,A6228,06E4


sysin:
Code:

//SYSIN    DD  * 
 SORT FIELDS=COPY
/*               


sysout:
Code:

SYSIN :                                                                 
 SORT FIELDS=COPY                                                       
WER276B  SYSDIAG= 3954, 250840, 250840, 1050160                         
WER164B  6,904K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER164B     0 BYTES RESERVE REQUESTED, 6,104K BYTES USED               
WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED                         
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920           
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920           
WER410B  5,876K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B     0 BYTES RESERVE REQUESTED, 5,860K BYTES USED               
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           
WER416B  SORTIN   : EXCP'S=2,UNIT=3390,DEV=73B2,CHP=FAFBFCFD,VOL=XXX826
WER416B  SORTOUT  : EXCP'S=3,UNIT=3390,DEV=73B6,CHP=FAFBFCFD,VOL=XXX830
WER416B  TOTAL OF 5 EXCP'S ISSUED FOR COPYING                           
WER054I  RCD IN       2156, OUT       2156                                   
WER169I  RELEASE 1.2 BATCH 0460 TPF LEVEL 2.1                                 
WER052I  END SYNCSORT - XXXXXXM1,JS001,,DIAG=E800,F384,C0BB,68DD,A156,4CAB,8268,6666


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
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jul 23, 2007 9:14 am    Post subject: Reply with quote

mf_user,

You are just wasting time. You don't even read the questions properly and you only answer partial questions. Go read my prior post and see what I asked.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


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

PostPosted: Mon Jul 23, 2007 9:22 am    Post subject: Reply with quote

MF,

as has been said several times, using the same file for input and output does not make much sense, but try changing the disposition on the
  1. input files (SORTIN) to be shr instead of old
  2. output file (SORTOUT) to be old instead of shr.

_________________
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: Mon Jul 23, 2007 9:33 am    Post subject: Reply with quote

OK dbzTHEdinosauer. 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
dbzTHEdinosauer
Supermod


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

PostPosted: Mon Jul 23, 2007 9:41 am    Post subject: Reply with quote

mf_user wrote:
OK dbzTHEdinosauer. Thanks.


does that mean it worked? I still can't understand how you can compare xxxxt08 before and after.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
blitz2
Beginner


Joined: 23 Jan 2007
Posts: 84
Topics: 14

PostPosted: Tue Jul 24, 2007 12:59 am    Post subject: Reply with quote

reminds me; when I started my career as a fresher, I did not know of any helpboards, did not know the links for IBM manuals, training was hopeless and I was really lost... If it weren't for my mentors in my first project, I would never have been comfortable in the mainframe world.
________
AN1X
Back to top
View user's profile Send private message
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