View previous topic :: View next topic
|
Author |
Message |
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
there is a cobol program which writes and re-writes the VSAM dataset, the content of VSAM data set is used to generate a REPORT.
The VSAM data set is an empty dataset before the data written to it, the file opened in I/O mode because VSAM processing involves both write and rewrite.
To do this process we have a JCL which DELETES the cluster and CREATES the cluster every time the JCL is sbmitted, but still when we check the VSAM dataset was not intialised.
We did write another small program and opened the VSAM in OUTPUT mode and closed the VSAM, we keep this program execution in one STEP of JCL before the actual progam, But still the VSAM data set is not intialised.
Is there is any way, so that we can intialise the empty VSAM dataset thru JCL
Thanks in Advance. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Vasanth,
What do you mean by both write and rewrite.? If you want to reuse the cluster define it with REUSE option instead of deleting it and creating it again.
Thanks,
Arun |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
To initialise the VSAM cluster, you usually write a record to it.
It is common practice, and common sense if you ask me, that every VSAM KSDS has a low and high values record inserted as default. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
to have a vsam dataset initialized open and close is not enough...
search the net for something like "VSAM INITIALIZATION" You will find many useful hits
www.cbttape.org file183 for example |
|
Back to top |
|
|
mymains Currently Banned New User
Joined: 24 Apr 2008 Posts: 5 Location: Banglore
|
|
|
|
Hi Vasanth,
i think by using a GDG we can easily solve this problem being u creating a report it is quite useful compared to use simple vsam files\
thnkz
Mymains |
|
Back to top |
|
|
jaspal
New User
Joined: 22 May 2007 Posts: 68 Location: mumbai
|
|
|
|
Hi,
1). To initialize the VSAM ,you can open it once in output mode and close it in program during initializaton, it could solve your problem.
after that again open it in I/o mode.
2) write a step in jcl whic delete defines VSAM and REPRO some records from a flat file Say GDG version.
this step should be executed before program uses VSAm.
Regards,
Jaspal @ 9833814470 |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If you have DITTO, you can initialize a newly created record with low-values, via -
Code: |
$$DITTO BVS FILEOUT=XXXXXXXX,NLRECS=1,RECSIZE=nnnnn,FILLCHAR=X'00'
|
HTH....
Regards,
Bill |
|
Back to top |
|
|
|