Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message> 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
Post Follow-up to this messageMichael, I know that is true for a QSAM file, but I think (not certain) that for a VS AM 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 yo u > thought you had opened. > > MCM > > > > > >
Post Follow-up to this messageBut if you check your file status immediately after the OPEN, it's all moot, right? And I think that's the idea here: anyone sing 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 'abend' is failure, you > >
Post Follow-up to this messageIn 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
Post Follow-up to this messageOn 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.
Post Follow-up to this messageOn 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 whic h 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.
Post Follow-up to this messageIn 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
Post Follow-up to this messageOn 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 whic h 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.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.