HP3000-L Archives

April 2006, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Glenn Mitchell <[log in to unmask]>
Reply To:
Glenn Mitchell <[log in to unmask]>
Date:
Wed, 12 Apr 2006 20:40:46 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Tracy - 

While it may be cryptic to many, it is STANDARD COBOL and will perform as
expected each and every time.  In the case of your suggested code, it fails
to work as expected on little endian machines.  Arguably, this code won't be
migrated as is anyway, but I don't think programmers should let themselves
fall into bad habits like this.  And performance doesn't matter a whit in
this case - the code only gets performed if there's some screwy error with
the file.

I'd go with the more universal approach.

Regards,

Glenn

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf
Of Tracy Pierce
Sent: Wednesday, April 12, 2006 11:16 AM
To: [log in to unmask]
Subject: Re: [HP3000-L] Using CKERROR to decode COBOL file status

I'm not suggesting the use of CKERROR, but that's what was in use in the
failed program.

But while we're there, CKERROR does a LOT more efficient job of translating
the right byte of STATUS than does the entirely too cryptic for my taste
FUNCTION ORD (STAT (2:1)) - 1  

why not just do 
01  STAT VALUE "9}".   
    05  ERRNO PIC S99 COMP.

MOVE LOW-VALUES TO STATUS ( 1 : 1 )
DISPLAY ERRNO


Tracy Pierce 

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2