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

Changing only first two lines in a file


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

New User


Joined: 20 Feb 2008
Posts: 17
Location: India

PostPosted: Mon Jun 30, 2008 9:30 am
Reply with quote

Hi,

I have the following record structure being generated from an unload job which is to be used in a load job.

LOAD DATA REPLACE LOG NO INDDN SYSREC00
- INTO TABLE PSSA.PS_SDK_INSTALL
( column definitions)

But for the load job I need the following record structure

LOAD DATA RESUME YES LOG NO NOCOPYPEND ENFORCE NO
INDDN SYSREC00
INTO TABLE
PSDBDB.<tablename>
(column definitions same as in above record)

Will I be able to do this using ICETOOL? Could someone help me in building the INREC and OUTREC?Thanks!
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Jul 01, 2008 12:10 am
Reply with quote

Bhavanas,

The following JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                                           
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                     
LOAD DATA REPLACE LOG NO INDDN SYSREC00                             
----+----1----+----2----+----3----+----4----+----5----+----6----+----
- INTO TABLE PSSA.PS_SDK_INSTALL                                     
 BLAH BLAH1                                                         
 BLAH BLAH2                                                         
 ABCDEFG                                                             
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  OUTFIL IFOUTLEN=80,                                               
  IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),                       
  IFTHEN=(WHEN=(81,8,ZD,EQ,1),                                       
  BUILD=(C'LOAD DATA RESUME YES LOG NO NOCOPYPEND ENFORCE NO',80:X)),
  IFTHEN=(WHEN=(81,8,ZD,EQ,2),                                       
  BUILD=(C'INDDN SYSREC00',/,C'INTO TABLE',/,                       
         C'PSDBDB.',19,18,80:X))                                     
//*                                                                 


The output from this job is

Code:

LOAD DATA RESUME YES LOG NO NOCOPYPEND ENFORCE NO   
INDDN SYSREC00                                     
INTO TABLE                                         
PSDBDB.PS_SDK_INSTALL                               
 BLAH BLAH1                                         
 BLAH BLAH2                                         
 ABCDEFG                                           


Hope this helps...

Cheers
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top