Trace options (rexxref.pdf, 2.29 TRACE):

 * prefixes: there is a ? prefix option; on mainframe Rexx (cf. e.g. z/OS TSO/E 
REXX Reference:
   <https://www.ibm.com/docs/en/zos/2.1.0?topic=trace-prefix-options>) there is 
! as a prefix
   option for C (commands); the letters ?, !, _ in Rexx can be used in symbols 
like the alphabetic
   letters

 * alphabetic options: there are the following options, where only the first 
letter is taken, the
   rest ignored:

     o All or A
     o Commands or C
     o Error or E
     o Failure or F
     o Intermediates or I
     o Labels or L
     o Normal or N
     o Off or O
     o Results or R

Adding an option for activating multithreaded tracing could be in one of the following forms that adhere to the current logic:

 * prefix: allow a letter like 'M' (for multithreading) as a prefix like ? or !

     o Mike would see this option option as a subsidiary option and therefore 
it should not precede
       the alphabetic ("main") option and therefore suggests to append it 
instead, making it postfix

 * alphabetic option:

     o Add an optional second option 'Multithreaded' following after a blank 
the alphabetical
       option, hence the following two words need to be given (only the first 
character of each
       word would be used):

         + All Multithreaded or A M
         + Commands Multithreaded or C M
         + Error Multithreaded or E M
         + Failure Multithreaded or F M
         + Intermediates Multithreaded or I M
         + Labels Multithreaded or L M
         + Results Multithreaded or R M

 * postfix: following Mike's idea a trailing 'M' will activate multithreaded 
tracing and if it is
   not supplied will stop multithreading tracing:

     o AM
     o CM
     o EM
     o FM
     o IM
     o LM
     o RM

In theory the postfix notation could be implemented such, that the full name of an option may be given, but if the last letter is 'M' the programmer activates multithreading trace:

 * AllM or All_M or Anything_however_the_last_letter_is_M ...
 * CommandsM
 * ErrorM
 * FailureM
 * IntermediatesM
 * LabelsM
 * NormalM
 * OffM
 * ResultsM

Ad postfix letter 'M': if not desiring an alphabetic letter, letters like ?, !, _ could be picked (can be part of a symbol). If so, the underscore may be error prone (can be easily overlooked), ? may be irritating as it is used already as a prefix. If wanting to use ! then the same is true if considering mainframe Rexx' use as a prefix. OTOH, if ! is not regarded to be a problem in ooRexx, then one could use that letter:

 * A! or All!
 * C! or Commands!
 * E!  or Error!
 * F!  or Failure!
 * I!  or Intermediates!
 * L! or Labels!
 * R! or Results!

The only combination that may be regarded to be a little bit problematic is 'I!' as it looks almost like 'II'.

---

As this is a new feature of trace we could restrict activating the multithreaded output option to a two-letter trace option word where the last/second letter must be 'M'/'!' in order to activate it (if the last letter is not 'M'/'!' then it it is not activated or if currently active will be deactivated).

Following Mike's idea of a postfix 'M' ('!') is probably the easiest to memorize for programmers, plays well as a companion to the trace prefix concept and keeps all the trace options intact.

---rony

P.S.: Automatically triggering the multithreading trace output may cause surprise and also add too much information to the trace which in the usual case will not be needed. Multithreaded trace information will probably only be sought if a problem (deadlock) is experienced or for understanding/studying the dynamics of multithreaded execution.

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to