[Info-vax] DEC BASIC: How to read a sequential
Johnny Billquist
bqt at softjar.se
Fri Apr 13 09:33:08 EDT 2012
On 2012-04-13 14:41, StGallen wrote:
> All,
> DEC Basic 1.3. VMS 7.3.2
>
> I need to open a sequential file with variable record length. How can
> I do this, especially since I cannot define the size of the STRINGS in
> the MAP file?
>
> Also if I open the file without a MAP file, how do I read the records
> from the file?
>
> Any help deeply appreciated.
>
> Many thanks!
Syltrem gave one suggestion.
Another, which I think works (it works under BASIC+2 anyway) is:
+++
OPEN filename AS FILE n, ORGANIZATION SEQUENTIAL VARIABLE, &
RECORDTYPE ANY
GET #1
MOVE FROM #1, A$=RECOUNT
+++
that will give you the record in A$. Repeat until EOF.
In general, the answer to the question of how to get data without a MAP
is the MOVE statement.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list