Here you have a REXX that will do it. I prepared this program to work in an environment where there are standards. The conversion will not work with global usage, it is, all elementary items should be self descriptive.
To use it, save the code in a member called OB in your ISPEXEC PDS; edit...
In fact it is a function based on a well known algorithm, as QuickSort and ShellSort. What you got is an implementation that does Ascending and descending depending on a parameter, on the other hand it allows to sort only part of the array which could be handy in some cases. It also work as a...
I suggest you to use the following routine:
Usage:
' Load strEntry
' then:
BubbleSort strEntry(),1,"ASC",1,Ubound(strEntry)
You can keep it as a general sort routine for arrays that are not too big, let's say 100. For larger arrays I would suggest you to use...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.