[Info-vax] DEC BASIC: How to read a sequential

Paul Sture paul at sture.ch
Fri Apr 13 11:17:32 EDT 2012


On Fri, 13 Apr 2012 08:58:28 -0400, Syltrem wrote:

> "StGallen" <sengupta.suhas at gmail.com> wrote in message
> 
news:9a02fdaf-52ae-42aa-8838-277af4bb5f7e at to5g2000pbc.googlegroups.com...
>> 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!
> 
> I didn`t do BASIC in quite some time, but the answer is probably along
> these lines :
> 
>    Declare string  myrec
> 
>    Open Filename   for Input as File #1,                        &
>                 Organization Undefined, Recordtype Any,                
>                 & Access Read, Allow Modify
> 
>    Linput #1, myrec
> 

LINPUT is the statement I recall.  Very handy for parsing free format 
text files, whether they were of your own design or someone else's.

-- 
Paul Sture



More information about the Info-vax mailing list