http://bernd-oppolzer.de/blog_20150115_151000.htm
<http://bernd-oppolzer.de/blog_20150115_151000.htm> .

this Contains a REXX Procedure
to sort a stem variable.
See quicksort_nonrec

hth

Kind regards

Bernd




--- Original-Nachricht ---
Von: Paul Gilmartin
Betreff: Rexx SORT (was: ... Job Scheduler ... )
Datum: 07.06.2017, 5:42 Uhr
An: [email protected]





On Wed, 7 Jun 2017 00:33:30 +0000, Rob Schramm wrote:

>Address SORT
>
>is more what I was thinking. It is just such a commonly needed thing for
>simple sorts i.e.
>SORT 1 8 a
>
I'm guessing the arguments are a column range and Ascending?

>Guess I am just lazy/annoyed when it comes to things that I think should 
be
>provided.
>
This is too specialized for my taste. I could envision making every command
in the Utilities Ref. a command environment. I'd like something more 
general.
(But I'm inconsistent. I enthusiastically approve ADDRESS ISREDIT and
ADDRESS SDSF. But those environments are quasi-interactive: each subcommand
returns a status. DFSORT isn't like that.)

With Regina I can:
555 $ cat showsort.rex <http://showsort.rex>
#! /usr/bin/rexx
signal on novalue

F1.1 = 'Larry'
F1.2 = 'Moe'
F1.3 = 'Curly'
F1.0 = 3

address SYSTEM 'sort' '-k1.1,1.8' with , /* Issue the 'sort' command. */
input stem F1. ,
output stem F2.

do I = 1 to F2.0
say I F2.I; end I

... and get output:
556 $ rexx showsort
1 Curly
2 Larry
3 Moe

ADDRESS WITH redirection seems to be an ANSI Rexx construct that IBM
has chosen not to implement:
http://www.rexxla.org/rexxlang/standards/j18pub.pdf
<http://www.rexxla.org/rexxlang/standards/j18pub.pdf>

I could envision adapting it in TSO Rexx something like:
address LINKMVS 'ICEMAN' with ,
DD:SORTIN stem F1. ,
DD:SORTOUT stem F2.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] <http://listserv.ua.edu> with the 
message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to