On Tue, Mar 11, 2008 at 11:28 PM, CRPence <crp@xxxxxxxxxxxxxxxxxxxx> wrote:

I have never found, but never asked. So maybe someone knows
something exists... Is there any /substitution variable/ available that
enables an option defined like CC="ChgCurLib &±" to set the current

You do need to write some code. Here's a handy REXX utility with many uses
in PDM or any command line. Here's an example of an PDM user-defined option
that addresses your need:

RUNREXSTM STM('if &T = "*LIB" then "chgcurlib &N" else "chgcurlib &L"')

RUNREXSTM command source:

cmd prompt( 'Run REXX statement' )
parm kwd( stm ) prompt( 'REXX statement' ) +
type( *char ) len( 32000 ) +
min( 1 )

RUNREXSTM command processing program:

parse arg 'STM('stm

/* Strip off enclosing parenthesis */
stm = left( stm, ( lastpos( ")", stm ) - 1 ) )

/* Strip off enclosing apostophes */
if substr( strip( stm ), 1, 1) = "'" then do
firstquote = pos( "'", stm )
lastquote = lastpos( "'", stm )
stm = substr( stm, firstquote + 1, ( lastquote - firstquote ) - 1 )

/* Run it */
interpret stm


Based on REXTRY example in the REXX manual.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].