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

How do you initialize a VSAM file before any operation?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
patlolla

New User


Joined: 05 Jun 2006
Posts: 10

PostPosted: Wed Oct 21, 2009 1:52 pm
Reply with quote

How do you initialize a VSAM file before any operation? a VSAM with alternate index?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 21, 2009 2:09 pm
Reply with quote

Write a dummy record into the base cluster.
Usually a record with a key value of either low or high values.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 582
Location: London

PostPosted: Tue Jan 05, 2010 9:24 pm
Reply with quote

There's program around called VSAMINIT that can insert and optionally delete a record into VSAM files including AIX's. We use it regularly to prime CICS datasets because CICS fails to open empty newly defined VSAM files.

There's plenty of examples if you google it...e.g. www.system-support.com/vsaminit.asm provides source code and example JCL. We have found some occasions that ESDS's inexplicably won't work with this.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 05, 2010 9:33 pm
Reply with quote

To use your own program to load a key-sequenced data set, first sort the records (or build them) in key sequence, then store them sequentially. When you are initially loading a data set, direct access is not permitted.

Even IDCAMS REPRO can fill an empty vsam dataset, without any initializing.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 05, 2010 9:55 pm
Reply with quote

B.t.w i forgot to mention the following :

A data set in VSAM load mode cannot have alternate indexes in the upgrade set. If you want to create and load a data set with alternate indexes, you must use AMS, or some other suitable batch program, to load the data set and invoke BLDINDEX to create the alternate indexes.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
Search our Forums:

Back to Top