Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
getting file status 39 when opening a vsam file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: getting file status 39 when opening a vsam file
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

Site Director


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

PostPosted: Thu Dec 18, 2008 9:33 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us