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
 

 

Copy two different length files

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

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Thu Mar 18, 2010 6:22 pm    Post subject: Copy two different length files
Reply with quote

I have input1 file FB,RL=5
RECORD in input file are like this

ABCDE
SSSSS
DDDDD
NNNNN

I have second file FB,RL=10
Which have RECORD

RRRRRRRRRR
TTTTTTTTTTT

I want to copy all records of Input1 & input2 file to a variable length file of RL=4 . so the output will be
ABCDE
SSSSS
DDDDD
NNNNN
ABCDE
SSSSS
DDDDD
NNNNN
RRRRRRRRRR
TTTTTTTTTTT
Back to top
View user's profile Send private message

shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Thu Mar 18, 2010 6:35 pm    Post subject:
Reply with quote

Please ignore previous post that has some errors:-


I have input1 file FB,RL=5
RECORD in input file are like this

ABCDE
SSSSS
DDDDD
NNNNN

I have second file FB,RL=10
Which have RECORD

RRRRRRRRRR
TTTTTTTTTTT

I want to copy all records of Input1 & input2 file to a variable length file of RL=14 . so the output will be

ABCDE
SSSSS
DDDDD
NNNNN
RRRRRRRRRR
TTTTTTTTTTT
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Mar 18, 2010 10:14 pm    Post subject: Reply to: Copy two different length files
Reply with quote

shr_amar,

The following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL             
//TOOLMSG  DD SYSOUT=*                   
//DFSMSG   DD SYSOUT=*                   
//FB05     DD DSN=Your 05 byte FB file,DISP=SHR
//FB10     DD DSN=Your 10 byte FB file,DISP=SHR
//OUTV     DD DSN=your output 14 byte VB file,
//            DISP=(MOD,CATLG,DELETE),   
//            UNIT=SYSDA,               
//            SPACE=(CYL,(X,Y),RLSE)     
//TOOLIN   DD *                         
  COPY FROM(FB05) USING(CTL1)           
  COPY FROM(FB10) USING(CTL1)           
//CTL1CNTL DD *                         
  INREC OVERLAY=(14:X)                   
  OUTFIL FNAMES=OUTV,FTOV,BUILD=(1,10)   
//*
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm


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