[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



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