View previous topic :: View next topic
|
Author |
Message |
rsuneelk
New User
Joined: 08 Nov 2006 Posts: 9
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Suneel,
Should they be in SORTed order after appending or you just want to append ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
rsuneelk
New User
Joined: 08 Nov 2006 Posts: 9
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What is the recfm of your output file? |
|
Back to top |
|
|
rsuneelk
New User
Joined: 08 Nov 2006 Posts: 9
|
|
|
|
record format of output file is FB
Thanks
suneel |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Are you sure it isn't FBA? |
|
Back to top |
|
|
rsuneelk
New User
Joined: 08 Nov 2006 Posts: 9
|
|
|
|
yes I am sure it is FB
Thanks
Suneel |
|
Back to top |
|
|
rsuneelk
New User
Joined: 08 Nov 2006 Posts: 9
|
|
|
|
Hi
Output has come correctly. I don't know what happened previously.
Thanks
Suneel |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|