Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us