Re: A little help with a REXX coding issue

2011-08-13 Thread Kris Buelens
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 FirstArg1 then do
parse arg '{' colordef '}'
'PIPE CP Q SCREEN|SPEC 40-* 1|Var OldColor'
'PIPE CP SCREEN VMOUT' colordef '|VAR EMSG'
if rc0 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 Mx76 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 FirstArg1 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


A little help with a REXX coding issue

2011-08-11 Thread Feller, Paul
I need a little help with a REXX coding issue.  I'm trying to do some 
highlighting of messages coming out of REXX.  The first test message works 
properly, part of the message is highlighted and part of the message is not.  
The second test message gets highlighted, but after that everything is 
highlighted.  If I change the Say lo' ' on line 19 to a Say lo'-' the 
highlighting is turned off.  What am I missing?

Original code:
 0 * * * Top of File * * *
 1 /*-*/
 2 /* */
 3 /*-*/
 4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')
 5 hi='1DF8'x/* HILITE variable WHITE   */
 6 lo='1D40'x/* UNHILITE variable   GREEN   */
 7
 8 /* First test */
 9
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF'
11
12 /* Second test */
13
14 Say hi' '
15 Say Left('FTPPERF: ',75,'=')
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ')
18 Say Left('FTPPERF: ',75,'=')
19 Say lo' '
20
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')
22 Exit
23 * * * End of File * * *


Code that seems to work:
 0 * * * Top of File * * *
 1 /*-*/
 2 /* */
 3 /*-*/
 4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')
 5 hi='1DF8'x/* HILITE variable WHITE   */
 6 lo='1D40'x/* UNHILITE variable   GREEN   */
 7
 8 /* First test */
 9
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF'
11
12 /* Second test */
13
14 Say hi' '
15 Say Left('FTPPERF: ',75,'=')
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ')
18 Say Left('FTPPERF: ',75,'=')
19 Say lo'-'
20
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')
22 Exit
23 * * * End of File * * *

Thanks..

Paul Feller
AIT Mainframe Technical Support



Re: A little help with a REXX coding issue

2011-08-11 Thread Mike Walter
I've been used the following since just about forever.  The work fine.
hi='1DE8'x   /* 3270 Hilite Char */
lo='1D60'x   /* 3270 Default Char*/

Both are different that yours.

Mike Walter
Aon Corporation
The opinions expressed herein are mine alone, not my employer's.


From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf 
Of Feller, Paul
Sent: Thursday, August 11, 2011 10:09 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: A little help with a REXX coding issue

I need a little help with a REXX coding issue.  I'm trying to do some 
highlighting of messages coming out of REXX.  The first test message works 
properly, part of the message is highlighted and part of the message is not.  
The second test message gets highlighted, but after that everything is 
highlighted.  If I change the Say lo' ' on line 19 to a Say lo'-' the 
highlighting is turned off.  What am I missing?
 
Original code:
0 * * * Top of File * * *  
1 /*-*/
2 /* */
3 /*-*/
4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')  
5 hi='1DF8'x    /* HILITE variable WHITE   */  
6 lo='1D40'x    /* UNHILITE variable   GREEN   */  
7  
8 /* First test */ 
9  
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF' 
11  
12 /* Second test */    
13  
14 Say hi' '    
15 Say Left('FTPPERF: ',75,'=') 
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')   
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ') 
18 Say Left('FTPPERF: ',75,'=') 
19 Say lo' '    
20  
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')  
22 Exit 
23 * * * End of File * * *  
 
 
Code that seems to work:
0 * * * Top of File * * *  
1 /*-*/
2 /* */
3 /*-*/
4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')  
5 hi='1DF8'x    /* HILITE variable WHITE   */  
6 lo='1D40'x    /* UNHILITE variable   GREEN   */  
7  
8 /* First test */ 
9  
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF' 
11  
12 /* Second test */    
13  
14 Say hi' '    
15 Say Left('FTPPERF: ',75,'=') 
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')   
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ') 
18 Say Left('FTPPERF: ',75,'=') 
19 Say lo'-'    
20  
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')  
22 Exit 
23 * * * End of File * * *  
 
Thanks..
 
Paul Feller 
AIT Mainframe Technical Support
 


Re: A little help with a REXX coding issue

2011-08-11 Thread Mike Walter
OK, re-reading your post, I copied/pasted the first exec into an EXEC (z/VM 
5.4.0, CMS Level 24, Service Level 001).
It ran just fine, displaying:
TEST: Start -- 11 Aug 2011 10:57:54 ---
Test the highlite stuff HILITE ON HILITE OFF

FTPPERF: ==
FTPPERF: -- 11 Aug 2011 10:57:54 --
FTPPERF: No PERFSVM report pulled
FTPPERF: ==
 TEST: End  11 Aug 2011 10:57:54 ---

Where the only highlighted text was HILITE ON, and all the lines beginning 
with FTPPERF:.  Those were bold-faced and underscored in this reply.

Could the problem be in your 3270 terminal emulator?  We're using IBM's PComm.

BTW, it's considered a rexx best practice on CMS to include at the top of 
your EXEC (unless there's a known reason to do otherwise:
  address command

Mike Walter
Aon Corporation
The opinions expressed herein are mine alone, not my employer's.

From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf 
Of Feller, Paul
Sent: Thursday, August 11, 2011 10:09 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: A little help with a REXX coding issue

I need a little help with a REXX coding issue.  I'm trying to do some 
highlighting of messages coming out of REXX.  The first test message works 
properly, part of the message is highlighted and part of the message is not.  
The second test message gets highlighted, but after that everything is 
highlighted.  If I change the Say lo' ' on line 19 to a Say lo'-' the 
highlighting is turned off.  What am I missing?

Original code:
0 * * * Top of File * * *
1 /*-*/
2 /* */
3 /*-*/
4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')
5 hi='1DF8'x/* HILITE variable WHITE   */
6 lo='1D40'x/* UNHILITE variable   GREEN   */
7
8 /* First test */
9
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF'
11
12 /* Second test */
13
14 Say hi' '
15 Say Left('FTPPERF: ',75,'=')
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ')
18 Say Left('FTPPERF: ',75,'=')
19 Say lo' '
20
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')
22 Exit
23 * * * End of File * * *


Code that seems to work:
0 * * * Top of File * * *
1 /*-*/
2 /* */
3 /*-*/
4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')
5 hi='1DF8'x/* HILITE variable WHITE   */
6 lo='1D40'x/* UNHILITE variable   GREEN   */
7
8 /* First test */
9
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF'
11
12 /* Second test */
13
14 Say hi' '
15 Say Left('FTPPERF: ',75,'=')
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ')
18 Say Left('FTPPERF: ',75,'=')
19 Say lo'-'
20
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')
22 Exit
23 * * * End of File * * *

Thanks..

Paul Feller
AIT Mainframe Technical Support



Re: A little help with a REXX coding issue

2011-08-11 Thread Feller, Paul
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*/

Paul Feller
AIT Mainframe Technical Support

From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf 
Of Mike Walter
Sent: Thursday, August 11, 2011 11:03 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: A little help with a REXX coding issue

OK, re-reading your post, I copied/pasted the first exec into an EXEC (z/VM 
5.4.0, CMS Level 24, Service Level 001).
It ran just fine, displaying:
TEST: Start -- 11 Aug 2011 10:57:54 ---
Test the highlite stuff HILITE ON HILITE OFF

FTPPERF: ==
FTPPERF: -- 11 Aug 2011 10:57:54 --
FTPPERF: No PERFSVM report pulled
FTPPERF: ==
 TEST: End  11 Aug 2011 10:57:54 ---

Where the only highlighted text was HILITE ON, and all the lines beginning 
with FTPPERF:.  Those were bold-faced and underscored in this reply.

Could the problem be in your 3270 terminal emulator?  We're using IBM's PComm.

BTW, it's considered a rexx best practice on CMS to include at the top of 
your EXEC (unless there's a known reason to do otherwise:
  address command

Mike Walter
Aon Corporation
The opinions expressed herein are mine alone, not my employer's.


From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf 
Of Feller, Paul
Sent: Thursday, August 11, 2011 10:09 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: A little help with a REXX coding issue

I need a little help with a REXX coding issue.  I'm trying to do some 
highlighting of messages coming out of REXX.  The first test message works 
properly, part of the message is highlighted and part of the message is not.  
The second test message gets highlighted, but after that everything is 
highlighted.  If I change the Say lo' ' on line 19 to a Say lo'-' the 
highlighting is turned off.  What am I missing?

Original code:
0 * * * Top of File * * *
1 /*-*/
2 /* */
3 /*-*/
4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')
5 hi='1DF8'x/* HILITE variable WHITE   */
6 lo='1D40'x/* UNHILITE variable   GREEN   */
7
8 /* First test */
9
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF'
11
12 /* Second test */
13
14 Say hi' '
15 Say Left('FTPPERF: ',75,'=')
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ')
18 Say Left('FTPPERF: ',75,'=')
19 Say lo' '
20
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')
22 Exit
23 * * * End of File * * *


Code that seems to work:
0 * * * Top of File * * *
1 /*-*/
2 /* */
3 /*-*/
4 Say Left('TEST: Start --' DATE()  TIME('N') '',075,'-')
5 hi='1DF8'x/* HILITE variable WHITE   */
6 lo='1D40'x/* UNHILITE variable   GREEN   */
7
8 /* First test */
9
10 Say 'Test the highlite stuff'hi'HILITE ON'lo'HILITE OFF'
11
12 /* Second test */
13
14 Say hi' '
15 Say Left('FTPPERF: ',75,'=')
16 Say Left('FTPPERF: --' DATE() TIME('N') '',75,'-')
17 Say Left('FTPPERF: No PERFSVM report pulled',75,' ')
18 Say Left('FTPPERF: ',75,'=')
19 Say lo'-'
20
21 Say Left('TEST: End ' DATE()  TIME('N') '',075,'-')
22 Exit
23 * * * End of File * * *

Thanks..

Paul Feller
AIT Mainframe Technical Support