[Info-vax] Oracle Database vs Oracle/Rdb
John Reagan
xyzzy1959 at gmail.com
Sat Jul 13 00:30:10 EDT 2019
On Tuesday, June 25, 2019 at 12:36:33 PM UTC-4, Neil Rieck wrote:
> On Monday, June 24, 2019 at 7:56:05 PM UTC-4, Arne Vajhøj wrote:
> > On 6/24/2019 8:45 AM, Bob Koehler wrote:
> > > In article <37c79af8-f631-4847-b4e8-7158fdba1a00 at googlegroups.com>, Neil Rieck <n.rieck at sympatico.ca> writes:
> > >> That may not be possible depending upon how the customer is using Oracle-RD=
> > >> B. Recall that RDB was developed by DEC as a successor to RMS. Certain DEC =
> > >> languages, like COBOL and BASIC, have builtin support for RMS while other D=
> > >> EC languages provide indirect RMS support via the linker.
> > >
> > > You want to be more specific about that claim?
> >
> > Many VMS languages have language level support for
> > index-sequential files (which is often what is meant
> > by RMS even though practically any file access is
> > via RMS). Definitely Pascal and Cobol. And likely
> > also Basic. But not C.
> >
> > Any VMS language can use RMS SYS$ calls to access
> > index-sequential files. Including C. Which may be
> > what the "linking" was meant to say.
> >
> > Arne
>
> Question: I did not think that Pascal had builtin RMS support (as in directly opening/reading INDEXED files without resorting to system calls). At least this was the case back when I last used VAX Pascal. Was builtin RMS support added to Pascal during the Alpha days -or- are we using different definitions for "builtin"?
>
> Neil
Here's a test from the test system
PROGRAM Address(Order_File,Report_File,INPUT);
TYPE
Mail_Order = RECORD
Order_Num : [KEY(0)] INTEGER;
Name : PACKED ARRAY[1 .. 20] OF CHAR;
Address : PACKED ARRAY[1 .. 20] OF CHAR;
City : PACKED ARRAY[1 .. 19] OF CHAR;
State : PACKED ARRAY[1 .. 2] OF CHAR;
Zip_Code : [KEY(1)] PACKED ARRAY[1 .. 5] OF CHAR;
Item_Num : [KEY(2)] INTEGER;
Shipping : REAL;
END;
VAR
Order_File : FILE OF Mail_Order;
Order_Rec : Mail_Order;
Report_File : TEXT;
PROCEDURE Write_On_Indexed_File;
BEGIN
WRITE(Order_File,Order_Rec);
(* Alternate method *)
Order_File^ := Order_Rec;
PUT(Order_File);
END;
PROCEDURE Use_Delete;
BEGIN
FINDK(Order_File,2,375,EQL);
GET(Order_File);
IF (Order_File^.Item_Num = 375)
THEN
DELETE(Order_File)
ELSE
WRITELN(Report_File,'There is no second component');
END;
PROCEDURE Use_Resetk;
VAR Continue:BOOLEAN;
BEGIN
RESETK(Order_File,1);
Continue := TRUE;
WHILE Continue AND NOT UFB(Order_File) DO
IF Order_File^.Zip_Code < '50000'
THEN
BEGIN
Order_File^.Shipping := 1.00;
UPDATE(Order_File);
GET(Order_File);
END
ELSE
Continue := FALSE;
END;
PROCEDURE Use_Findk;
VAR Continue:BOOLEAN;
BEGIN
FINDK(Order_File,1,'10000',GEQ);
Continue := TRUE;
WHILE Continue AND NOT UFB(Order_File) DO
BEGIN
READ(Order_File,Order_Rec);
IF Order_Rec.Zip_Code < '50000'
THEN
WRITE(Report_File, 'Order number ',Order_Rec.Order_Num, 'has zip code ',Order_Rec.Zip_Code)
ELSE
Continue := FALSE;
END;
END;
BEGIN
OPEN(Order_File,
'ugch6pg16.dat',
HISTORY := NEW,
ACCESS_METHOD := KEYED,
ORGANIZATION := INDEXED);
OPEN(Report_File, HISTORY := NEW );
REWRITE(Report_File);
Use_Findk;
Use_Resetk;
Use_Delete;
Write_on_Indexed_File;
END.
More information about the Info-vax
mailing list