IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Sort a PS file using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lokesh_try8

New User


Joined: 30 Dec 2005
Posts: 14
Location: Chennai

PostPosted: Thu Feb 16, 2006 5:43 pm
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Feb 16, 2006 6:01 pm
Reply with quote

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
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Thu Feb 16, 2006 6:40 pm
Reply with quote

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
View user's profile Send private message
lokesh_try8

New User


Joined: 30 Dec 2005
Posts: 14
Location: Chennai

PostPosted: Fri Feb 17, 2006 12:45 pm
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Feb 17, 2006 12:59 pm
Reply with quote

Previous Post
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Fri Feb 17, 2006 1:49 pm
Reply with quote

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
View user's profile Send private message
ksreddy1976

New User


Joined: 28 Jun 2005
Posts: 7

PostPosted: Fri Feb 17, 2006 3:24 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top