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
 

 

VSAM file opening file status 39

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Chethana

New User


Joined: 26 Nov 2007
Posts: 6
Location: Bangalore

PostPosted: Tue Sep 23, 2008 5:50 pm    Post subject: VSAM file opening file status 39
Reply with quote

Hi ,

I am rying to open a VSAM file for write. But it is giving me a file status 39 inspite of the file attributes matching. Does any one know any other reason why the VSAM file open error is happening.

*
* Input - Output file
*
Code:
     SELECT OUTPUT-VSAM-FILE  ASSIGN  OUTDD
            ORGANIZATION         IS   INDEXED
            ACCESS MODE          IS   DYNAMIC
            RECORD KEY           IS   WSAA-GA-CODE6
            ALTERNATE RECORD KEY IS   WSAA-ABI-CODE
            FILE STATUS          IS   WS-OUTPUT-STAT.

*
*
Code:
 FD  OUTPUT-VSAM-FILE
     RECORD CONTAINS 110 CHARACTERS
     DATA RECORD IS WSAA-ALTMMTBL-REC.

*
Cluster definition
===========
Code:
  DEFINE CLUSTER (NAME(ISTEST.ABI.TEST.MMODEL4)          -
                  CYLINDERS(20,10)                       -
                  CONTROLINTERVALSIZE(4096)              -
                  FREESPACE(10,20)                       -
                  KEYS(6,8)                              -
                  RECORDSIZE(110,110))                   -
         DATA    (NAME(ISTEST.ABI.TEST.MMODEL4.DATA))    -
         INDEX   (NAME(ISTEST.ABI.TEST.MMODEL4.INDEX)    -
                  CONTROLINTERVALSIZE(1024))
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8051
Location: East Dubuque, Illinois, USA

PostPosted: Tue Sep 23, 2008 5:58 pm    Post subject:
Reply with quote

Quote:
But it is giving me a file status 39 inspite of the file attributes matching
Wrong. You think the file attributes match. COBOL disagrees, which is why you got the 39 file status. And you did not post key data -- the 01 definition for the file under FD OUTPUT-VSAM-FILE. Furthermore, your COBOL code references an alternate record key but you did not post the definition for it, either. If you don't have an alternate index on the file, remove the ALTERNATE RECORD KEY clause.
Back to top
View user's profile Send private message
Chethana

New User


Joined: 26 Nov 2007
Posts: 6
Location: Bangalore

PostPosted: Tue Sep 23, 2008 6:20 pm    Post subject: Reply to: VSAM file opening file status 39
Reply with quote

Alternate index has also been defined.

Code:
  DEFINE AIX (NAME(ISTEST.ABI.TEST.MMODEL4.ABI.AIX)         
              RELATE(ISTEST.ABI.TEST.MMODEL4)               
              CYLINDERS(10,10)                             
              CONTROLINTERVALSIZE(4096)                     
              FREESPACE(10,20)                             
              KEYS(8,0)                                     
              NONUNIQUEKEY                                 
              UPGRADE                                       
              RECORDSIZE(19,613))                         
         DATA (NAME(ISTEST.ABI.TEST.MMODEL4.ABI.AIX.DATA)) 
         INDEX (NAME(ISTEST.ABI.TEST.MMODEL4.ABI.AIX.INDEX))


01 definition is
Code:
 FD  OUTPUT-VSAM-FILE
     RECORD CONTAINS 110 CHARACTERS
     DATA RECORD IS WSAA-ALTMMTBL-REC.
*
 01 WSAA-ALTMMTBL-REC.
    03 WSAA-ABI-CODE             PIC 9(08).
    03 WSAA-GA-CODE6.
       05 WSAA-GA-CODE6-2        PIC X(02).
       05 WSAA-GA-CODE6-4        PIC X(04).
    03 WSAA-LOOKUP-KEY           PIC X(08).
    03 WSAA-START-YEAR-IN        PIC 9(02).
    03 WSAA-GA-CODE2             PIC X(02).
    03 WSAA-GA-CODE-PART2        PIC X(02).
    03 WSAA-CC                   PIC 9(04).
    03 WSAA-GA-GROUP             PIC X(03).
    03 WSAA-ABI-GROUP            PIC X(03).
    03 WSAA-CONTROL-IND          PIC X(01).
    03 WSAA-START-YEAR           PIC 9(02).
    03 WSAA-WITHDRAW-YEAR        PIC X(02).
    03 WSAA-MAKE                 PIC X(14).
    03 WSAA-MODEL                PIC X(30).
    03 WSAA-MODEL-TYPE           PIC X(05).
    03 WSAA-FULL-TYPE            PIC X(01).
    03 WSAA-TRANSMISSION         PIC X(01).
    03 WSAA-AA-CODE4             PIC X(04).
    03 WSAA-AA-GROUP             PIC X(03).
    03 WSAA-FILLER               PIC X(09).
*

File attributes seem to be matching but it still gives the status code 39. Can you please help
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8051
Location: East Dubuque, Illinois, USA

PostPosted: Tue Sep 23, 2008 6:23 pm    Post subject:
Reply with quote

Now we're making progress. So what's the JCL look like for the file?
Back to top
View user's profile Send private message
Chethana

New User


Joined: 26 Nov 2007
Posts: 6
Location: Bangalore

PostPosted: Tue Sep 23, 2008 6:26 pm    Post subject: Reply to: VSAM file opening file status 39
Reply with quote

the JCL used is
Code:
//U2138    EXEC PROC=PDM,PROG=WU2138,RC=',COND=(8,LT)'
//*
//PDM.SLG1 DD  DUMMY
//INDD     DD  DSNAME=ISTEST.CR10050.ABICODE.CSV1.OUTFILE1,
//             DISP=SHR
//OUTDD    DD  DSNAME=ISTEST.ABI.TEST.MMODEL3,
//             DISP=MOD
//OUTDD1   DD  DSNAME=ISTEST.ABI.TEST.MMODEL4.ABI.PATH,
//             DISP=MOD


the path has also been defined.
Code:
DEFINE PATH      (NAME(ISTEST.ABI.TEST.MMODEL4.ABI.PATH)
       PATHENTRY (ISTEST.ABI.TEST.MMODEL4.ABI.AIX)     
       UPDATE)
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Sep 23, 2008 6:28 pm    Post subject: Reply to: VSAM file opening file status 39
Reply with quote

DISP=MOD on a VSAM file? That doesn't seem right.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8051
Location: East Dubuque, Illinois, USA

PostPosted: Tue Sep 23, 2008 6:40 pm    Post subject:
Reply with quote

Yeah, Kevin, I think DISP=OLD would be better. DISP=MOD on a VSAM alternate index? The mind boggles.

Chethana, try DISP=OLD for OUTDD and OUTDD1.
Back to top
View user's profile Send private message
Chethana

New User


Joined: 26 Nov 2007
Posts: 6
Location: Bangalore

PostPosted: Tue Sep 23, 2008 6:49 pm    Post subject: Reply to: VSAM file opening file status 39
Reply with quote

This doesnt work either. icon_sad.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8051
Location: East Dubuque, Illinois, USA

PostPosted: Tue Sep 23, 2008 7:20 pm    Post subject:
Reply with quote

Chethana, are you getting any messages in the log about the file? I'm thinking there might be an IEC161I that might explain something.
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: Wed Sep 24, 2008 1:31 am    Post subject:
Reply with quote

Hello,

Code:
//OUTDD    DD  DSNAME=ISTEST.ABI.TEST.MMODEL3,
Is this a typo or is there such a dataset for some other vsam file?
Back to top
View user's profile Send private message
Chethana

New User


Joined: 26 Nov 2007
Posts: 6
Location: Bangalore

PostPosted: Wed Sep 24, 2008 8:52 am    Post subject: Reply to: VSAM file opening file status 39
Reply with quote

Robert ,

yes there is IEC161I in the spool for the run of this job. Can you please advice what this could mean?
Back to top
View user's profile Send private message
Chethana

New User


Joined: 26 Nov 2007
Posts: 6
Location: Bangalore

PostPosted: Wed Sep 24, 2008 8:55 am    Post subject: Reply to: VSAM file opening file status 39
Reply with quote

Dick ,

That was just a typo. There is a dataset for that VSAM file.

Thank You
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: Wed Sep 24, 2008 9:15 am    Post subject:
Reply with quote

Hello,

At the top of the page there is a link to "IBM Manuals". At the bottom of that page is a set of documentation for "MVS System Messages".

This is a link to a page that explains the IEC161I message:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/iea4h406/2.85?

You may need to use other parts of the documentation as well.

I recommend becoming familiar and comfortable with the manuals - they can save you a lot of time. Someone will be here when there are questions, but you may often get a useful answer much quicker using the manual(s).

Good luck icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8051
Location: East Dubuque, Illinois, USA

PostPosted: Wed Sep 24, 2008 5:47 pm    Post subject:
Reply with quote

What's the IEC161 message(s)? There's codes in it that explain a lot of the problem, usually.

Also, is the typo in the JCL or just what you posted? If you're using one file with a different file's alternate index, that would definitely cause a 39 file status.
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 Testing rerad cursor for status with ... John F Dutcher DB2 7 Fri May 19, 2017 9:35 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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