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

copy to an exist sam file


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

New User


Joined: 05 Sep 2005
Posts: 12
Location: P.R.C

PostPosted: Thu Oct 20, 2005 12:33 pm
Reply with quote

Hi,
I want to copy the content of SAM FILE1 to SAM FILE2, but SAM FILE2 is already exist. I tried to use IEBGERNER,but returncode is 12 because of existing of file2.
Who can tell me How to resolve the problem?

Thanks

Jerry
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Thu Oct 20, 2005 12:38 pm
Reply with quote

what r ur disp parameters....
y dont u use DISP=MOD and try with PGM=SORT utility....
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Oct 20, 2005 12:42 pm
Reply with quote

Hi Husj,

Please elaborate your problem,

What do u mean by sam File, Is it VSAM file or Flat file?

Do u want creat a replica of Sam file or or do yo want to add ib file 2.

Regards

Rupesh
Back to top
View user's profile Send private message
husj

New User


Joined: 05 Sep 2005
Posts: 12
Location: P.R.C

PostPosted: Fri Oct 21, 2005 8:21 am
Reply with quote

Hi, Rupesh,

FILE1 and FILE2 are all flat file and already exist. I want to cover FILE2 with FILE1. i.e. I do not need the old data in FILE2. JCL is like this,

//FILECPY1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FILE1,DISP=SHR
//SYSUT2 DD DSN=FILE2,DISP=SHR
//SYSIN DD DUMMY

Maybe IEBGENER can not complete this function. But I do not how to do

regards
Back to top
View user's profile Send private message
husj

New User


Joined: 05 Sep 2005
Posts: 12
Location: P.R.C

PostPosted: Fri Oct 21, 2005 9:16 am
Reply with quote

hi,everybody,

I found the way to resolve the problem. PGM=SORT can work.
Thanks for your help

regards

Jerry
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top