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: 10231
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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am


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