View previous topic :: View next topic
|
Author |
Message |
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
I would like to combine two files together without a sort. The first file has 10 records and the second file has 500M. I would like to combine the first file with all the records of the second file (except the very first record).
~Sharon in El-Lay |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Sharon,
Use the below steps for acheving your requirement with ICEMAN -
Code: |
//FILE1 EXEC PGM=ICEMAN
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
FIRST RECORD OF FILE1
SECOND RECORD OF FILE1
THIRD RECORD OF FILE1
/*
//SORTOUT DD DSN=&SYSUID..&SYSUID..&SYSUID,
// DISP=(,CATLG,CATLG),LRECL=80,RECFM=FB,SPACE=(TRK,10)
//SYSIN DD *
SORT FIELDS=COPY
/*
//*
//FILE2 EXEC PGM=ICEMAN
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
FIRST RECORD OF FILE2
SECOND RECORD OF FILE2
THIRD RECORD OF FILE2
FOURTH RECORD OF FILE2
FIFTH RECORD OF FILE2
/*
//SORTOUT DD DSN=&SYSUID..&SYSUID..&SYSUID,DISP=MOD
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,STARTREC=2
/* |
With ICETOOL -
Code: |
//SPLIT EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//FILE1 DD *
1FIRST
1SECOND
/*
//FILE2 DD *
2FIRST
2SECOND
2THIRD
/*
//OPFILE DD DSN=&SYSUID..&SYSUID..&SYSUID,
// DISP=(MOD,CATLG,CATLG),LRECL=80,RECFM=FB,
// SPACE=(TRK,10,RLSE)
/*
//TOOLIN DD *
COPY FROM(FILE1) TO(OPFILE)
COPY FROM(FILE2) USING(C111)
/*
//*
//C111CNTL DD *
OUTFIL FNAMES=OPFILE,STARTREC=2
/* |
OP as expected. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Sharon,
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//OUT DD DISP=MOD,DSN=... MOD output file
//TOOLIN DD *
COPY FROM(IN1) TO(OUT)
COPY FROM(IN2) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
OPTION SKIPREC=1
/*
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Sorry to join the party so late, but reading this just now, a question occurred. . .
Should the 9 records of the first file be merged with the large file by some "key" that the large file is already sequenced by or is it ok to have the 9 "new" records on the front or back of the combined file?
Every time i've worked with files that large, they were in sequence by "something" so i thought i'd ask.
If i've confused anything, my apologies |
|
Back to top |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
I used Disp=MOD and took the default on the other two Disp parameters. The Job ran for and hour and a half, copied all the data correctly onto 10 tapes and then promptly deleted the output file at the end of the job. I used DISP=(MOD,KEEP,KEEP) and the job "RECATLOGED" that dataset I needed with all the records intact.
The records are a huge unload of an IMS database and we have a batch purge pgm (no source) that removes the obsolete segemts. It also removed the 8 new header records the the new BMC utility put in the file. No source, no fix on the Purge pgm. This ICETOOL utility helped mucho. Thank you so much everyone.
~Sharon in El-Lay |
|
Back to top |
|
|
|