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

Query : copying files without appending


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ganesh_bv

New User


Joined: 01 Nov 2008
Posts: 9
Location: chennai

PostPosted: Tue Nov 25, 2008 10:10 pm
Reply with quote

i want to replace file 1 with file 2 using idcams

file 1 (flat file)

aaa
bbb

file 2 (vsam file)

ccc
ddd

output in file 2 should be

aaa
bbb

how to achieve this using single repro command

when i use repro command , file1 content merged with file2, as

aaa
bbb
ccc
ddd

but i want only file 1 content in file 2


file1 is flat file
file2 is vsam file

can we achieve in single repro command without deleting file2 and allocating file2 and copying with file1
Back to top
View user's profile Send private message
ganesh_bv

New User


Joined: 01 Nov 2008
Posts: 9
Location: chennai

PostPosted: Tue Nov 25, 2008 10:41 pm
Reply with quote

got the answer

REPRO INFILE(INFILE) OUTFILE(OUTFILE) REUSE
so OUTFILE will be replaced with INFILE

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 25, 2008 10:44 pm
Reply with quote

only if the cluster has been defined with the reuse option,
very dangerous if not properly planned
delete/define/repro is the proper general approach
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 25, 2008 11:48 pm
Reply with quote

Hi,

If this is for learning & you are working on "Test Data" ..fine; else please read the post from Enrico again.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts RC query -Time column CA Products 3
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top