|
|
| Author |
Message |
arunmozhicholan
New User
Joined: 07 Feb 2007 Posts: 17 Location: chennai
|
|
|
|
| neeed jcl to merge more than 4 datasets into one dataset |
|
| Back to top |
|
 |
References
|
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3153 Location: italy
|
|
|
|
did You care to search the forums for samples?
jcl for syncsort
dsfort/icetool for dfsort
lots of samples/snippets/call_them_any_way_you_want |
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2219 Location: Phoenix, AZ
|
|
|
|
Hi,
| arunmozhicholan wrote: |
| neeed jcl to merge more than 4 datasets into one dataset |
Were you able to merge less than four files ?
Did you try something, were there any problesm, if yes, please post the JCL used & the SYSOUT messages. MERGE behave the same way, it doesn't depend on the counts of files till you don't violate the JCL "rules". |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8723 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| neeed jcl to merge more than 4 datasets into one dataset |
Until you post some info about your requirement, we cannot help.
Are all 4 files already "in sequence"? Do they have the same recfm/dcb attributes?
When you post your requirement and/or the jcl/control statements you've tried, we can offer suggestions. |
|
| Back to top |
|
 |
amalraj_ece
New User
Joined: 16 Jul 2006 Posts: 22 Location: delhi
|
|
|
|
you can use IEBGENER to do this.
//TESTKMAL JOB ,,CLASS=Z,NOTIFY=&SYSUID,MSGLEVEL=(1,1),REGION=0M
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=TEST.INPUT.DATASE1,DISP=SHR
// DD DSN=TEST.INPUT.DATASE2,DISP=SHR
// DD DSN=TEST.INPUT.DATASE3,DISP=SHR
// DD DSN=TEST.INPUT.DATASE4,DISP=SHR
//SYSUT2 DD DSN=TEST.OUTPUT.DATASE5,
// DISP=(NEW,CATLG,DELETE),
// DCB=(DSORG=PS,LRECL=180,BLKSIZE=0,RECFM=FB),
// SPACE=(CYL,(4200,4200),RLSE),UNIT=(SYSDA,50)
//SYSOUT DD SYSOUT=*
//
U CAN USE SORT UTILITY AS WELL, U HAVE CONCARDINATE ALL YOUR INPUT DATASET. |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1001 Location: Virginia, USA
|
|
|
|
| There is a difference between concatenating datasets and merging. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8723 Location: 221 B Baker St
|
|
|
|
Hello amal,
Please explain how IEBGENER will merge files?
A MERGE causes the output file to be in sequence by some key (the input typically becomes interleaved while being written to the output) rather than just copied back to back (concatenated). |
|
| Back to top |
|
 |
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 52 Location: INDIA
|
|
|
|
Hi,
This is the jcl we use to merge more than two datasets into one.
//xxxxxxx JOB (T),'MERGE',CLASS=1,
// MSGCLASS=Y,NOTIFY=XXXXXX
//ICEGENR1 EXEC PGM=ICEGENER
//SYSUT1 DD DISP=SHR,DSN=INPUT DATASET1
// DD DISP=SHR,DSN= INPUT DATASET2
// DD DISP=SHR,DSN= INPUT DATASET3
//SYSUT2 DD DSN=OUTPUT DATSET NAME
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=150,BLKSIZE=1500,RECFM=FB), (DCB parm as per your requirement)
// DATACLAS=MB050
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
i hope this will work. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3153 Location: italy
|
|
|
|
Hi M.Anand
did you read the whole thread, before posting ??
Your jcl sample, even if correct, will not merge it will simply concatenate
You sample is exactly the same ( apart the manes change ) as the one posted by Amal,
look for the meaning of merge and the difference from concatenate  |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8723 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| This is the jcl we use to merge more than two datasets into one. |
Sorry, but NO it is not. Calling that jcl "merge" jcl does not make a merge.
All that jcl does is reads one file (sysut1) and copies it to another (sysut2). That sysut1 is multiple concatenated datasets does NOT make the process a merge.
If you are always so careless with terminology, i predict many problems and very bad surprises. There will be no communication - just babble. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 663
|
|
|
|
Hi M.Anad,
your example does not suggest that the data is merged unless the files are miraculously in the correct sequence.
As mentioned earlier by Crag and Dick, there is a DIFFERENCE between MERGING and CONCATENATING files.
Gerry |
|
| Back to top |
|
 |
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 52 Location: INDIA
|
|
|
|
I Apologize
//ABCD1234 JOB (T,QAT),'MERGE ',CLASS=O,NOTIFY=&SYSUID,
// MSGCLASS=Y,REGION=0M
//IEBGEN01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
//SYSUT1 DD DISP=SHR,DSN=I/P DATASETNAME1
// DD DISP=SHR,DSN=I/P DATASETNAME2
// DD DISP=SHR,DSN=I/P DATASETNAME3
//SYSUT2 DD DSN=O/P DATASETNAME
// DISP=(NEW,CATLG,CATLG)
i hope this one will work. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3542 Location: Brussels once more ...
|
|
|
|
Could you please explain how this will be any different from the other example you gave ?
This is still concatenation and not a merge. |
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2219 Location: Phoenix, AZ
|
|
|
|
Hi,
Let's consider two inputs to SYSUT1 as shown below, per your JOB:
DATASETNAME1:
| Code: |
111 BBBBB
333 DDDDD
444 FFFFF
555 HHHHH |
& DATASETNAME2:
| Code: |
111 BBBBB
333 DDDDD
444 FFFFF
555 HHHHH |
What should be the output from your JOB ? |
|
| Back to top |
|
 |
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 52 Location: INDIA
|
|
|
|
Hi,
I tested that job thereafter i posted it.
What should be the output from your JOB ?
This is it -->
111 BBBBB
333 DDDDD
444 FFFFF
555 HHHHH
111 BBBBB
333 DDDDD
444 FFFFF
555 HHHHH |
|
| Back to top |
|
 |
|
|