| Author |
IBM file status 97 (was: Prodcuing an output file only on Friday?
|
|
| William M. Klein 2006-04-25, 9:55 pm |
| Ah the WONDERFUL (he said sarcastically) world of IBM's "file-status=97"
IBM (eventually) admited that to be standard conforming this must be considered
an "unsuccesful" file status code.
HOWEVER,
As all IBM mainframe COBOL programers *know* this is actually an (implementor
defined) "succesful" value - indicating that a VSAM (may or may not be "KSDS"
e.g. ISAM - in COBOL-ese) file was opened (succesfully) even though it was not
previously "closed with VERIFY" correctly done. See:
http://publibz.boulder.ibm.com/cgi-.../igy3mg30/4.1.7
which says in part,
"OPEN statement execution successful; file integrity verified "
It may (or may not) be worth mentioning that SHARE has submitted a requiremennt
for IBM to introduce a "new" 0x (implementor-defined) status - in conformance
with the '02 Standard - that could be selected by programmers for detecting this
situation - with a 0 first character in the file status field.
--
Bill Klein
wmklein <at> ix.netcom.com
"Richard" <riplin@Azonic.co.nz> wrote in message
news:1145998883.112650.290220@g10g2000cwb.googlegroups.com...
>
> Howard Brazee wrote:
>
> '97' is not a 'success' return, nor is '10', though they may be treated
> in the same way for some purposes.
>
> 01 PARM-FILE-STATUS PIC X(02) VALUE '00'.
> 88 PARM-FILE-STATUS-OK VALUE '0' & x'00' THRU
> '0' & x'FF' '10' '97'.
>
| |
|
| > "OPEN statement execution successful; file integrity verified "
>
> It may (or may not) be worth mentioning that SHARE has submitted a
> requiremennt for IBM to introduce a "new" 0x (implementor-defined)
> status - in conformance with the '02 Standard - that could be selected
> by programmers for detecting this situation - with a 0 first character
> in the file status field.
So I'm supposed to be able to "select" something other than '97'?
As long as I can "select" '00' or "select" to still get '97'
I guess that's alright. Otherwise that's going to be a big PITA if
you have to "select" '07' or something. As soon as you have a '02
conforming compiler you will have thousands of statements such as:
if vsam-status not = '00' and '97'
call 'ABENDPGM'.
that will be ABENDING when it shouldn't.
I'd be really mad at IBM if I had to change every one of these.
It could delay adopting new compilers by years.
| |
| Richard 2006-04-27, 3:55 am |
|
Ron S wrote:
> So I'm supposed to be able to "select" something other than '97'?
> As long as I can "select" '00' or "select" to still get '97'
> I guess that's alright. Otherwise that's going to be a big PITA if
> you have to "select" '07' or something.
You may not be aware that "07" is already a valid and '85 conforming
file-status that may be returned on an OPEN statement and indicates
that the OPEN did succeed.
> As soon as you have a '02
> conforming compiler you will have thousands of statements such as:
> if vsam-status not = '00' and '97'
> call 'ABENDPGM'.
> that will be ABENDING when it shouldn't.
Which is exactly why when testing the file-status for success you
should have been testing the first byte for "0" rather than the two
bytes for exactly "00"
> I'd be really mad at IBM if I had to change every one of these.
> It could delay adopting new compilers by years.
You have had more than thirty years of the definition of the
file-status indicating that the 2nd byte may have additional
information and the first byte alone indicates 'successful completion'
when zero. For example '02' was a standard file-status value in
ANS'74.
| |
| Pete Dashwood 2006-04-27, 3:55 am |
|
"Ron S" <NoSpam@Spamblocker.org> wrote in message
news:EqydnY8mA5Kbos3ZRVn_vA@giganews.com...
>
> So I'm supposed to be able to "select" something other than '97'?
> As long as I can "select" '00' or "select" to still get '97'
> I guess that's alright. Otherwise that's going to be a big PITA if
> you have to "select" '07' or something. As soon as you have a '02
> conforming compiler you will have thousands of statements such as:
>
> if vsam-status not = '00' and '97'
> call 'ABENDPGM'.
>
> that will be ABENDING when it shouldn't.
> I'd be really mad at IBM if I had to change every one of these.
> It could delay adopting new compilers by years.
>
I wouldn't worry about it... no one is committed to implementing COBOL 2002
at the moment. By the time they do (if they do) you'll have converted
everything to Java anyway... :-)
Pete.
>
| |
| Howard Brazee 2006-04-27, 6:55 pm |
| On Thu, 27 Apr 2006 10:03:44 -0600, "Frank Swarbrick"
<Frank.Swarbrick@efirstbank.com> wrote:
>
>I know you were being a bit facetious, but do you honestly think that
>converting, say, a batch transaction posting program to Java is a reasonable
>thing to do?
>And if not Java and not COBOL, then what?
Batch? That's soooo 20th century.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
| |
|
| In article <hnr152tlureo8v43ohe6sljd04eaf5r7tp@4ax.com>,
Howard Brazee <howard@brazee.net> wrote:
>On Thu, 27 Apr 2006 10:03:44 -0600, "Frank Swarbrick"
><Frank.Swarbrick@efirstbank.com> wrote:
>
>
>Batch? That's soooo 20th century.
There's no school like Olde School, Mr Brazee... now if you'll excuse me I
have to patch-cord this program together...
DD
| |
|
| > Which is exactly why when testing the file-status for success you
> should have been testing the first byte for "0" rather than the two
> bytes for exactly "00"
> You have had more than thirty years of the definition of the
> file-status indicating that the 2nd byte may have additional
> information and the first byte alone indicates 'successful completion'
> when zero. For example '02' was a standard file-status value in
> ANS'74.
WTF! Is every program you support written by you? We've got THOUSANDS
of programs going back to 1968 written by dozens of people. Just like
every shop. Do not tell me "YOU" had thirty years like it's my fault
dozens of OTHER PEOPLE did it incorrectly. The fact is I've worked
in any number of shops and almost all the programmers check both
bytes of the status code. Right or wrong THAT'S THE REAL LIFE PRACTICAL
REALITY! If they make it so that doesn't work anymore it's going to cause
a lot of problems for a lot of programs.
| |
| Richard 2006-04-28, 6:55 pm |
|
Ron S wrote:
>
> WTF! Is every program you support written by you?
As it happens, the answer is no. Where I find poor practice I change
it.
> We've got THOUSANDS
> of programs going back to 1968 written by dozens of people. Just like
> every shop. Do not tell me "YOU" had thirty years like it's my fault
> dozens of OTHER PEOPLE did it incorrectly.
'You' is your site, though if you continue to copy poor practice in
programs that you write or change then it is partly your fault.
> The fact is I've worked
> in any number of shops and almost all the programmers check both
> bytes of the status code. Right or wrong THAT'S THE REAL LIFE PRACTICAL
> REALITY!
Does that mean that you will continue to do so ?
> If they make it so that doesn't work anymore it's going to cause
> a lot of problems for a lot of programs.
But they already did make it 'so that it doesn't work anymore' 30 years
ago. When they introduced file-status in ANS'74 it specified that '02'
was a successful completion, in ANS'85 they added more '0x' success
codes. More may be added, such as a replacement for '97'.
You appear to think that it would be 'IBM's fault' if your programs no
longer work due to poor practices. In fact, I doubt that IBM would
make a compulsory change, it may be an option. The problem is that
there are many standards conforming programs in non-IBM sites that do
not check for '97' as success and nor should they, they expect that
'successful completion' is determined as the specification says it
should be.
|
|
|
|