|
|
| Author |
Message |
rosmi joseph
New User
Joined: 17 Sep 2007 Posts: 38 Location: Kochi
|
|
|
|
Hi,
I have a file with the following record layout.
01 WS-FILE-REC.
03 WS-ORIG-KEY.
05 WS-DFTA-SEQ-NO PIC S9(9) COMP.
05 WS-DFTA-CA-NO-KEY PIC X(11).
03 WS-DATA-PART PIC X(965).
Here, WS-ORIG-KEY is the actual key of the vsam.
and WS-DFTA-CA-NO-KEY is the alternate key.
While reading this file in program, it is giving file status error '39'.
Please let me know the reason for this.
Thanks. |
|
| Back to top |
|
 |
References
|
Posted: Tue May 06, 2008 2:25 pm Post subject: Re: Getting file open error '39' for VSAM with alternate key |
 |
|
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1176 Location: germany
|
|
| Back to top |
|
 |
rosmi joseph
New User
Joined: 17 Sep 2007 Posts: 38 Location: Kochi
|
|
|
|
Hi,
I did check for the reason for status code 39. But i am unable to find what is going wrong.
My primary key is WS-ORIG-KEY, which is a combination of PIC S9(9) COMP and PIC X(11). So i have given the key as
INDEXED -
KEYS(14 1) -
in my vsam cluster definition.
The alternate key is WS-DFTA-CA-NO-KEY PIC X(11).
It is defined as below
KEYS(11 4) -
Once the vsam with alternate key is created and tried to open through program i am getting this status code 39.
also, in my jcl i have mentioned the vsam and the path also for using this alternate key.
Kindly, guide me on this.
Thanks. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1176 Location: germany
|
|
|
|
| what do your select and fd entries look like? also the jcl for the step execution of this program. |
|
| Back to top |
|
 |
rosmi joseph
New User
Joined: 17 Sep 2007 Posts: 38 Location: Kochi
|
|
|
|
Hi,
Please find below the SELECT and FD entries.
SELECT ICRS-FILE ASSIGN TO ICRSVSM
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS
WS-ORIG-KEY
ALTERNATE KEY IS WS-DFTA-CA-NO-KEY
WITH DUPLICATES
FILE STATUS WS-VSAM-FILE-STATUS.
FD ICRS-FILE.
*
01 WS-ICRS-REC.
03 WS-ORIG-KEY.
05 WS-DFTA-SEQ-NO PIC S9(9) COMP.
05 WS-DFTA-CA-NO-KEY PIC X(10).
03 WS-DATA-PART PIC X(965).
In my jcl i have given the VSAM and the path name also.
//ICRSVSM DD DSN=DACCAR.Z.HOKO.CYC7.DEC07.VSAM,
// DISP=SHR
//ICRSVSM1 DD DSN=DACCAR.Z.HOKO.CYC7.DEC07.VSAM.PATH,
// DISP=SHR
Not sure if the PIC S9(9) COMP is creating probs.
Thanks. |
|
| Back to top |
|
 |
rosmi joseph
New User
Joined: 17 Sep 2007 Posts: 38 Location: Kochi
|
|
|
|
Hi,
Putting the FD entries once again due to a mistake.
FD ICRS-FILE.
*
01 WS-ICRS-REC.
03 WS-ORIG-KEY.
05 WS-DFTA-SEQ-NO PIC S9(9) COMP.
05 WS-DFTA-CA-NO-KEY PIC X(11).
03 WS-DATA-PART PIC X(965).
Thanks. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1176 Location: germany
|
|
|
|
well, enrico or cics_guy will have to come along and save your butt,
but, how do you expect your cobol program to access (or even use) the following DD statement from your jcl?
| Code: |
//ICRSVSM1 DD DSN=DACCAR.Z.HOKO.CYC7.DEC07.VSAM.PATH,
// DISP=SHR
|
|
|
| Back to top |
|
 |
rosmi joseph
New User
Joined: 17 Sep 2007 Posts: 38 Location: Kochi
|
|
|
|
I am not really sure. I havent worked on Alternate index before.
Please guide me as to what change is needed in program. |
|
| Back to top |
|
 |
|
|