HP3000-L Archives

May 1998, Week 1

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:
Bob Comeau <[log in to unmask]>
Reply To:
Bob Comeau <[log in to unmask]>
Date:
Thu, 7 May 1998 08:59:39 -0300
Content-Type:
text/plain
Parts/Attachments:
text/plain (100 lines)
I had only one occasion (quite some time ago now) to access a dataset
without the normal intrinsics, and it was a very abnormal situation.  An
error was discovered in a master dataset a few DAYS after it had been
restored.  The error turned out to be a block of data read from the tape
drive somehow had been shifted one byte, while subsequent blocks were fine.
Certain values in the master were not being found that definitely should
have been there, among other very strange behaviour.

The error spanned several records in the master including all the pointers
etc.  We were using IMAGE logging at the time, but as has been mentioned our
restore was the root of the problem so my recovery options were severly
limited.  I had to use PM to open the data set, find the wayward section of
the file insert the missing byte (it was part of a known key that was
missing) and shift the rest of the block and rewrite it.  I don't think I
used COBOL, I vaguely remember doing it in SPL.

A few quick tests in QUERY verified that all was well again.  Made for a few
tense moments tho. The response center couldn't understand why it hadn't
been reported as a tape read error, just one of those things I guess.



-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
Behalf Of Ken Kirby
Sent: Wednesday, May 06, 1998 6:27 PM
To: [log in to unmask]
Subject: Re: COBOL and TurboIMAGE


James,

I tried using a plain, garden-variety COBOL OPEN verb to open a TurboImage
dataset. The program aborted with a privileged mode violation, just as I
expected.

However, I do not doubt that a COBOL program armed with PM capability could
use COBOL I/O verbs to access a TurboIMAGE dataset as if it were a flat
file. My point is that you would not get the same results from a COBOL READ
as you would from a DBGET, and you would certainly corrupt your database
using WRITE, REWRITE and DELETE as if they were DBPUT, DBUPDATE and
DBDELETE, respectively.

So I stand by my answer, as I'm sure you stand by yours. I suppose it
depends on whether the question is really, "Is this possible?", or whether
it is "Is this a correct procedure?"

--Ken Kirby
  Vanderbilt University



-----Original Message-----
From:   James Trudeau [SMTP:[log in to unmask]]
Sent:   Wednesday, May 06, 1998 12:55 PM
To:     [log in to unmask]; 'Ken Kirby'
Subject:        RE: COBOL and TurboIMAGE

Howdy,

Let me repeat myself.  I did this stuff a number of years ago (don't ask me
the compiler
or OS versions).  Yes it can be done.

I did it out of curiosity.  Curiostiy/desperation is one thing but IMHO
anyone doing it
for any other reason(s) is probably a dang fool : - )
jt

----------
From:  Ken Kirby[SMTP:[log in to unmask]]
Sent:  Wednesday, May 06, 1998 11:14 AM
To:  [log in to unmask]
Subject:  Re: COBOL and TurboIMAGE

At 02:51 PM 5/5/98 -0500, <[log in to unmask]> wrote:
>This might be a real dumb question, but :
>
>If I want to access TurboIMAGE data from a COBOL program, do I have
>to use DB* intrinsics or can I do it using the standard COBOL  I/O
>commands ?
>
>TIA.

I think the question Chris is asking is this:

"Does the COBOL compiler provide for the proper reading of TurboIMAGE
datasets through the use of COBOL verbs such as OPEN, READ, WRITE and
CLOSE?"

The answer to this question is - no. You must use the DB* Intrinsics.

Perhaps there is some warped way to use PM to force COBOL I/O commands to
extract the data, but TurboIMAGE access is not native to the language.

I wish it were so, but it's not.

--Ken Kirby
  Vanderbilt University

ATOM RSS1 RSS2