Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Initialize VSAM file

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

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Fri Sep 05, 2008 11:12 am    Post subject: Initialize VSAM file
Reply with quote

Hi,

Is there any utility to initialize the VSAM file, before using in program.

Thanks & Regards,
Chandramouli.V
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 Sep 05, 2008 11:35 am    Post subject:
Reply with quote

Why not repro in one record with high values in the key field.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Fri Sep 05, 2008 12:45 pm    Post subject: Reply to: Initialize VSAM file
Reply with quote

I guess it is a shop specific utilty VSAMINIT.It may/maynot be available at your firm.
If available,the way to code it is

Code:
//R020     EXEC PGM=VSAMINIT,PARM='LOW',COND=(0,LT)   
//INIT01   DD  DSN=<VSAM File Name>,       
//             DISP=SHR                               
//SYSOUT   DD  SYSOUT=*                               
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Sep 05, 2008 5:06 pm    Post subject:
Reply with quote

In case, there is no VSAMINIT utility in your shop...Try this..

Write a simple program whcih will open VSAM DATASET(One which u need to initialize) in OUTPUT MODE then Close it.

Just Run this program, VSAM will get initialized....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Sep 06, 2008 3:49 am    Post subject:
Reply with quote

Hello,

If you use this approach, i'd recommend writing one record of all high-values into the file before closing it.

Many processes have problems with completely empty vsam files.
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Mon Sep 08, 2008 12:53 pm    Post subject:
Reply with quote

Dick,

Quote:
If you use this approach, i'd recommend writing one record of all high-values into the file before closing it.


Initialization means; not writing dummy record or 1 record with high values to an existing empty file..

Just for clarification,

consider a scenario; after inserting 1 record with high values to an empty dataset and you are processed that Dataset, now we are having couple of record for which we need to generate REPORT..

Since we are having 1 record with High values in vsam dataset, we need to have logic to bypass the record which is having high values, its quite cubersome process..

so, instead of doing so... we can open that Empty dataset in OPEN Mode and Close it.. It will initialize VSAM dataset for you..

Even you cross verify by 3.4 option beyond that VSAM dataset

by coding

Print ID(/) Char then ENTER

on executing above command u will get return code as Zero, it measn that The Dataset get initialized..
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Sep 08, 2008 8:24 pm    Post subject:
Reply with quote

Hello,

Quote:
Since we are having 1 record with High values in vsam dataset, we need to have logic to bypass the record which is having high values, its quite cubersome process..
Yes, the high-values records would need to be handled, but if this done automatically for all vsam in that particular system, it is not cumbersome - it is in place from the beginning and every program would have the small extra bit to ignore the high-values record.

I don't say this is a requirement, just that many systems are built this way to prevent ugly surprises when some new process stumbles on the "empty" file.

More important is that any files/programs be built according to the standards of the organization. Regardless of the approach, it is best if all of the development follow the standards.
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us