| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
cvadlamudi
Joined: 19 Apr 2007
Posts: 56
Location: India
|
| Posted: Fri Sep 05, 2008 11:12 am Post subject: Initialize VSAM file |
|
|
Hi,
Is there any utility to initialize the VSAM file, before using in program.
Thanks & Regards,
Chandramouli.V |
|
| Back to top |
|
expat
Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...
|
| Posted: Fri Sep 05, 2008 11:35 am Post subject: |
|
|
| Why not repro in one record with high values in the key field. |
|
| Back to top |
|
muthuvel
Joined: 29 Nov 2005
Posts: 185
Location: Chennai
|
| Posted: Fri Sep 05, 2008 12:45 pm Post subject: Reply to: Initialize VSAM file |
|
|
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 |
|
revel
Joined: 05 Apr 2005
Posts: 132
Location: Bangalore/Chennai-INDIA
|
| Posted: Fri Sep 05, 2008 5:06 pm Post subject: |
|
|
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 |
|
dick scherrer
Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St
|
| Posted: Sat Sep 06, 2008 3:49 am Post subject: |
|
|
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 |
|
revel
Joined: 05 Apr 2005
Posts: 132
Location: Bangalore/Chennai-INDIA
|
| Posted: Mon Sep 08, 2008 12:53 pm Post subject: |
|
|
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 |
|
dick scherrer
Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St
|
| Posted: Mon Sep 08, 2008 8:24 pm Post subject: |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|