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
 
Copying a Flatfile to a VSAM file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mjshaheed

New User


Joined: 09 Apr 2007
Posts: 25
Location: Chennai,India

PostPosted: Mon Feb 25, 2008 3:55 am    Post subject: Copying a Flatfile to a VSAM file.
Reply with quote

Hi,

I need to copy a flat file to a vsam file which is being created at the time of the run.

Basically i am creating a VSAM file and copying the data from flat file to it.
Can you please tell me if the syntax that follows is correct?

Code:

//LOADSORT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN01  DD DSN=COL.FLAT.FILE,
//             DISP=SHR
//OUT01 DD DSN=COL.VSAM.FILE,
//            DISP=(NEW,CATLG,DELETE),
//            DCB=LRECL=29,
//            RECORG=KS,KEYLEN=29,KEYOFF=0,
//            UNIT=SYSDA,SPACE=(TRK,(10,10),RLSE)
//SYSIN    DD *
      REPRO  INFILE(IN01) OUTFILE(OUT01) REUSE
//*


Thanks,
Shahul
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Mon Feb 25, 2008 4:42 am    Post subject:
Reply with quote

Hello,

You might need to DELETE/DEFINE the vsam file before you REPRO into it.

There are multiple topics on how to define a vsam file in the forum (use "Search"). Here is the link to one of them:
http://ibmmainframes.com/viewtopic.php?t=17867&highlight=delete+define
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Feb 25, 2008 4:52 am    Post subject:
Reply with quote

Isn't there a REUSE verb for IDCAMS?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Feb 25, 2008 6:26 am    Post subject: Reply to: Copying a Flatfile to a VSAM file.
Reply with quote

Off hand, without actually running the code, it looks to me like it should work. Shahul, did you experience any problems with it?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Feb 25, 2008 3:24 pm    Post subject:
Reply with quote

And is the data sorted in key sequence ?
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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Copying a ps to member of a existing PDS Deepika Chikyala JCL & VSAM 10 Tue Sep 05, 2017 11:44 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm

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