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

how to convert a flat file to a ksds vsam file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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: 3156
Location: Tucson AZ

PostPosted: Wed Feb 14, 2007 8:46 pm
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
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: 3156
Location: Tucson AZ

PostPosted: Thu Feb 15, 2007 7:00 pm
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: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 7:34 pm
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 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 4
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