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
 

 

how to convert a flat file to a ksds vsam file

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

New User


Joined: 22 Aug 2006
Posts: 17
Location: India Kolkata

PostPosted: Wed Feb 14, 2007 5:33 pm    Post subject: how to convert a flat file to a ksds vsam file
Reply with quote

Hi,
How to convert a flat file to a vsam file without using define cluster commands.
Back to top
View user's profile Send private message

prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Wed Feb 14, 2007 5:48 pm    Post subject:
Reply with quote

j_rymbei,
I don't think there is any utility that would convert a flat file to KSDS, instead create a KSDS vsam file and then REPRO the flat file data to the created KSDS file. This would surely work icon_biggrin.gif



Cheer's,

Thamilzan.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Wed Feb 14, 2007 8:46 pm    Post subject:
Reply with quote

Check the JCL manual, I faintly recall that all needed vsam info is possible there.
Back to top
View user's profile Send private message
j_rymbei

New User


Joined: 22 Aug 2006
Posts: 17
Location: India Kolkata

PostPosted: Thu Feb 15, 2007 6:54 pm    Post subject:
Reply with quote

Check this out. It will work only if SMS is active in your profile or system..

//VKSDS1 DD DSN=DAVE.CUST.MASTER,DISP=(,CATLG,DELETE),
// SPACE=(CYL,(10,10)),LRECL=100,KEYOFF=10,
// KEYLEN=12,RECORG=KS
//*
//VKSDS2 DD DSN=&LEVEL.CUST.ADDR,DISP=(,CATLG,DELETE),
// SPACE=(TRK,(5,10)),LRECL=55,KEYOFF=0,
// KEYLEN=12,RECORG=KS,DATACLAS=VSDEF



KEYOFF specifies the offset of the key field, while KEYLEN specifies the length of the key field. These two statements take the place of the KEYS parameter in the IDCAMS DEFINE statement. (Don't forget that the key offset starts at position 0)


RECORG is used to specify the type of VSAM dataset, for example RECORG=KS would specify a Key Sequenced Data Set (KSDS). Valid values are KS (for Key sequenced datasets), ES (for Entry Sequenced Datasets), RR (for relative record datasets) and LS (for VSAM linear space datasets).
If you do not specify a volume (UNIT and VOL parameters) where the dataset is to be kept then SMS will automatically select a volume.


For all the other parameters required on an IDCAMS DEFINE, default values will be assumed, unless you specify a DATACLAS parameter which can be used to point to a data class containing default values for RETPD, volume count, IMBED, REPLICATE, CISIZE, FREESPACE and SHAREOPTIONS. If you specify a DATACLAS and, say, a UNIT and VOL parameters then the UNIT/VOL will override the defaults in the DATACLAS.


You also specify the space to be allocated for the VSAM cluster using the SPACE parameter as you would for any non-VSAM file. If you code RLSE then this will be ignored. CONTIG or ROUND will cause a JCL error.


On the DSN parameter you can only code the name of the dataset, you cannot specify the names of any data or index components. Any data or index components will be created as the dataset name plus either .DATA or .INDEX
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Feb 15, 2007 7:00 pm    Post subject:
Reply with quote

Thanks, I knew I saw it somewhere...BTW, Which manual did you find it in, the JCL Language Reference?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 7:34 pm    Post subject:
Reply with quote

Bill, page 38 shows:
Quote:
Direct Allocation Using JCL
You can directly allocate VSAM data sets through JCL.
The following example allocates a new data set and, with DATACLAS, uses the
allocation attributes predetermined by the storage administrator through the ACS
routines.
//DD1 DD DSNAME=EXAMPLE1,DATACLAS=DCLAS01,
// DISP=(NEW,KEEP)
See OS/390 MVS JCL User?s Guide and OS/390 MVS JCL Reference for
information about JCL keywords.
10 OS/390 V2R10.0 DFSMS Access Method Services for Catalogs


Googled this:
document 3.9MB
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 file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
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


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