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
 
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: 10374
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm

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