View previous topic :: View next topic |
Author |
Message |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Thu Mar 10, 2005 2:52 am Post subject: not able to print an alternate index file |
|
|
Hi,
Doesnt print command work on alternate index ??
I defined an alternate index, then did buildindex and then defined path.
After that when i try to print the alternate index file, it shows me
Code: |
PRINT INFILE(INDD) CHAR 00061011
IDC3300I ERROR OPENING Pxxxx.KSDS.ALTIDX
IDC3351I ** VSAM OPEN RETURN CODE IS 160
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
******************************** BOTTOM OF DATA ********************************
|
Any thoughts y this?
By the way when i say in alternate index definition KEYS(7 6) it means that in the base cluster at position 7 and of length 7 i have my alternate key values..isnt it ??
Thanks,
Deepesh |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Thu Mar 10, 2005 10:25 am Post subject: |
|
|
deepeshk79,
The error you are getting is due to non-initialized vsam cluster.
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 |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Fri Mar 11, 2005 1:30 am Post subject: |
|
|
Hi Kolusu,
Thanks for your explanation. However i have already loaded the VSAM KSDS cluster with data, on which iam creating my alternate index KSDS.
Then when we do bldindx, it shoud load the keys from the base cluster to the alternate cluster. The bldindx and the define jobs path are running successfully, however when i try printing my altindx cluster it is not printing.
Still in the soup!!!
Deepesh |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Fri Mar 11, 2005 8:51 am Post subject: |
|
|
Deepesh,
Try the following order
Code: |
1) Create the vsam cluster
2) Add/load one record into the vsam cluster
3) Create Alternate Index
4) Build Alternate Index
5) Create Path for the Alternate Index
6) Load all the records into Base Cluser
|
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
tictac Beginner
Joined: 24 Apr 2005 Posts: 8 Topics: 3 Location: Earth
|
Posted: Sun May 08, 2005 11:18 pm Post subject: |
|
|
kolusu wrote: | deepeshk79,
The error you are getting is due to non-initialized vsam cluster.
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 |
hi kolusu, i am having the same problem...
how can you do this in the JCL? can you give me a step on how to do this?
thanks! |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|