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

getting file status 39 when opening a vsam file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sujan_mf

New User


Joined: 09 Mar 2005
Posts: 7

PostPosted: Thu Dec 18, 2008 9:14 am
Reply with quote

Hi,

I am trying to open a VSAM file for read. But it is giving me a file status 39 in spite of the file attributes matching. Does any one know any other reason why the VSAM file open error is happening?


Input File :

SELECT MASTER-FILE ASSIGN TO DDMAST
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS VENDOR-ID
FILE STATUS IS WS-MASTER-FS.

FILE SECTION.
FD MASTER-FILE
RECORD CONTAINS 80 CHARACTERS
DATA RECORD IS MASTER-REC.

01 MASTER-REC.
05 ITEM-ID PIC 9(04) VALUE ZEROS.
05 ITEM-DESC PIC X(10) VALUE SPACES.
05 ITEM-QTY PIC 9(04) VALUE ZEROS.
05 ITEM-DATE PIC X(26) VALUE SPACES.
05 ITEM-NO PIC X(05) VALUE SPACES.
05 ITEM-NAME PIC X(10) VALUE SPACES.
05 FILLER PIC X(21) VALUE SPACES.

Cluster Definition

DEFINE CLUSTER -
(NAME(ISTEST.KSDS.ITEM) -
VOLUME(VPWRKJ) -
TRACKS(10 5) -
CISZ(4096) -
FREESPACE(10 20)-
KEYS(5 0) -
RECORDSIZE(40 80)) -
DATA (NAME(ISTEST.KSDS.ITEM.DATA)) -
INDEX (NAME(ISTEST.KSDS.ITEM.INDEX))

JCL
//DB2EXEC EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=DSN810.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//*
//DDMAST DD DSN=ISTEST.VENDOR.MASTER,DISP=SHR
//DDREPORT DD DSN=ISTEST.MONTHLY.INSERT.REPORT,DISP=SHR
//SYSTSIN DD *
DSN SYSTEM(DB8G)
RUN PROGRAM(INSRTPGM) -
PLAN(INSRTPGM)
LIB('ISTEST.VENDOR.LOADLIB')
END
/*
//

My program is using DB2 also…
Please help me out on this.-
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Dec 18, 2008 9:33 am
Reply with quote

Hello,

Your program has a fixed length file definition, but the vsam file is variable.
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Thu Dec 18, 2008 11:32 am
Reply with quote

Hi sujan,

Define the recording mode cluse in the program.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 6
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top