> parse upper pull input '-' var

results in a vm read 'cause the cms stack is empty. You didn't place any data 
in the stack. I think you should use the VAR stage, not mess with the CMS 
stack. But if you insist you can use the PIPE STACK stage to place piped output 
into the CMS stack.

> CP Q MUDLAKE

is not being handled by your console stage.  It is from the CP command you 
issued on your STARMSG stage directed to CP, but it is not output in the pipe 
output stream.  Only data captured by STARMSG will be output in the pipe stream.

You could alter the pipe to use the VAR stage to place the piped data into a 
variable.

/**/                                      
                                          
'CP SET MSG IUCV'                         
'PIPE (Endchar \)',                       
'STARMSG CP SEND CP TCPIP Q USERID',      
'| VAR CPOUT ',                           
'\',                                      
'LITERAL +2',                             
'| DELAY',                                
'| PIPESTOP'                              
                                          
say 'cpout:' cpout                        
 exit                                         
...

getem                                                 
cpout: 00000008TCPIP   TCPIP   : TCPIP    AT EGESSEB1 
Ready; T=0.01/0.01 14:32:51                           
                                                      


-----Original Message-----
From: The IBM z/VM Operating System on behalf of Dave Hansen
Sent: Wed 2/28/2007 1:54 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: [IBMVM] REXX EXEC - Trapping console messages w/SCIF
 
Hello,  I am still having trouble with my SCIF exec.

  Here it is:
/* rexx */
trace r
'set msg iucv'
'pipe (endchar \)',
'|starmsg CP Q MUDLAKE',
'| console',
'\',
'literal +2',
'| delay',
'| pipestop'
parse upper pull input '-' var
   if var = 'dsc' then nop
   else do
        say 'mudlake not logged on'
        exit 1369
        end
'set msg on'

  Here is it in action:
 12:46:27 jimmy
12:46:27      3 *-* 'set msg iucv'
12:46:27        >>>   "set msg iucv"
12:46:27      4 *-* 'pipe (endchar \)','|starmsg CP Q MUDLAKE','| console','\','
literal +
12:46:27 2','| delay','| pipestop'
12:46:27        >>>   "pipe (endchar \) |starmsg CP Q MUDLAKE | console \ litera
l +2 | de
12:46:27 lay | pipestop"
12:46:27 00: MUDLAKE  - DSC
12:46:29     11 *-* parse upper pull input '-' var

If I change the delay to 4 seconds the DSC message always has the same time as 
the pipestop.  The delay is how long before the parse is executed.  The
book says when pipestop reads an input record, it ends the stages.  Am I ending 
the stages?  It looks like the DSC message isn't PULLable because I
get placed in a VM READ.

Some SCIF stuff:
12:52:09 cp send cp mudlake q secuser
12:52:09 MUDLAKE : SECONDARY USER LNXADMIN IS LOGGED ON
12:52:09 Ready; T=0.01/0.01 12:52:09
12:52:11 id
12:52:11 LNXADMIN AT ZVM3     VIA *        02/28/07 12:52:11 CST      WEDNESDAY
12:52:11 Ready; T=0.01/0.01 12:52:11


  Thanks in advance,  Dave H.

Reply via email to