[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Q: record lenght as variable



Title: RE: Q: record lenght as variable

Hmmmm,

Help would indicate that shouldn't work.  If #Define does work, then Nitin might try using the Ask feature (see Help) since that also provides input to substitution variables same as #Define.

-----Original Message-----
From: Dave Thelen [mailto:ddthelen@SBBSNET.NET]
Sent: Friday, October 22, 1999 7:03 AM
To: Multiple recipients of list SQR-USERS
Subject: Re: Q: record lenght as variable


I'm not sure if this is exactly what you looking for but this has been our
approach.  I have setup some common I/O routines in an sqc and use the
following open statement.  I also have similar code in procedures  to
read/write records in the save sqc.
      open $file as 1 for-reading record={rec_length_input}:vary
status=#filestat
I let the calling sqr's determine the record length through #define  i.e.
#define rec_length_input 88

Dave

nitin rathor wrote:

> Hello EveryBody ,
>
> I want to pass record lenght of the file as the parameter and to use it in
> the "open" statement for file .
> I tried using both # and $ variables but got the error opening the file .
>
> Is it possible , first  of all to give variable as record length?
> IF yes then how ?
>
> I am using SQR 3 .
>
> Thanks ,
> Nitin.
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com