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 Open Error 35 user abend U1001
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 6:40 am    Post subject: VSAM Open Error 35 user abend U1001
Reply with quote

Hi,

I am getting the below error for VSAM which is already present in the system.

Code:
VSAM STATUS IS: 35
EE3250C The system or user abend U1001 R=00000000 was issued.
       From compile unit VIKIPN at entry point VIKIPN at compile unit offset +
       address 00007CCE.
> LEAID ENTERED (LEVEL 04/01/2008 AT 12.32)
> LEAID PROCESSING COMPLETE. RC=0



I am trying to read this VSAM which has two alternate indexs defined on it and copy it into a flat sequential file through cobol program. But when i run the JCL the get i the above error.

The select clause is as follows:

SELECT VSAM-File ASSIGN TO DDNAME
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS PKEY
ALTERNATE RECORD KEY IS
AKEY
WITH DUPLICATES
FILE STATUS IS VSAM-STATUS.



The picture clause for AKEY is PIC X(02).

I am not using the primary key or alternate key to read records in the program. I just have to the copy the contents of the VSAM to a flat file. So i am simply reading the file sequentially till end of file and moving the records to the flat file fields.

Another thing to notice here is that if the remove the alternate index clause, the program works properly. Also the file name is correctly mapped to JCL. I have verified it.

The alternate index was created successfully using file-aid.

Can someone help me on this. I have spent lot of time to get this one corrected, but so far not successful in doing it icon_cry.gif

Let me know if any more information is required.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Apr 02, 2010 7:09 am    Post subject:
Reply with quote

The file status 35 means (from the manual):
Quote:
An OPEN statement with the INPUT, I-O,
or EXTEND phrase was attempted on a
non-optional file that was not present.
So you need to post the JCL for the step -- specifically the DD names for the VSAM file and the alternate indexes so we can review them.

And you are aware, I hope, that if your program references an alternate index the JCL must contain a reference to the path as DDNAME1? A second alternate index requires DDNAME2 and so forth.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 02, 2010 7:29 am    Post subject:
Reply with quote

Also, set up your prog to capture the extra information made available by VSAM, look at the FILE STATUS clause....
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 7:30 am    Post subject:
Reply with quote

I knew that status code 35 is VSAM open error. that is why i specifically mentioned the the file is present and has records in it.

I don't have mainframe access right now, but JCL is something like this:

Code:
//step10   exec pgm=pgmname
//steplib   dd dsn=package location for the pgm
//input1    dd dsn=vsam file
//output1  dd dsn= flat file,disp=(new,catlg,),
                          DCB=(recfm=fb,lrecl=1500), etc etc



The program does not references the alternate index. It just does simple read from VSAM file and move to flat file. This is just to take the backup of the file. The flat file is a GDG. The alternate key is defined because this new vsam file will be used on other programs for data extraction purpose. So it will options to extract data on both primary and alternate keys. I am not reading the file in my program on any of the key fields. just plain sequential read .

For information, the primary key is (6 0) and alternate key is (1412 1426) where 6 and 1412 are the key lengths and 0 1426 are starting locations.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 02, 2010 7:33 am    Post subject:
Reply with quote

Use CICS Guy's info to get more VSAM information to the problem....
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 7:35 am    Post subject:
Reply with quote

Hi CICS Guy,

The program has been coded to handle all the VSAM file status code. From 00 to 99. If the status code is 00 or 97 the pgm executes other wise it abends and displays the information in the abend para.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 02, 2010 7:42 am    Post subject:
Reply with quote

baljinders wrote:
The program has been coded to handle all the VSAM file status code. From 00 to 99.
But the beauty of getting the actual AMS return codes is much more full-filling...
Check it out....data-name-8
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 7:49 am    Post subject:
Reply with quote

Ok.... I'll check on this tomorrow and get back to you.

On the whole , i am pretty sure it has something to do with the way i am defining the alternate indexs. because the same file opens just file when i comment out the alternate record key clause from the program and drop the AIX and path from the cluster.

Rest will let you know by tomorrow.

Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Apr 02, 2010 7:56 am    Post subject:
Reply with quote

Quote:
The program does not references the alternate index
This statement is wrong. From your original post where you reference the alternate index:
Code:
SELECT VSAM-File ASSIGN TO DDNAME
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS PKEY
ALTERNATE RECORD KEY IS
AKEY
WITH DUPLICATES
FILE STATUS IS VSAM-STATUS.
You do not have to use the alternate index in the PROCEDURE DIVISION. You do not have to even have any code that uses AKEY. The mere fact that you specify the alternate index in the SELECT means you have referenced it and must have DDNAME1 in the JCL. Further proof of this is your statement
Quote:
Another thing to notice here is that if the remove the alternate index clause, the program works properly
because when you remove the reference to the alternate index, the JCL works. Therefore the only possible conclusion is that you do not have the alternate index DD name correctly specified in your JCL -- no matter how many times you protest the JCL is correct. Specifically, you must have:
Code:
//input1    dd dsn=vsam file
//input11 dd dsn=vsam.aix.path,disp=shr


Your problem has nothing to do with the VSAM file, how it is defined, nor how the alternate index is defined. Your problem is entirely in the mismatch between your program code and the JCL you are attempting to run the program with.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 8:03 am    Post subject:
Reply with quote

Robert,

I did not code any ddname statement for the alternate index in my JCL. I didn't know that it was also required. Thanks for this information. I'll try this tomorrow and get back to you with the result.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Apr 02, 2010 8:04 am    Post subject:
Reply with quote

Yes -- the DD name for the alternate index is not optional. If you reference the alternate index in the SELECT statement, you must have a DD name for the path.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 8:14 am    Post subject:
Reply with quote

That means if there are n number of alternate indexes defined on a vsam, i should have n number of seperate ddnames for each of the path.

Also , say if i have to define alternate keys on two fields , how to write the select clause for it.

Code:
field1 pic x(02)    AIX1,AIX2
field2 pic x(10)    AIX2


i.e AIX2 is a combination of field 1 and 2. I create two seperate aix's for them but confused about writing the select clause in the pgm.
this is what i have written,

Alternate record key is field1 with duplicates.

is it correct ??
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: Fri Apr 02, 2010 8:53 am    Post subject:
Reply with quote

Hello,

Suggest you consider removing what is not necessary for your process from the code.

Then there will be no need to include "extra" dd statements to satisfy the needs of the unneeded code (whew icon_smile.gif ).
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 9:13 am    Post subject:
Reply with quote

Hi Dick,

Lets just say the last post was also part of the requirement or need :-).
I have been following this forum for the last few months, i must say there are lot of things i can learn from you. All i need to make sure is i ask the right questions..he he
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: Fri Apr 02, 2010 9:32 am    Post subject:
Reply with quote

Hello,

Quote:
All i need to make sure is i ask the right questions..he he
The single most important part of getting help for a problem or an answer to a question is making sure that the people who would help/answer completely/clearly understand the question/problem.

This is not always easy to accomplish. . . icon_wink.gif

So sometimes, there are multiple iterations just getting everyone on the same page.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 9:51 am    Post subject:
Reply with quote

I'll make sure i state my problems crystal clear.... now did you happen to understand my previous post regarding writing the select clause or do i need to ask it differently ?

Moreover this was my ever post of this forum, so do give me benefit of doubt for few more posts incase i repeat the mistake of not clearly stating my questions :-)
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: Fri Apr 02, 2010 10:00 am    Post subject:
Reply with quote

Hello,

As i mentioned before, suggest you remove anything that is not needed. . .

To read the file sequentially, there is no need to have anything about the altrenate indexes in the code. For whatever reason, you may believe you need to mention these, but (unless there is still something i do not yet understand) there should be no reason to mention these in the code or the jcl.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 02, 2010 10:01 am    Post subject:
Reply with quote

baljinders wrote:
All i need to make sure is i ask the right questions..he he
Trust me, Been There, Done That, Got The Tee Shirt and even the tee shirt did not help my pride that much....grin...
Approaching the unapproachable, the more information you can bring with to the better you are equipped to fend off their scorn.
As a somewhat assembler programmer, I know that the actual AMS codes provide so much more information than the single byte of the COBOL file status...
Trust me, information is power and while 'they' might not know it, you can teach them something- but then again, they could point out something dumb that you did (BTDTGTTD)...grin...
Approach 'them' with all the information you can gather and be prepared to, either way, find your fault or get an education,
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 02, 2010 10:31 am    Post subject:
Reply with quote

The vsam file does require a alternate index because this file will contain data that will be used by other programs. So they can extract data by reading this file based on either primary key or alternate key (as required). Currently this file does not exist in prod but will exist once i am done with the my program for creating it.

It was all working fine untill the business came up with the new requirement of having alternate indexs on some fields. That is when i started to get the error i mentioned in the first post.

I hope , i am clear this time.
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: Fri Apr 02, 2010 7:24 pm    Post subject:
Reply with quote

Hello,

Quote:
The vsam file does require a alternate index because this file will contain data that will be used by other programs
This is exactly why there are difficulties getting what you want. You are completely mis-focused. . .

The vsam file may need everything defined for various reasons/processes. This particular program does not. . . There is no reason to mention the alternate index. Why do you believe you must have this in your code? Simply run the program as suggested with only the single dd statement and when it works your issue is resolved. . .
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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