View previous topic :: View next topic |
Author |
Message |
Rahull Beginner
Joined: 29 Jan 2004 Posts: 62 Topics: 19
|
Posted: Tue Jun 08, 2004 12:52 am Post subject: Verify Command Giving Error!! |
|
|
Hi,
I have a JCL which has following steps:
a) Get the INPUT file.
b) Delete and define the VSAM.
c) Load the VSAM using <Step a> INPUT file.
d) VERIFY the VSAM.
e) Check the Cond Code of VERIFY and if it is greater than 4 , then Execute STOPEXEC.
f) Run Program XYZ which use the above created VSAM as an Input file and open in INPUT mode.
Now the Problem is when the INPUT file comes Empty...
---Repro step is giving the MAXCC = 0 but VERIFY giving MAXCC = 12. Why? ( I knew that u can't repro empty file but why I am not getting abend in REPRO step itself)
---How could we handle the above functionality with minimal change in the Program and JCL in a case of Empty file so that JCL run Smooth without any abend??
--- Do we have to add the Dummy record in VSAM ?? Or is there any othere way ?? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Jun 08, 2004 5:26 am Post subject: |
|
|
Rahul,
A newly created vsam file will have a zero value in HURBA(HI-USEDRBA) .In order to open the file for input or update processing , it requires that at least one data record be initially loaded into the file. This is because VSAM issues a VERIFY command upon opening a file to reset the end-of-file pointer. If the file has never been loaded, the VERIFY fails because the high used RBA (Relative Byte Address) (HI-USEDRBA) is still zero. Therefore, VSAM files must be initially "loaded" to set the HI-USED-RBA to a value other than zero. This is done by writing a record to the VSAM file in "load" mode and optionally deleting the record to empty the file while leaving the HI-USED-RBA at a non-zero value.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|