Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to Sort a PS file using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to Sort a PS file using REXX
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

Moderator Team Head


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

PostPosted: Thu Feb 16, 2006 6:01 pm    Post subject: Re: How to Sort a PS file using REXX
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    Post subject:
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    Post subject: Is there any TSO command for Sorting in REXX
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

Moderator Team Head


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

PostPosted: Fri Feb 17, 2006 12:59 pm    Post subject: Re: How to Sort a PS file using REXX
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    Post subject:
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    Post subject: Regaring sorting thru rexx
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us