I haven't used (or needed) it in years and lost the code. If I remember
right this involved setting an ISPF Profile variable (ZCOLOR, I think) on an
old screen (probably an obsolete, predecessor to CUAATTR). I'm pretty sure
this also executed a program and I did this with stuffing a ZCMD with a
CONTROL NONDISPL ENTER (prior to the newer and cleaner DISPLAY COMMAND(...)
service).
I used this in a "monitor" application that would change the popup border
color to red for critical events and activities, yellow for action windows,
green for help windows and turquoise for "in progress" events. As luck would
have it, I need to do something similar again.
I did find a reference to ZCOLOR in the source for the ISPOPT11 panel used by
CUAATTR, but I tried setting ZCOLOR and it had no effect. I can't find any
real documentation for CUAATTR that suggests that it may have any command
line arguments.
So finally, my question...
Does anyone know how to set the Active Window Frame color under program
control (REXX)?
Thanks,
Robert Zenuk
robz...@aol.com
George Mosley
Thanks,
Robert Zenuk
robz...@aol.com
Regards,
John Kalinich
These variables are system profile variables which require special
processing by ISPF to be updated. You must go thru the pgm/panel
interfaces
to update them correctly. This can be done thru use of CONTROL NONDISPL
END
and LIBDEF
/* REXX */
address ispexec
"LIBDEF ISPPLIB DATASET ID('MARV.PANELS')"
"CONTROL NONDISPL END"
"SELECT PGM(ISPOPT) PARM(ISPOPT11)"
exit
In the above if you have your own copy of panel ISPOPT11
with the variables set as you desired, then you can change the
variables thru the dialog. Other system variables can be set in a similar
manner
by modifying the appropriate panels.
I believe that setting &ZCOLOR and &COLOR20 as the last statement in the
)INIT
will change active window frame and panel title respectively.
Hope this helps...
Marv Knight
George Mosley
Unless I'm still missing something, I think a generic implementation to set
the border to any color would require 7 clone panels (one for each color).
Then I enhanced your sample logic to get some bare bones working code. My 7
clones panels are named AFRED, AFGREEN, AFBLUE.....
/* rexx */
arg color
ispplib = 'MY.PANEL.DSN'
mem = 'AF' || color
"rename '"ispplib"("mem")' '"ispplib"(ISPOPT11)'"
address ISPEXEC
"LIBDEF ISPPLIB DATASET ID('"ispplib"')"
"CONTROL NONDISPL ENTER"
"CONTROL NONDISPL END"
"SELECT PGM(ISPOPT) PARM(ISPOPT11)"
"LIBDEF ISPPLIB"
address TSO
"rename '"ispplib"(ISPOPT11)' '"ispplib"("mem")'"
exit
I did need the CONTROL NONDISPL ENTER as well. Did I go overboard or is this
the way to do this?
I realize this is subject to review with maintenance activities and a USERMOD
is probably in order to keep track of potential future regression.
Thanks again,
Robert Zenuk
robz...@aol.com
If this is a small program, say a Rexx exec, you could just imbed the panel there (see
ISRSETLN for an example) and avoid having a real panel library altogether. A quick
example is shown below.
On 21 Jan 2002 18:49:53 -0800, in bit.listserv.ispf-l you wrote:
>Great.
>
>Unless I'm still missing something, I think a generic implementation to set
>the border to any color would require 7 clone panels (one for each color).
>Then I enhanced your sample logic to get some bare bones working code. My 7
>clones panels are named AFRED, AFGREEN, AFBLUE.....
/* REXX - example to show frame color changing on the fly */
Address 'ISPEXEC'
ddname = '$'right(time(s),7,'0') /* create unique ddname */
Address tso 'ALLOC NEW DEL F('ddname') DIR(1) SP(1) TR RECF(F B)
BLKS(0) LRECL(80) REU' /* Allocate data set */
'LMINIT DATAID(DID) DDNAME('ddname') ENQ(EXCLU)'
'LMOPEN DATAID(&DID) OPTION(OUTPUT)'
pan.1=")BODY "
pan.2="%Command ===>_ZCMD + "
pan.3=")INIT "
pan.4="&ZCMD = ' ' "
pan.5="VGET (BCOLOR) SHARED "
pan.6="&ZCOLOR = &BCOLOR "
pan.7=".RESP = END "
pan.8=")END "
Do a=1 to 8
line = pan.a
'LMPUT DATAID(&DID) MODE(INVAR) DATALOC(LINE) DATALEN(80)'
End
'LMMADD DATAID(&DID) MEMBER(ISPOPT11)'
'LMFREE DATAID(&DID)'
'LIBDEF ISPPLIB LIBRARY ID('ddname') STACK' /* LIBDEF panels */
colors = 'RED GREEN TURQ YELLOW'
do a=1 to 4
BCOLOR = word(colors,a)
'VPUT BCOLOR SHARED'
'SELECT PGM(ISPOPT) PARM(ISPOPT11)' /* Prompt user for length */
'ADDPOP'
'DISPLAY PANEL(ISPKLUP)' /* show a sample panel - any popup will do */
'REMPOP'
end
'VERASE BCOLOR SHARED'
'LIBDEF ISPPLIB ' /* Remove Panels libdef */
Address tso 'FREE F('ddname')' /* Free and delete temp file */
Doug Nadel
----------------------------------------
ISPF and OS/390 Tools & Toys page:
http://somebody.home.mindspring.com/
Mail containing HTML or any attachments, including vcf files, is
automatically discarded. If you need to send me an attachment,
please let me know so that I can change my email filters.
Marv
For others, here was how I incorporated this into a callable routine:
/*********************************************************************/
/* REXX */
/*********************************************************************/
/* Purpose: Change the Active Frame Border color */
/*-------------------------------------------------------------------*/
/* Syntax: AFBSET color */
/*-------------------------------------------------------------------*/
/* Parms: color - New color for the border */
/* */
/*********************************************************************/
/* Change Log */
/* */
/* Author Date Reason */
/* -------- --------- ----------------------------------------- */
/* R. Zenuk Jan 2002 Initial Creation */
/* */
/*********************************************************************/
/* Standard entry */
/*********************************************************************/
parse upper source . . execname . execdsn . . execenv .
signal on syntax name trap
signal on failure name trap
signal on novalue name trap
EXITRC = 0
x = time('r')
/*********************************************************************/
/* Startup message */
/*********************************************************************/
startmsg = execname 'started' date() time()
if sysvar('SYSENV') = 'BACK' then
do
say center(' 'startmsg' ',78,'-')
say
end
/*********************************************************************/
/* Accept parms */
/*********************************************************************/
arg parms
/*********************************************************************/
/* Parse and validate parms */
/*********************************************************************/
parse var parms @tfcolor
if @tfcolor = '' then call rcexit 12 'Required COLOR is missing'
/*********************************************************************/
/* Allocate a temporary PDS */
/*********************************************************************/
dsn = userid()||'.'||execname||'.T'||right(time('s'),7,0)||'(ISPOPT11)'
"ALLOC F("execname") DA('"dsn"') NEW CATALOG LRECL(80) BLKS(0) DIR(1)",
"SPACE(1) UNIT(SYSDA) RECFM(F B)"
call rcexit RC 'Allocate of' dsn 'failed'
/*********************************************************************/
/* Build a temporary panel */
/*********************************************************************/
pan.0 = 8
pan.1=")BODY "
pan.2="%Command ===>_ZCMD + "
pan.3=")INIT "
pan.4="&ZCMD = ' ' "
pan.5="VGET (@TFCOLOR) SHARED "
pan.6="&ZCOLOR = &@TFCOLOR "
pan.7=".RESP = END "
pan.8=")END "
/*********************************************************************/
/* Write the records into the ISPOPT11 panel */
/*********************************************************************/
"EXECIO * DISKW" execname "(STEM PAN. FINIS"
call rcexit RC 'EXECIO DISKW to' execname 'failed'
/*********************************************************************/
/* LIBDEF the DSN, VPUT @TFCOLOR and run CUAATTR */
/*********************************************************************/
address ISPEXEC "LIBDEF ISPPLIB LIBRARY ID("execname") STACK"
call rcexit RC 'LIBDEF error'
address ISPEXEC "VPUT (@TFCOLOR) SHARED"
call rcexit RC 'VPUT error' @tfcolor
address ISPEXEC "SELECT PGM(ISPOPT) PARM(ISPOPT11)"
call rcexit RC 'SELECT error on ISPOPT'
address ISPEXEC "LIBDEF ISPPLIB"
call rcexit RC 'LIBDEF error'
/*********************************************************************/
/* Shutdown */
/*********************************************************************/
shutdown: nop
"FREE F("execname") DELETE"
endmsg = execname 'ended' date() time() time('e') 'RC='EXITRC
if sysvar('SYSENV') = 'BACK' then
do
say center(' 'endmsg' ',78,'-')
end
exit(EXITRC)
/*********************************************************************/
/* RCEXIT - Exit on non-zero return codes */
/*********************************************************************/
rcexit: parse arg EXITRC zedlmsg
if EXITRC <> 0 then
do
/*********************************************************************/
/* If execution environment is ISPF then VPUT ZISPFRC */
/*********************************************************************/
if execenv <> 'OMVS' then
do
"ISPQRY"
if RC = 0 then
do
zispfrc = EXITRC
address ISPEXEC "VPUT (ZISPFRC)"
end
end
/*********************************************************************/
/* If a message is provided, wrap it in date, time and EXITRC */
/*********************************************************************/
if zedlmsg <> '' then
do
zedlmsg = date() time() execname zedlmsg 'RC='EXITRC
/*********************************************************************/
/* If execution environment is ISPF SETMSG. If not, say the message */
/*********************************************************************/
if sysvar('SYSENV') = 'BACK' | execenv = 'OMVS' then
say zedlmsg
else
do
"ISPQRY"
if RC = 0 then
address ISPEXEC "SETMSG MSG(ISRZ000)"
else
say zedlmsg
end
end
/*********************************************************************/
/* Signal SHUTDOWN. SHUTDOWN label MUST exist in the program */
/*********************************************************************/
signal shutdown
end
else
return
/*********************************************************************/
/* Issue a common trap error message using rcexit */
/*********************************************************************/
trap: traptype = condition('C')
if traptype = 'SYNTAX' then
msg = errortext(RC)
else
msg = condition('D')
trapline = strip(sourceline(sigl))
msg = traptype 'TRAP:' msg', Line:' sigl '"'trapline'"'
call rcexit 666 msg