IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Appending records from one dataset to other dataset


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rsuneelk

New User


Joined: 08 Nov 2006
Posts: 9

PostPosted: Mon Sep 10, 2007 7:30 pm
Reply with quote

I have two datasets i want to append the records of first dataset to the second dataset. for example

dataset1 contains 50 records and dataset2 contains 1000 records then the records in dataset1 have to add to the dataset2 so no of records in dataset2 should be 1050.

Thanks
Suneel
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 10, 2007 8:03 pm
Reply with quote

Suneel,

Should they be in SORTed order after appending or you just want to append ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 10, 2007 8:05 pm
Reply with quote

Hello rsuneelk and welcome to the forums,

Do both files have the same or compatible dcb information?

If they do, you can do what you want using IEBGENER or your sort product. Just concatenate the 2 input files and create a new combined file.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Sep 10, 2007 8:58 pm
Reply with quote

If both input files have RECFM=VB, or RECFM=FB with the same LRECL, then you can use a DFSORT job like this create an output file with both sets of records:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file1
//  DD DSN=...  input file2
//SORTOUT DD DSN=...  output file
//SYSIN DD *
  OPTION COPY
/*


If that's not what you want, then you need to give more details.
Back to top
View user's profile Send private message
rsuneelk

New User


Joined: 08 Nov 2006
Posts: 9

PostPosted: Tue Sep 11, 2007 4:19 pm
Reply with quote

Hi All

Thank you all very much for your valuable reply.

My problem has been solved. Though i have question.

This is my code here


Code:
//SORTIN   DD DSN=FLDXPED.X5PS2R.PS,DISP=SHR 
//         DD DSN=FLDXPED.X5PS2R.SORT,DISP=SHR
//SORTOUT  DD DSN=FLDXPED.X5PS2R.SORT,DISP=SHR
//SYSIN   DD *                               
   SORT FIELDS=(1,5,CH,A)                     
/*                                           


data in FLDXPED.X5PS2R.PS is
RAMESH 00000100
SURESH 00000200
MAHESH 00000300
RAJESH 00000400

data in FLDXPED.X5PS2R.SORT is
SUNEEL 100
PAVAN 200

after execution the output in FLDXPED.X5PS2R.SORT is
AHESH 00000300
AVAN 200
AJESH 00000400
AMESH 00000100
UNEEL 100
URESH 00000200

here in output the first letter is missing. What will be the problem please let me know.

once again Thank you very much

Thanks
Suneel
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 4:34 pm
Reply with quote

What is the recfm of your output file?
Back to top
View user's profile Send private message
rsuneelk

New User


Joined: 08 Nov 2006
Posts: 9

PostPosted: Tue Sep 11, 2007 4:56 pm
Reply with quote

record format of output file is FB

Thanks
suneel
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 4:57 pm
Reply with quote

Are you sure it isn't FBA?
Back to top
View user's profile Send private message
rsuneelk

New User


Joined: 08 Nov 2006
Posts: 9

PostPosted: Tue Sep 11, 2007 5:02 pm
Reply with quote

yes I am sure it is FB

Thanks
Suneel
Back to top
View user's profile Send private message
rsuneelk

New User


Joined: 08 Nov 2006
Posts: 9

PostPosted: Tue Sep 11, 2007 7:12 pm
Reply with quote

Hi

Output has come correctly. I don't know what happened previously.

Thanks
Suneel
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 7:16 pm
Reply with quote

Hello,

That means something has changed between the runs.

I'd suggest you determine what changed so you can make sure this does not happen again at some later time.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top