View previous topic :: View next topic
|
Author |
Message |
lokesh_try8
New User
Joined: 30 Dec 2005 Posts: 14 Location: Chennai
|
|
|
|
Hi,
Can anybody help me out in sorting a PS file in REXX.If possible, Please reply me with example or Syntax for it OR with the URL to find out a solution for this.
Thanks & Regards,
Lokesh R |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I don't know why you wouldn't just call the SORT program, but anyway ...
Here's a
Code: |
http://users.comlab.ox.ac.uk/ian.collier/rexxla/sorting/sorts.rexx |
with all kinds of sort algorithms written in REXX.
and another site
and another.
There are many more sites with sorting algorithms. |
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Hey Lokesh,
1. One thing you can do that you can call the sort utiliyy from your REXX routine.
2. By using EXECIO DISKR, read the dataset and put the records in a stem. Then by simple logic sort the stem and now by EXECIO DISKW write down the stem into the DS.
3. Here by using macro it will be little bit problematic.
I suggest you to use EXECIO step. |
|
Back to top |
|
|
lokesh_try8
New User
Joined: 30 Dec 2005 Posts: 14 Location: Chennai
|
|
|
|
Hi,
Is there any TSO command which can be used in REXX for sorting a PS file. If possible, Please reply me with example or Syntax for it OR with the URL to find out a solution for this.
Thanks & Regards,
Lokesh R |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Hey Lokesh,
you can use SORT tso command. Its basically a macro. Syntax -
SORT <Start_Column> <End_Column>.
I think u will get full info by giving the command at ur command line -
qw sort. |
|
Back to top |
|
|
ksreddy1976
New User
Joined: 28 Jun 2005 Posts: 7
|
|
|
|
Hi Lokesh,
THe following will help u in sorting thru rexx
ARG sortin_ps sortout_ps
"ALLOCATE DD(SORTIN) DSN('"sortin_ps"') SHR REUSE"
"ALLOCATE DA('"sortout_ps"') FI(SORTOUT) OLD REUSE"
/***here you can allocate with new catalog option)
"ALLOCATE FI(SORTWK01) NEW DELETE SPACE(15,10) CYLINDERS "
ADDRESS LINKMVS SORT
"FREE FI(SORTWK01)"
"FREE FI(SORTIN)"
"FREE FI(SORTOUT)"
RETURN
Please let me know if have any concerns
Regards
Srinivas Reddy |
|
Back to top |
|
|
|