Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Appending records from one dataset to other dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Appending records from one dataset to other dataset
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

Senior Member


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

PostPosted: Mon Sep 10, 2007 8:03 pm    Post subject:
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

Site Director


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

PostPosted: Mon Sep 10, 2007 8:05 pm    Post subject:
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 Moderator


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

PostPosted: Mon Sep 10, 2007 8:58 pm    Post subject:
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    Post subject: Reply to: Appending records from one dataset to other datase
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 4:34 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 4:57 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Sep 11, 2007 7:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us