View previous topic :: View next topic
|
Author |
Message |
mframe-guy
New User
Joined: 03 Dec 2020 Posts: 6 Location: India
|
|
|
|
Hi,
I have got a file status of -39 while the program is trying to open a VSAM - KSDS (variable length file).
Below are the details of the VSAM file as available in the program:
Code: |
SELECT VSM-FILE ASSIGN TO VSAMFL
ORGANIZATION IS INDEXED
ACCESS MODE IS RANDOM
RECORD KEY VSM-KEY
STATUS IS WS-VSMFL-STATUS.
FD VSM-FILE
RECORD IS VARYING IN SIZE
DEPENDING ON WS-VSM-LEN.
01 VSM-RECORD.
05 VSM-KEY PIC X(08).
05 VSM-DAT1 PIC X(02).
05 VSM-DAT2 PIC 9(03).
05 VSM-DAT3 PIC X(5374).
01 WS-VSM-LEN PIC 9(04). |
Some of the physical attributes of the variable length KSDS VSAM file:
Dataset Type: KSDS
CI Size: 4096
CI's per CA: 180
Avg Recordsize: 95
Max Recordsize: 5387
Key Length: 8
Key Offset: 0
Cross Region Shropt: 2
Cross System Shropt: 3
Please let me know if I need to provide further information. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
A file status 39 means the COBOL program attributes for the data set do not match the physical attributes of the data set. From the COBOL Language Reference manual:
Quote: |
The OPEN statement was unsuccessful because a conflict was
detected between the fixed file attributes and the attributes specified
for that file in the program. These attributes include the
organization of the file (sequential, relative, or indexed), the prime
record key, the alternate record keys, the code set, the maximum
record size, the record type (fixed or variable), and the blocking
factor. |
So you need to get a LISTCAT of the VSAM data set and compare these attributes to see which don't match and change your program.
Note: for this particular problem, the CI SIZE and shareoptions (among others) don't matter since COBOL doesn't know about them. |
|
Back to top |
|
|
mframe-guy
New User
Joined: 03 Dec 2020 Posts: 6 Location: India
|
|
|
|
Thank you Robert
I had performed LISTCAT and it seems some of the attributes of the file has been changed, because the file has been DROPPED and created with new KEYLEN and total length during refresh by the application team and this i am not aware of and followed the old parameters, hence the issue.
So, I have updated my code with updated KEY length and other parameters, later it worked.
Sorry for the late response; Thanks once again |
|
Back to top |
|
|
|