Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
to merge more than two datasets into one.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
arunmozhicholan

New User


Joined: 07 Feb 2007
Posts: 17
Location: chennai

PostPosted: Fri May 30, 2008 1:12 pm    Post subject: to merge more than two datasets into one.
Reply with quote

neeed jcl to merge more than 4 datasets into one dataset
Back to top
View user's profile Send private message
References
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3153
Location: italy

PostPosted: Fri May 30, 2008 1:20 pm    Post subject: Reply to: to merge more than two datasets into one.
Reply with quote

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
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2219
Location: Phoenix, AZ

PostPosted: Fri May 30, 2008 2:55 pm    Post subject: Re: to merge more than two datasets into one.
Reply with quote

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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8723
Location: 221 B Baker St

PostPosted: Fri May 30, 2008 10:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
amalraj_ece

New User


Joined: 16 Jul 2006
Posts: 22
Location: delhi

PostPosted: Sat May 31, 2008 12:46 am    Post subject: Reply to: to merge more than two datasets into one.
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1001
Location: Virginia, USA

PostPosted: Sat May 31, 2008 1:12 am    Post subject:
Reply with quote

There is a difference between concatenating datasets and merging.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8723
Location: 221 B Baker St

PostPosted: Sat May 31, 2008 3:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 52
Location: INDIA

PostPosted: Tue Jun 03, 2008 11:57 am    Post subject: Reply to: to merge more than two datasets into one.
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3153
Location: italy

PostPosted: Tue Jun 03, 2008 12:01 pm    Post subject: Reply to: to merge more than two datasets into one.
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8723
Location: 221 B Baker St

PostPosted: Tue Jun 03, 2008 12:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 663

PostPosted: Tue Jun 03, 2008 12:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 52
Location: INDIA

PostPosted: Tue Jun 03, 2008 12:42 pm    Post subject: Reply to: to merge more than two datasets into one.
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3542
Location: Brussels once more ...

PostPosted: Tue Jun 03, 2008 12:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2219
Location: Phoenix, AZ

PostPosted: Tue Jun 03, 2008 1:39 pm    Post subject:
Reply with quote

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
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 52
Location: INDIA

PostPosted: Tue Jun 03, 2008 2:23 pm    Post subject: Reply to: to merge more than two datasets into one.
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2