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 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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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