Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ICEMAN Combine - Remove 1st record of second file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Wed Aug 01, 2007 6:20 am    Post subject: ICEMAN Combine - Remove 1st record of second file
Reply with quote

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
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Aug 01, 2007 10:54 am    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Aug 01, 2007 8:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Aug 02, 2007 1:51 am    Post subject:
Reply with quote

Hello,

Sorry to join the party so late, but reading this just now, a question occurred. . . icon_confused.gif

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 icon_wink.gif
Back to top
View user's profile Send private message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Thu Aug 02, 2007 3:50 am    Post subject: Frank's ICETOOL Job worked great, except.....
Reply with quote

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
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us