View previous topic :: View next topic
|
Author |
Message |
Venkatesh Korivi
New User
Joined: 01 Aug 2011 Posts: 3 Location: India
|
|
|
|
Hi,
I'm getting File-status 116 when using write on a VSAM file.
WRITE FILENAME ADD STATUS
File is defined in program as FILE FILENAME VS(UPDATE)
Please suggest
Thanks |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
What does the manual say about that status code? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I suggest providing us with the complete message
and not just what you think is important.
or try looking at the vsam status x'74'. (thx Bill) |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
A different "Bill", dbz?
There'll be a bus-load of other messages which should also give further clues.
Did your previous execution fail and you didn't restore the file? |
|
Back to top |
|
|
Venkatesh Korivi
New User
Joined: 01 Aug 2011 Posts: 3 Location: India
|
|
|
|
Thanks for your replies.
I read the manual, it is written
Code NOVERIFY to ignore the VSAM open error code of 116(X'74'). This error occurs when the file is not properly closed by a previous job, or is being used by another CPU.
I tried FILE FILENAME VS CREATE NOVERIFY
still I'm getting the same error code.
Also the file is created using a delete define(IDCAMS) in the prior step. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you've just done a delete/define, why are you doing a WRITE ... ADD? Try with a PUT.
You'd need to change you FILE definition as well.
Maybe you'd best tell us what the program is doing and we go from there. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
no, the Bill is you, Bill.
Venkatesh Korivi,
a vsam file that has only been defined,
has never been opened
has never been closed. |
|
Back to top |
|
|
Venkatesh Korivi
New User
Joined: 01 Aug 2011 Posts: 3 Location: India
|
|
|
|
Thanks Bill..
The program is used to convert one file to another with a different key.
e.g.,
File1-key 01 07 A
key-field1 01 05 A
key-field2 06 02 A
To
File2-key 01 07 A
key2-field1 01 02 A
key2-field2 03 05 A
So, If I use PUT I have to sort the records as per new key. So. I thought of using write.
Looks like I have to initialize the file before I can use write statement.
Can you please suggest a way to do this ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
and could not wait more that 3 minutes to post this question on this forum
after you posted it on another.
other than the obvious attribute of being low-skilled/knowledgeable
you are also very inconsiderate.
my best wishes for bad luck in your days ahead.
also, the solution for your problem is use sort.
input and reformat the input file
sort on the 1 - 7 key
output to the new file.
this is typical of an unskilled and inconsiderate person.
you determine the solution and ask us to help you cobble your way thru.
not just days, but months and years. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Even if you put a dummy record on, you're going to get in a terrible tangle doing loads of WRITE ... ADDs Splits to heck and back. Slow as slow.
You can output the file directly from an Easytrieve Plus SORT, doing the re-arrangement in the before sort PROC.
You can use your Sort package directly, also, without having an Easytrieve Plus program. |
|
Back to top |
|
|
|