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
 

 

Query : copying files without appending

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Query : copying files without appending
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Nov 25, 2008 10:44 pm    Post subject: Reply to: Query : copying files without appending
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

Senior Member


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

PostPosted: Tue Nov 25, 2008 11:48 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 5 Thu Jul 20, 2017 1:03 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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