View previous topic :: View next topic
|
Author |
Message |
Chethana
New User
Joined: 26 Nov 2007 Posts: 6 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Chethana
New User
Joined: 26 Nov 2007 Posts: 6 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Now we're making progress. So what's the JCL look like for the file? |
|
Back to top |
|
|
Chethana
New User
Joined: 26 Nov 2007 Posts: 6 Location: Bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
DISP=MOD on a VSAM file? That doesn't seem right. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Chethana
New User
Joined: 26 Nov 2007 Posts: 6 Location: Bangalore
|
|
|
|
This doesnt work either. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Chethana
New User
Joined: 26 Nov 2007 Posts: 6 Location: Bangalore
|
|
|
|
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 |
|
|
Chethana
New User
Joined: 26 Nov 2007 Posts: 6 Location: Bangalore
|
|
|
|
Dick ,
That was just a typo. There is a dataset for that VSAM file.
Thank You |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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:
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 |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|