On 7/06/2017 2:08 AM, Rob Schramm wrote:
That is one surprising thing about Rexx and sort.. that Rexx doesn't have
built in support to call sort without a rigamarole.
It's difficult to implement a generic sort in REXX because functions are
not first class objects.
For example, using the UNIX sort command how would you sort this array
like this SORT(AGE,C,D,NAME,N,A)
employees.1.name = 'David'
employees.1.age = 46
employees.2.name = 'Mick'
employees.2.age = 46
employees.3.name = 'John'
employees.3.age = 63
employees.4.name = 'Liam'
employees.4.age = 23
employees.5.name = 'Roger'
employees.5.age = 72
That's trivial in other languages where you can just supply a callback
function (or lambda). In Lua it's simple.
local employees = {
{ name = 'David', age = 46 },
{ name = 'Mick', age = 46 },
{ name = 'John', age = 63 },
{ name = 'Liam', age = 23 },
{ name = 'Roger', age = 72 },
}
table.sort(employees, function(lhs, rhs)
if lhs.age ~= rhs.age then return lhs.age > rhs.age end
return lhs.name < rhs.name
end)
for _, value in ipairs(employees) do print(value.age, value.name) end
Rob
On Tue, Jun 6, 2017, 1:29 PM John McKown <[email protected]>
wrote:
On Tue, Jun 6, 2017 at 11:55 AM, Paul Gilmartin <
[email protected]> wrote:
On Tue, 6 Jun 2017 06:44:25 -0400, John Eells wrote:
... I expect to be informed of deficiencies of crontab, but at least
it's there.
<snip>
Why do you think crontab is "not there" in z/OS?
I'm aware that it's there, although only recently (from my perspective).
I don't know that it meets all the requirements of a job scheduler.
And some readers of this list still prefer not to deal with UNIX. But
I guess that's a personal problem.
(E.g coding dozens of lines of DFSORT commands where a single
"grep" would suffice.)
One could argue that DFSORT is superior due to it's extreme efficiency.
Especially compared to "grep". But that only applies when one is running it
in "heavy demand" situation. IMO, a slightly better case would be writing
something in "awk" versus REXX. IMO, for an "ad hoc", awk might possibly
beat REXX, if the programmer knows both. But only if the Co:Z hybrid batch
product (free from Dovetailed Technologies!) is installed. I wish that IBM
would license & bundle Co:Z with z/OS. That would increase it's legitimacy
to staid I.T. managers.
--gil
--
Prof: So the American government went to IBM to come up with a data
encryption standard and they came up with ...
Student: EBCDIC!
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] 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