DEC BASIC-PLUS-2 Program using DEC's Record Management Service RMS-11
I've been playing with DEC's BASIC-PLUS-2, running under RSTS/E v10, on a SIMH-simulated PDP-11/93 with 4 MB of memory. I think this was the last and most powerful PDP-11 in the mid-to-late 1980s. I'm using RMS-11, a COBOL-esque and IBM-esque indexed file service. It's very much like IBM's VSAM, but running on a very small machine compared to an IBM mainframe.
Here's a BASIC-PLUS-2 program used to write and read an indexed file. Line continuations are marked with an &, and statement separators are \, which would be a colon in MS BASIC. The “allow none” on the “open” statements is a mystery. I suspect it has to do with granting access to other userids on the system.
list
TRY 12:44 PM 13-Jul-25
5 on error goto 19000
10 map (pdata) name$=30%,id$=6%,jobdes$=20%
20 open "pfile.dat" for output as file #1% &
,organization indexed fixed,access modify &
,allow none, map pdata &
,primary name$,alternate id$
30 input "Name";name$
40 if name$=" " then 50 else &
\ input "ID";ID$ &
\ input "JOBDES"; JOBDES$ &
\ put #1% &
\ goto 30
50 close #1%
60 open "pfile.dat" for input as file #1% &
,organization indexed fixed, access read &
,allow none, map pdata &
,primary name$,alternate id$
70 get #1% &
\ print name$;id$;jobdes$
80 input"ID ";ident$
90 if ident$ = " " then 32767 else &
get #1%, key #1% eq ident$ &
\ print id$;name$;jobdes$ &
\ goto 80
19000 print "error";err, "at line";erl \ resume 32767
32767 close #1% \end
BASIC2
run
TRY 12:45 PM 13-Jul-25
Name? gary
ID? 100
JOBDES? programmer
Name? gayle
ID? 101
JOBDES? teacher
Name?
gary 100 programmer
ID ? 101
101 gayle teacher
ID ? 100
100 gary programmer
ID ? 101
101 gayle teacher
ID ? 100
100 gary programmer
ID ?
BASIC2
