[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: sort file contents
There are a few ways it can be done. You could read the lines into an
array and write a procedure to sort the array. An example of an array
sort procedure was posted by Rob Goshko not too long ago (Hi, Rob). You
can find it in the archives at:
http://www.sqrug.com/~sqrusers/hypermail/
Or you could use a series of OS commands (such as Unix's sort command) to
create a presorted file that you can them simply read in.
HTH,
Don
On Fri, 3 Apr 1998, TUHINAROY wrote:
> Hi,
>
> I need to read a file and sort its contents based on one of the fields and
> print them. I dont think there's any command in SQR which would help me do
> this(like we have internal sort in Cobol). Can anyone tell me how it can be
> done?
>
> TIA
> Tuhina.
> ______________________________ Reply Separator
>_________________________________
> Subject: Re: Multiple Reports in SQRW Ver 2.5.7 ???
> Author: Ray Ontko <rayo@ONTKO.COM> at smtp_gw
> Date: 4/2/98 8:17 AM
>
>
> Tuhina,
>
> > I'm working on SQR Version 2.5.7. This version does not support
> > commands like Use-report, Declare-report, new-report etc.
> >
> > Is there any way I can generate more than 1 report from a single
> > program using this version?
>
> I vaguely recall that although 2.5.7 does not support USE-REPORT,
> I thought that it did allow NEW-REPORT. If not, the only work-around
> that I can think of is to use OPEN and WRITE to format an output
> file of your own.
>
> Ray
> ----------------------------------------------------------------------
> Ray Ontko | Ray Ontko & Co | "Time for a new signature line."
> rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/
>
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"