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 do you initialize a VSAM file before any operation?

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

New User


Joined: 05 Jun 2006
Posts: 10

PostPosted: Wed Oct 21, 2009 1:52 pm    Post subject: How do you initialize a VSAM file before any operation?
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 21, 2009 2:09 pm    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Tue Jan 05, 2010 9:24 pm    Post subject:
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. http://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: 2435
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 05, 2010 9:33 pm    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 05, 2010 9:55 pm    Post subject:
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    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