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

Write a jcl to copy one vsam file into another


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

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Fri Jan 05, 2007 10:13 pm
Reply with quote

1.
File1:
abcdefgh
1234567
987654321

Write a JCL to create File2 as mirror image of File1

2.
File 1 :
FIRST NAME 1
FIRST NAME 2
FIRST NAME 3
FIRST NAME 4

FILE2 :
LAST NAME 1
LAST NAME 2
LAST NAME 3
LAST NAME 4

WRITE A JCL TO CREATE
FILE3 :
FIRST NAME 1 LAST NAME 1
FIRST NAME 1 LAST NAME 1
FIRST NAME 1 LAST NAME 1
FIRST NAME 1 LAST NAME 1

3. Write a jcl to copy one vsam file into another

Please let me know the answers...

Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 05, 2007 10:48 pm
Reply with quote

Hello,

If you move this to the dfsort forum you'll most likely get multiple answers.

If you search the dfsort forum, i believe this has already been solved there.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jan 05, 2007 10:49 pm
Reply with quote

ranjitbhingare,

I take it from your post that you have limited, if any JCL experience. Is this correct?

Please let us know you JCL knowledge level, and whatever you have coded so far for these exercises.

What utilities are you allowed to use in your JCL?

We can help you walk through this?
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Fri Jan 05, 2007 11:32 pm
Reply with quote

Hi,

I don't want to use DFSORT. Can anyone give me the solution with normal SORTCARD and MERGE ?

Thanks...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jan 06, 2007 12:15 am
Reply with quote

Hello,

The SORT and MERGE cards ARE part of dfsort or whatever your sort software is. Is there a reason (other than experimenting) to not use the sort?

To create a mirror of a sequential dataset you can use:
Code:

//MIRROR1  EXEC PGM=IEBGENER                                         
//SYSUT1   DD DSN=OLDSTUFF,DISP=OLD                                 
//SYSUT2   DD DSN=NEWSTUFF,DISP=(NEW,CATLG,DELETE),UNIT=WHATEVER,   
//            SPACE=(SAME AS SYSUT1 IF ON DASD)                     
//SYSIN    DD DUMMY                                                 
//SYSOUT   DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=*                                               
//                                                                   
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
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
Search our Forums:

Back to Top