Note too that these embedded attributes stop working as soon as the end-user
uses CP's SCREEN command to give some color to VMOUT.
And, when wanting to highlight whole lines (as opposed to a few characters
in a line, one can get nicer effects when playing with CP SCREEN VMOUT.
A simple example:
 'CONWAIT' /* assure CMS sends all pending console output to the screen */
 call diag 8,'SCREEN VMOUT RED'
 say 'this is in red'
 'CONWAIT' /* send all pending console output, here our red text */
 call diag 8,'SCREEN VMOUT DEFAULT'
A more elaborated subroutine
  call SayBox '{RED REVV}',
      '-->Ho<--',customer 'has only signed for' ContractSpace'GB',,
      'but wants to use' space3+space9'GB',,
      'They need to sign extra space before the test.'
.....
/*-----------------------------------------------------------------*/
SayBox: /*                                                         */
/* Parms: arg(1): is it starts with {, then it defines color en co)*/
/* Other args: text to say on console (maybe colored thus)         */
/*-----------------------------------------------------------------*/
Procedure
 if Left(arg(1),1)='{' then FirstArg=2
                       else FirstArg=1
 If FirstArg>1 then do
    parse arg '{' colordef '}'
    'PIPE CP Q SCREEN|SPEC 40-* 1|Var OldColor'
    'PIPE CP SCREEN VMOUT' colordef '|VAR EMSG'
    if rc<>0 then say emsg
    'CONWAIT'
 end
 mx=40 /* Min box width */
 do i=FirstArg to arg(); mx=max(mx,length(arg(i))) ;end
 mx=min(78,mx)
 if Mx<76 then do;extra=' ';mx=mx+2;end; else extra='';

 say '*'left('',mx,'-')'*'
 do i=FirstArg to arg(); say '|'left(extra||arg(i)extra,mx)'|' ;end
 say '*'left('',mx,'-')'*'
 If FirstArg>1 then do
    'CONWAIT'
    'PIPE CP SCREEN' OldColor
 end
return


2011/8/11 Alan Altmark <alan_altm...@us.ibm.com>

> On Thursday, 08/11/2011 at 12:23 EDT, "Feller, Paul"
> <pfel...@aegonusa.com> wrote:
> >  Okay, this is interesting.  I change the EXEC to use the hex codes that
> Mike
> > is using and the stuff seems to work with the blank space in the say
> command.
> > I?m using IBM PCOMM and it failed with my original code on a mod4 screen
> and a
> > 3290 size screen.  I always run with extended attribute support turned
> on.  For
> > now I?ll continue my work using the different hex codes.  Thanks for the
> help.
> >
> > hi='1DE8'x                               /* 3270 Hilite Char     */
> > lo='1D60'x                               /* 3270 Default Char    */
>
> The high-order 2 bits of the attribute value are set according to the
> value of the low-order 6 bits; the 1DE8 and 1D60 are the architecturally
> correct values, per the 3270 Data Stream Programming Reference.
>
> The behavior of other bit patterns is undefined.
>
> Alan Altmark
>
> Senior Managing z/VM and Linux Consultant
> IBM System Lab Services and Training
> ibm.com/systems/services/labservices
> office: 607.429.3323
> mobile; 607.321.7556
> alan_altm...@us.ibm.com
> IBM Endicott
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to