Home > Archive > Cobol > September 2004 > Abend Question.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| news.anet.com 2004-09-15, 3:55 pm |
| Hi,
I had a question:
If you don't put any error handling code in your program while openning a
file, if there is a problem in openning it, would it cause an abend?
Thank you,
Houman
| |
| Michael Mattias 2004-09-15, 3:55 pm |
| > I had a question:
>
> If you don't put any error handling code in your program while openning a
> file, if there is a problem in openning it, would it cause an abend?
IBM mainframe environment? (that's the only place I know the term 'abend' is
used)....
Well, yes you would get an abend.
But bear in mind that simply adding a FILE STATUS to the SELECT is
considered 'error handling' code in this environment, and if you do not
check your file status right after the OPEN and 'do something' on failure,
you will not get the abend until later, when you try to access the file you
thought you had opened.
MCM
| |
| William M. Klein 2004-09-15, 3:55 pm |
| Michael,
I know that is true for a QSAM file, but I think (not certain) that for a VSAM
file it is NOT true.
--
Bill Klein
wmklein <at> ix.netcom.com
"Michael Mattias" <michael.mattias@gte.net> wrote in message
news:Nh_1d.8561$Wo7.3128@newssvr31.news.prodigy.com...
>
> IBM mainframe environment? (that's the only place I know the term 'abend' is
> used)....
>
> Well, yes you would get an abend.
>
> But bear in mind that simply adding a FILE STATUS to the SELECT is
> considered 'error handling' code in this environment, and if you do not
> check your file status right after the OPEN and 'do something' on failure,
> you will not get the abend until later, when you try to access the file you
> thought you had opened.
>
> MCM
>
>
>
>
>
>
| |
| Michael Mattias 2004-09-15, 3:55 pm |
|
But if you check your file status immediately after the OPEN, it's all moot,
right? And I think that's the idea here: anyone s ing a career as a
programmer should learn how USE tools such as FILE STATUS or DECLARATIVES or
ON EXCEPTION or ON OVERLFOW and the like ... all these really neat, handy
tools are just waiting for someone to gainfully employ them.. at no cost to
the programmer except for writing a couple of lines of code. (And if writing
a couple of lines of code is too great a 'hardship' there's not much chance
of a career anyway).
MCM
"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:oH%1d.829898$ic1.84341@news.easynews.com...
> Michael,
> I know that is true for a QSAM file, but I think (not certain) that for
a VSAM
> file it is NOT true.
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com
> "Michael Mattias" <michael.mattias@gte.net> wrote in message
> news:Nh_1d.8561$Wo7.3128@newssvr31.news.prodigy.com...
a[color=darkred]
'abend' is[color=darkred]
failure,[color=darkred]
you[color=darkred]
>
>
| |
| docdwarf@panix.com 2004-09-15, 3:55 pm |
| In article <rT%1d.17055$ZC7.14262@newssvr19.news.prodigy.com>,
Michael Mattias <michael.mattias@gte.net> wrote:
>
>But if you check your file status immediately after the OPEN, it's all moot,
>right?
In an interview I had, long ago, the first question was 'What do you do
after every file activity?' I paused, stunned, and... answered a question
with a question, saying 'Check the file status? Is that what you're
looking for?' the fellow grinned and said 'Yes'... and I said something
along the lines of 'Wow, I didn't expect something as obvious as that...
it's kinda like 'what do you do with your shoelaces after you put your
shoes on your feet?''
DD
| |
| Howard Brazee 2004-09-15, 3:55 pm |
|
On 15-Sep-2004, docdwarf@panix.com wrote:
> In an interview I had, long ago, the first question was 'What do you do
> after every file activity?' I paused, stunned, and... answered a question
> with a question, saying 'Check the file status? Is that what you're
> looking for?' the fellow grinned and said 'Yes'... and I said something
> along the lines of 'Wow, I didn't expect something as obvious as that...
> it's kinda like 'what do you do with your shoelaces after you put your
> shoes on your feet?''
I still remember a question I got in a 9th grade Earth Science test in which I
was asked to describe dehydration. I gave a long description of symptoms bug
got the question wrong because I left out the obvious. I figured any 3rd
grader knew what the word meant and it never occurred to me that's what she was
asking.
| |
| Robert Wagner 2004-09-16, 3:55 am |
| On Wed, 15 Sep 2004 19:24:17 GMT, "Howard Brazee" <howard@brazee.net>
wrote:
>I still remember a question I got in a 9th grade Earth Science test in which I
>was asked to describe dehydration. I gave a long description of symptoms bug
>got the question wrong because I left out the obvious. I figured any 3rd
>grader knew what the word meant and it never occurred to me that's what she was
>asking.
Like my answer to Doc, in which I assumed it was obvious that boiling
point is a function of mean bond enthalpies. In other words, how much
energy it takes to make molecules stop hugging each other. After
writing it, I realized that wasn't so obvious to most readers. I
should have said so up front.
| |
| docdwarf@panix.com 2004-09-16, 8:55 am |
| In article <8erhk09nehr8cvvtce6pj0cv4bb872ucbt@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On Wed, 15 Sep 2004 19:24:17 GMT, "Howard Brazee" <howard@brazee.net>
>wrote:
>
>
>Like my answer to Doc, in which I assumed it was obvious that boiling
>point is a function of mean bond enthalpies. In other words, how much
>energy it takes to make molecules stop hugging each other. After
>writing it, I realized that wasn't so obvious to most readers. I
>should have said so up front.
How curious... I don't know what you might have done 'after writing it',
Mr Wagner, but when it was pointed out that your assertion of 'Shape
doesn't matter; molecules with the same number of carbons have the same
properties' appeared to be contradicted by the evidence found in the
boiling points of hexane and cyclohexane you responded with - among other
things - 'I stand corrected and withdraw my overreaching generality.'
In the example above Mr Brazee reports what seems to be a leaving-out of
the 'overreaching generality', not responding with one which he sees as
needing correction and withdrawal.
DD
| |
| Robert Wagner 2004-09-17, 8:55 pm |
| On Wed, 15 Sep 2004 19:24:17 GMT, "Howard Brazee" <howard@brazee.net>
wrote:
>I still remember a question I got in a 9th grade Earth Science test in which I
>was asked to describe dehydration. I gave a long description of symptoms bug
>got the question wrong because I left out the obvious. I figured any 3rd
>grader knew what the word meant and it never occurred to me that's what she was
>asking.
Like my answer to Doc, in which I assumed it was obvious that boiling
point is a function of mean bond enthalpies. In other words, how much
energy it takes to make molecules stop hugging each other. After
writing it, I realized that wasn't so obvious to most readers. I
should have said so up front.
|
|
|
|
|