View previous topic :: View next topic |
Author |
Message |
Mukunda Beginner
Joined: 11 Dec 2002 Posts: 46 Topics: 15
|
Posted: Wed May 14, 2003 7:22 pm Post subject: Handling VSAM status codes - is it mandatory! |
|
|
In my new shop I see many of the production applications using VSAM KSDS files do not handle status codes...and these applications are running fine. Will this create any problem - any time? |
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Thu May 15, 2003 12:51 am Post subject: |
|
|
If a problem with the dataset occurs the program will not handle the conditions at all. In a CICS environment this can be nasty - if a dataset is closed the program will abort and not tell the user why. Not handling the status codes is probably just lazy programming. |
|
Back to top |
|
|
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Thu May 15, 2003 5:02 pm Post subject: |
|
|
You asked: "Handling VSAM status codes - is it mandatory!"
The answer is no, it is not MANDATORY, but it is not wise if you don't test every time you do something with a file.
Do you know you can define a status field for non-VSAM files also and test them?
If you are reading a sequential file with status, you can still use AT END, but you can also test the status field for 10 as END OF FILE.
warp5's advice is right on. You can test what he said by running a "Level 3 diagnostic". |
|
Back to top |
|
|
Mukunda Beginner
Joined: 11 Dec 2002 Posts: 46 Topics: 15
|
Posted: Fri May 16, 2003 9:34 am Post subject: |
|
|
Thanks CaptBill. I know that we can declare status field and check it for non-VSAMs also...but never did it.
Quote: | Not handling the status codes is probably just lazy programming. | Good that MVS has ample tolerance for lazy programming |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri May 16, 2003 10:42 am Post subject: |
|
|
I work in Tech. Support. and if someone comes to me with a problem somewhere in an application that they have written and they do not check for errors then I normally refuse to help. |
|
Back to top |
|
|
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Mon Jun 16, 2003 8:39 pm Post subject: |
|
|
Hi Mukunda,
It's kinda like changing lanes without looking in the rearview mirror.
Regards, Jack. |
|
Back to top |
|
|
|
|