IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

vsam status code is 39 while dynamically accessing the vsam


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhya rani

New User


Joined: 05 Dec 2006
Posts: 22
Location: hyderabad

PostPosted: Mon Apr 02, 2007 8:39 pm
Reply with quote

Hi,

Iam accessing the vsam file dynamically as follows

Code:

SELECT VSAMFILE           
       ASSIGN TO XXXXX           
       ORGANIZATION IS INDEXED                   
       ACCESS IS DYNAMIC             
       RECORD KEY IS NON-RR-CC-KEY   
       FILE STATUS IS VSAM-CODE.     

FD  VSAM-FILE               
    RECORD CONTAINS 200 CHARACTERS     
    DATA RECORD IS yyy-FILE.     
01 yyy-FILE.                     
    05 yyy-KEY.                 
       10 yy-POLICY-KEY PIC X(07).
    05 FILLER               PIC X(193).
                                       
MOVE ZERO TO VSAM-CODE.
OPEN INPUT VSAM-FILE.


after opening of file the staus code is 39 ---can u please let me know how this can be solved.

move key-value to vsam-key
START VSAM-FILE KEY IS EQUAL TO
NON-RR-CC-KEY.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Mon Apr 02, 2007 8:56 pm
Reply with quote

Hello,

Please also post the DEFINE for this file.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Apr 02, 2007 8:57 pm
Reply with quote

You do understand that there are manuals that have the answer you are looking for?
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.
Back to top
View user's profile Send private message
sandhya rani

New User


Joined: 05 Dec 2006
Posts: 22
Location: hyderabad

PostPosted: Mon Apr 02, 2007 9:02 pm
Reply with quote

can you let me know what is define.........[


quote="dick scherrer"]Hello,

Please also post the DEFINE for this file.[/quote]
Back to top
View user's profile Send private message
sandhya rani

New User


Joined: 05 Dec 2006
Posts: 22
Location: hyderabad

PostPosted: Mon Apr 02, 2007 9:06 pm
Reply with quote

I already have seen the same description for file-satus 39 but iam need to know what is the exact prob because if i have used access as sequencial for the same file in the same program iam able to open the file successfully and also was able to perform all the operations but the i wanted to decrease the perfromance time so only wanted to use the dynamic access for the same and i was getting the error details which i have mentioned in the initial query.


William Thompson wrote:
You do understand that there are manuals that have the answer you are looking for?
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.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Mon Apr 02, 2007 9:42 pm
Reply with quote

Hello,

Bill has posted the exact problem. If you cannot determine the reason from the information, the DEFINE will need to be posted here.

The DEFINE is how the vsam file was created. If you are not familiar with DEFINE, you need to talk to whoever created the file so you can see/post the control statements that created this file. Without the DEFINE, how do you know the record is 200 bytes long - and the key 7?
Back to top
View user's profile Send private message
sandhya rani

New User


Joined: 05 Dec 2006
Posts: 22
Location: hyderabad

PostPosted: Tue Apr 03, 2007 11:30 am
Reply with quote

Hi,

Ya i saw the vsam properties and the length of vsam file and length declared in program matches that is 200 length.

I could solve the problem thaks a lotz for all.

Thanks & regards,
Sandhya Rani


dick scherrer wrote:
Hello,

Bill has posted the exact problem. If you cannot determine the reason from the information, the DEFINE will need to be posted here.

The DEFINE is how the vsam file was created. If you are not familiar with DEFINE, you need to talk to whoever created the file so you can see/post the control statements that created this file. Without the DEFINE, how do you know the record is 200 bytes long - and the key 7?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Apr 03, 2007 7:21 pm
Reply with quote

Hello,

If the DEFINE and the code match, what was the problem icon_question.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts Dynamically build unload and load sta... DB2 14
No new posts purge jobs with return code 0 and ret... JCL & VSAM 6
No new posts Dynamically build sort control statem... SYNCSORT 18
No new posts VSAM LISTCAT INFORMATION JCL & VSAM 2
Search our Forums:


Back to Top