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

Jeffrey H. Coffield jeffrey at digitalsynergyinc.com
Fri Apr 13 09:52:43 EDT 2012



On 04/13/2012 05:58 AM, 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
>
> HTH
>
> Syltrem
>
>

Syltrem's solution is what we usually use, but we generally would add :

		myrec	= edit$(myrec, 4%)

to strip off the training carriage return.

Jeff Coffield
www.digitalsynergyinc.com



More information about the Info-vax mailing list