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
 

 

Converting flat file to VSAM using JCL only

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

New User


Joined: 12 Mar 2007
Posts: 15
Location: Philippines

PostPosted: Fri Mar 23, 2007 2:54 pm    Post subject: Converting flat file to VSAM using JCL only
Reply with quote

Hi guys... i need to convert an input flat file into a VSAM file with the use of JCL only. can anyone suggest to me the utility that i should use. just to be more detailed, i need to convert my input INFILE to OUTFILE.VSAM setting it's first field as the key.


i'll appreaciate your suggestions guys...thanks.
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: Fri Mar 23, 2007 3:03 pm    Post subject:
Reply with quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2I230/30.0?DT=20040628101835

Dead easy - there are manuals available with the manuals button at the top of this page[/url]
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Mar 23, 2007 3:04 pm    Post subject:
Reply with quote

Sort and idcams are two, maybe gener too.
Back to top
View user's profile Send private message
timburkart

New User


Joined: 17 Mar 2007
Posts: 30
Location: USA

PostPosted: Fri Mar 23, 2007 8:00 pm    Post subject: Re: Converting flat file to VSAM
Reply with quote

You can code the JCL in a number of different ways but these are the logical steps.

1) Use SORT to sort the flat file by key
2) Use IDCAMS to define the new KSDS cluster
3) Load sorted file (#1) into VSAM file (#2).

regards,

tim
Back to top
View user's profile Send private message
guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Mar 26, 2007 1:53 pm    Post subject:
Reply with quote

a sample code is as follows-

//REPRO EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//IN01 DD DSN=(Input flat file),DISP=SHR
//OUT01 DD DSN=(Output VSAM file name),DISP=OLD
//SYSIN DD *
REPRO INFILE(IN01) OUTFILE(OUT01) REPLACE
/*

if output VSAM file is not defined then you need to define it firsh
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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