Thread View: bit.listserv.tsorexx
9 messages
9 total messages
Started by Phil Smith III
Tue, 05 Mar 2013 14:58
Re: SV: [TSO-REXX] Tuning Question
Author: Phil Smith III
Date: Tue, 05 Mar 2013 14:58
Date: Tue, 05 Mar 2013 14:58
53 lines
3194 bytes
3194 bytes
Paul Gilmartin wrote: >Also note that any reference to a standard function such as: > X = length( A ) >causes the interpreter to scan to the end of the entire program >searching for a possible user-defined function with the same >name, which may be considerable overhead, whereas quoting the >function name, as in: > X = 'LENGTH'( A ) >searches only for the standard (or possibly external) function. >But beware! In CMS Rexx, the quoted function name is treated as >case-sensitive; in TSO Rexx, case-insensitive. >Conversely, this behavior is useful in that a call to any >function results in the interpreter's immediately detecting >syntax errors in instructions that otherwise might not be >scanned until much later. Or, as others have noted, for overriding a BIF (not recommended for sanity, of course). There's a recurring performance myth that quoting your function names is thus good for performance. It's wrong: Rexx does indeed build a lookaside table of functions, so if you quote all your functions, all you avoid is that scan-the-rest-of-the-program pass. BUT quoted function names don't go into the lookaside, so you lose more than you gain. I suppose in the error case of a function called on line 3 of a 10,000-line program, the result of which causes an EXIT, you might save a bit -- but typically that isn't the path to optimize, of course. Whoever (sorry, I don't feel like grinding back through the Digest to figure out who -- it would be nice if folks would TRIM replies!) tested with LENGTH and 'LENGTH' in a loop already showed this. And of course as someone else noted, quoting functions is a pain to type and read -- consider: SAY 'LENGTH' 'LENGTH'(X) 'IS A SUBSTR OF' 'SUBSTR'(Y,1,'LENGTH'(Z)) ...much harder to read, even beyond the all caps! FTR, all this was analyzed to death in CMS decades ago. Too bad those days aren't archived (or maybe they are; I leave it as an exercise for someone else to hunt that down). ...phsiii ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Thomas Berg
Date: Tue, 05 Mar 2013 15:57
Date: Tue, 05 Mar 2013 15:57
81 lines
4362 bytes
4362 bytes
There is one place where quoted built-in functions is good: in signal error routines. You don't want rexx to scan the source (again) when you have catched a NOVALUE or a SYNTAX condition.
So e g:
...
Signal on novalue
Signal on syntax
...
NOVALUE: SYNTAX:
Say sigl "CONDITION"('C') "CONDITION"('D')
...
Regards
Thomas Berg
____________________________________________________________________
Thomas Berg Specialist z/OS\RQM\IT Delivery SWEDBANK AB (Publ)
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On
> Behalf Of Phil Smith III
> Sent: Tuesday, March 05, 2013 3:59 PM
> To: TSO-REXX@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question
>
> Paul Gilmartin wrote:
> >Also note that any reference to a standard function such as:
>
> > X = length( A )
>
> >causes the interpreter to scan to the end of the entire program
> >searching for a possible user-defined function with the same name,
> >which may be considerable overhead, whereas quoting the function name,
> >as in:
>
> > X = 'LENGTH'( A )
>
> >searches only for the standard (or possibly external) function.
>
> >But beware! In CMS Rexx, the quoted function name is treated as
> >case-sensitive; in TSO Rexx, case-insensitive.
>
> >Conversely, this behavior is useful in that a call to any function
> >results in the interpreter's immediately detecting syntax errors in
> >instructions that otherwise might not be scanned until much later.
>
> Or, as others have noted, for overriding a BIF (not recommended for
> sanity, of course).
>
> There's a recurring performance myth that quoting your function names
> is thus good for performance. It's wrong: Rexx does indeed build a
> lookaside table of functions, so if you quote all your functions, all
> you avoid is that scan-the-rest-of-the-program pass. BUT quoted
> function names don't go into the lookaside, so you lose more than you
> gain. I suppose in the error case of a function called on line 3 of a
> 10,000-line program, the result of which causes an EXIT, you might save
> a bit -- but typically that isn't the path to optimize, of course.
>
> Whoever (sorry, I don't feel like grinding back through the Digest to
> figure out who -- it would be nice if folks would TRIM replies!) tested
> with LENGTH and 'LENGTH' in a loop already showed this.
>
> And of course as someone else noted, quoting functions is a pain to
> type and read -- consider:
> SAY 'LENGTH' 'LENGTH'(X) 'IS A SUBSTR OF' 'SUBSTR'(Y,1,'LENGTH'(Z))
>
> ...much harder to read, even beyond the all caps!
>
> FTR, all this was analyzed to death in CMS decades ago. Too bad those
> days aren't archived (or maybe they are; I leave it as an exercise for
> someone else to hunt that down).
>
> ...phsiii
>
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions, send
> email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Adrian Stern
Date: Wed, 06 Mar 2013 10:00
Date: Wed, 06 Mar 2013 10:00
8 lines
1997 bytes
1997 bytes
After the incident with the rogue Xedit I seem to remember I did quote almost every BIF just to make sure I got the BIF and not some sysprog's version! That was in CMS ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Paul Gilmartin
Date: Wed, 06 Mar 2013 14:26
Date: Wed, 06 Mar 2013 14:26
19 lines
2176 bytes
2176 bytes
On Mar 6, 2013, at 03:00, Adrian Stern wrote: > After the incident with the rogue Xedit I seem to remember I did quote > almost every BIF just to make sure I got the BIF and not some sysprog's > version! > That was in CMS > Wouldn't it be nice if CMS (and z/OS) allowed you to select a MODULE by fully qualified path, HFS, MDFS, or DSN(MEMBER), rather than by directory/STEPLIB search order? TSO sort of achieves that, but only by putting the DSN at the head of the TASKLIB catenation for the duration of the execution. -- gil ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Adrian Stern
Date: Thu, 07 Mar 2013 09:22
Date: Thu, 07 Mar 2013 09:22
37 lines
3241 bytes
3241 bytes
That's asking for a big change in the os - maybe too big. It's always surprised me that in the foreground you can't create a "job" as easily as you can in the background - and altlib I've always felt a little uncertain about - which has often caused me to make foreground programs write a log with at leats the name and version of every routine involved - just to be sure. -----Original Message----- From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU] On Behalf Of Paul Gilmartin Sent: den 6 mars 2013 15:26 To: TSO-REXX@VM.MARIST.EDU Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question On Mar 6, 2013, at 03:00, Adrian Stern wrote: > After the incident with the rogue Xedit I seem to remember I did quote > almost every BIF just to make sure I got the BIF and not some sysprog's > version! > That was in CMS > Wouldn't it be nice if CMS (and z/OS) allowed you to select a MODULE by fully qualified path, HFS, MDFS, or DSN(MEMBER), rather than by directory/STEPLIB search order? TSO sort of achieves that, but only by putting the DSN at the head of the TASKLIB catenation for the duration of the execution. -- gil ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Bodoh John Robert [Contractor]
Date: Thu, 07 Mar 2013 13:42
Date: Thu, 07 Mar 2013 13:42
32 lines
2742 bytes
2742 bytes
What a horrible thought. That means that whenever you rename of move it to another data set, you have to find all uses of the module on the entire system and change every occurrence. What a mess. John Bodoh -----Original Message----- From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Paul Gilmartin Sent: Wednesday, March 06, 2013 9:26 AM To: TSO-REXX@vm.marist.edu Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question On Mar 6, 2013, at 03:00, Adrian Stern wrote: > After the incident with the rogue Xedit I seem to remember I did quote > almost every BIF just to make sure I got the BIF and not some sysprog's > version! > That was in CMS > Wouldn't it be nice if CMS (and z/OS) allowed you to select a MODULE by fully qualified path, HFS, MDFS, or DSN(MEMBER), rather than by directory/STEPLIB search order? TSO sort of achieves that, but only by putting the DSN at the head of the TASKLIB catenation for the duration of the execution. -- gil ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Paul Gilmartin
Date: Thu, 07 Mar 2013 15:26
Date: Thu, 07 Mar 2013 15:26
29 lines
2637 bytes
2637 bytes
On Mar 7, 2013, at 06:41, Bodoh John Robert [Contractor] wrote: > What a horrible thought. That means that whenever you rename of move it to another data set, you have to find all uses of the module on the entire system and change every occurrence. What a mess. > Not really. The existing scheme imposes similar requirememts: you have to find all STEPLIB/TASKLIB/ALTLIB/TSO CALL that might be involved and change each. (I did say "allowed", not "required".) UNIX has long supported a similar construct. No one seems much bothered by it, and no one is required to use it. > -----Original Message----- > From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Paul Gilmartin > Sent: Wednesday, March 06, 2013 9:26 AM > To: TSO-REXX@vm.marist.edu > Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question > > Wouldn't it be nice if CMS (and z/OS) allowed you to > select a MODULE by fully qualified path, HFS, MDFS, or > DSN(MEMBER), rather than by directory/STEPLIB search > order? -- gil ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Bodoh John Robert [Contractor]
Date: Thu, 07 Mar 2013 15:59
Date: Thu, 07 Mar 2013 15:59
44 lines
3994 bytes
3994 bytes
I was always taught that JCL was the bridge between the code and the data. The code could process any external data without change just by using JCL. I always thought that was one of the architectural points of MVS - Z/OS. Everywhere I worked it was always easier to change JCL rather than code. Suppose it was compiled REXX where I distributed the compiled code to customers. Compiled not because of speed but for protection of the source. Requiring a specific data set name for the functions would be a real restriction on the customer. John -----Original Message----- From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Paul Gilmartin Sent: Thursday, March 07, 2013 10:25 AM To: TSO-REXX@vm.marist.edu Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question On Mar 7, 2013, at 06:41, Bodoh John Robert [Contractor] wrote: > What a horrible thought. That means that whenever you rename of move it to another data set, you have to find all uses of the module on the entire system and change every occurrence. What a mess. > Not really. The existing scheme imposes similar requirememts: you have to find all STEPLIB/TASKLIB/ALTLIB/TSO CALL that might be involved and change each. (I did say "allowed", not "required".) UNIX has long supported a similar construct. No one seems much bothered by it, and no one is required to use it. > -----Original Message----- > From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Paul Gilmartin > Sent: Wednesday, March 06, 2013 9:26 AM > To: TSO-REXX@vm.marist.edu > Subject: Re: [TSO-REXX] SV: [TSO-REXX] Tuning Question > > Wouldn't it be nice if CMS (and z/OS) allowed you to > select a MODULE by fully qualified path, HFS, MDFS, or > DSN(MEMBER), rather than by directory/STEPLIB search > order? -- gil ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX ---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Re: SV: [TSO-REXX] Tuning Question
Author: Paul Gilmartin
Date: Thu, 07 Mar 2013 18:24
Date: Thu, 07 Mar 2013 18:24
38 lines
3352 bytes
3352 bytes
On Mar 7, 2013, at 08:59, Bodoh John Robert [Contractor] wrote:
> I was always taught that JCL was the bridge between the code and the data. The code could process any external data without change just by using JCL. I always thought that was one of the architectural points of MVS - Z/OS.
>
So, in JCL, it might be either:
//STEP EXEC PGM=IEFBR14
or:
//STEP EXEC PGM=SYS1.LINKLIB(IEFBR14)
> Everywhere I worked it was always easier to change JCL rather than code. Suppose it was compiled REXX where I distributed the compiled code to customers. Compiled not because of speed but for protection of the source. Requiring a specific data set name for the functions would be a real restriction on the customer.
>
Once again, I said (twice, so far; this is the third time)
"allowed", not "requiring" (your word). I would not envision
any current capability going away.
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Paul Gilmartin
> Sent: Thursday, March 07, 2013 10:25 AM
>
> (I did say "allowed", not "required".)
>
> UNIX has long supported a similar construct. No one seems much
> bothered by it, and no one is required to use it.
>
>> -----Original Message-----
>> From: TSO REXX Discussion List [mailto:TSO-REXX@vm.marist.edu] On Behalf Of Paul Gilmartin
>> Sent: Wednesday, March 06, 2013 9:26 AM
>>
>> Wouldn't it be nice if CMS (and z/OS) allowed you to
>> select a MODULE by fully qualified path, HFS, MDFS, or
>> DSN(MEMBER), rather than by directory/STEPLIB search
>> order?
-- gil
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads