Page 1 of 1

Need help with MERGE

Posted: Mon Sep 29, 2014 10:16 pm
by pyro_wood
Hi,

I'm relatively new to the whole mainframe thingy and I need some help on a task.

I need to MERGE two Datasets together.
I'm working on a TSO/E environment.


The datasets look like....

DSN='NEW'

Code: Select all

0100    Peter, Bauer
0200    Hans, Zimmer
0300    Michael, Bender
DSN='OLD'

Code: Select all

0100    Peter, Bauer
0200    Hans, Zimmer
0300    Michael, Bender
0400    Maria, Brunn

I want to MERGE the 'OLD' DSN with the 'NEW' DSN.

End result should look like this:

Code: Select all

0100    Peter, Bauer
0200    Peter, Bauer
0300    Hans, Zimmer
0400    Hans, Zimmer
0500    Michael, Bender
0600    Michael, Bender
0700    Maria, Brunn



I tried to initialise DFSORT over JCL with a Statement from a PDF named 'Getting Started with DFSORT' by IBM.
It did not work sadly. It always shows a SYNTAX ERROR, that does not exist in the JCL...



Can anyone give me a suggestion for a working JCL statement?

The RECFM of both the datasets new and old are on 'FB'... could this be a problem?

Is there another solution for combining two datasets with each other?

Re: Need help with MERGE

Posted: Mon Sep 29, 2014 10:37 pm
by William Collins
JCL does no data-manipulation for you. DFSORT does a lot. You need either the DFSORT Messages and Codes manual, or to use IBM's LOOKAT web-service, where you enter the error-message number in a box, click on GO and it shows you the text of the message.

Of you post the sysout of the failing step here, and we have a look.

Re: Need help with MERGE

Posted: Tue Sep 30, 2014 5:11 pm
by Ashit Shah
hello pyro_wood,

Are the numbers part of your data?