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
 
Changing only first two lines in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Changing only first two lines in a file
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    Post subject:
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    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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

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