MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copy sequential dataset to VSAM

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
whizkid79
Beginner


Joined: 29 Sep 2004
Posts: 53
Topics: 14

PostPosted: Wed Jun 15, 2005 1:55 pm    Post subject: Copy sequential dataset to VSAM Reply with quote

Hi,

How can i copy a sequential dataset to a VSAM

Thanks,
Whizkid79
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Jun 15, 2005 2:22 pm    Post subject: Reply with quote

whizkid79,

IDCAMS method:


Code:

//STEP0100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN       DD DSN=YOUR SEQ FILE,
//            DISP=SHR
//OUT      DD DSN=YOUR EXISTING EMPTY VSAM FILE,
//            DISP=OLD
//SYSIN DD *
  REPRO INFILE(IN) OUTFILE(OUT) REPLACE
/*




Sort:

Code:

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD  SYSOUT=*                                 
//SORTIN   DD  DSN=YOUR INPUT SEQ FILE,
//             DISP=SHR                                 
//SORTOUT  DD  DSN=YOUR EXISTING EMPTY VSAM FILE,
//             DISP=OLD
//SYSIN    DD  *
  SORT FIELDS=COPY
/*


File-aid Method:
Code:

//STEP0100 EXEC PGM=FILEAID,REGION=6M                   
//SYSPRINT DD  SYSOUT=*                                 
//SYSLIST  DD  SYSOUT=*                                 
//DD01     DD  DSN=YOUR INPUT SEQ FILE,
//             DISP=SHR                                 
//DD01O    DD  DSN=YOUR EXISTING EMPTY VSAM FILE,
//             DISP=OLD
//SYSIN    DD  *
$$DD01 COPY
/*


If you get an error code of 160 during repro then your vsam file is not initialiazed. check this topic for explanation

http://www.mvsforums.com/helpboards/viewtopic.php?t=3806&highlight=vsam+rba

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
whizkid79
Beginner


Joined: 29 Sep 2004
Posts: 53
Topics: 14

PostPosted: Wed Jun 15, 2005 2:36 pm    Post subject: Reply with quote

Thanks Kolusu.

I tried the sort logic and got the error "VSAM LOGICAL ERROR 0C ON OUTPUT"

The seq file has duplicate keyed records. Because of this IDCAMS is not copying the records o the KSDS vsam file. Any solution for this?

Thanks,
Whizkid79.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Jun 15, 2005 2:40 pm    Post subject: Reply with quote

Whizkid79,

Did you get a chance to look at this topic ?

http://www.mvsforums.com/helpboards/viewtopic.php?t=2014&highlight=vsam+init

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
whizkid79
Beginner


Joined: 29 Sep 2004
Posts: 53
Topics: 14

PostPosted: Wed Jun 15, 2005 2:49 pm    Post subject: Reply with quote

I'l go through the link.

Thanks,
Whizkid79
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group