Re: A little pipe question.

2011-02-08 Thread Dave Jones
Oh.I see I completely misread the pipeline specification, Kris. xcmd
was indeed an argument to the starmsg stage.

Have a good one.

DJ

On 02/08/2011 10:23 AM, Kris Buelens wrote:
> "xcmd" is no stage, it just is a command that STARMSG will issue just
> after its start.
> 
> I've got an idea, I don't know if it is easily implemented: pass a
> command to STARMSG with a known response.  when that response arrives,
> send it to some other stream where you uses SPECS to replace it by the
> command to execute, that you pass to a COMMAND (or CP) stage that you
> give a secondary output to trap the returncode.
>   Something like:
>  '!STARMSG comamndWithKnowResponse',
>  '!L: NLOCATE /the_expected_response',
>  .
>  '?L:!SPEC /'xcmd'/ 1',
>  '!Cmd: COMMAND',
>  '?Cmd:!Var CmdRc',
>  ...
> 
> 2011/2/8 Tom Huegel mailto:tehue...@gmail.com>>
> 
> Thanks David, I thought that was the flow, but I didn't get it to
> work..  Maybe I was just tired. Between shoveling snow and watching
> the Super Bowl I'm ready for a vacation. 
> 
> 
> On Tue, Feb 8, 2011 at 5:53 AM, Dave Jones  > wrote:
> 
> Tom, if the "xcmd" stage has a secondary output stream defined,
> Pipelines will write the return code from the cp/cms command there.
> 
> Does that help?
> 
> DJ
> 
> On 02/07/2011 02:09 PM, Tom Huegel wrote:
> > I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE
> STARMSG.
> > I have the following snippet that seems to work fine except
> for capturing
> > the return code from the cp/cms command (XCMD).
> >
> > Is there a simple fix to this? - Thanks
> >
> > /*
> > */
> >
> > trace
> > o
> > cp set msg
> > iucv
> > arg
> > xcmd
> > 'pipe (endchar
> > ?)',
> >   '| starmsg
> > ',
> >
> > xcmd,
> >   '| specs 9-16 1 17-* strip nw x15
> > nw',
> >   '| stem linecount.',   /* save results
> > */
> >   '?',   /* start of second
> pipeline
> > */
> >   'literal +01', /* Delay time
> > */
> >   '| delay', /* Delay
> > */
> >   '| pipestop'   /* Stop
> > */
> > say
> > rc
> >
> > cp set msg
> > on
> > 'pipe stem linecount. |
> > console'
> > exit
> >
> 
> --
> Dave Jones
> V/Soft Software
> www.vsoft-software.com 
> Houston, TX
> 281.578.7544
> 
> 
> 
> 
> 
> -- 
> Kris Buelens,
> IBM Belgium, VM customer support

-- 
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544


Recall: A little pipe question.

2011-02-08 Thread Schuh, Richard
Schuh, Richard would like to recall the message, "A little pipe question.".

Re: A little pipe question.

2011-02-08 Thread Schuh, Richard
Tom,

Here is a pipe that I have extracted from an EXEC that we have been using for 
several years that does the type of thing you appear to be attempting. Let me 
know if you have any questions.

Regards,
Richard Schuh






From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf 
Of Tom Huegel
Sent: Tuesday, February 08, 2011 6:39 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: A little pipe question.

Thanks David, I thought that was the flow, but I didn't get it to work..  Maybe 
I was just tired. Between shoveling snow and watching the Super Bowl I'm ready 
for a vacation.

On Tue, Feb 8, 2011 at 5:53 AM, Dave Jones 
mailto:d...@vsoft-software.com>> wrote:
Tom, if the "xcmd" stage has a secondary output stream defined,
Pipelines will write the return code from the cp/cms command there.

Does that help?

DJ

On 02/07/2011 02:09 PM, Tom Huegel wrote:
> I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG.
> I have the following snippet that seems to work fine except for capturing
> the return code from the cp/cms command (XCMD).
>
> Is there a simple fix to this? - Thanks
>
> /*
> */
>
> trace
> o
> cp set msg
> iucv
> arg
> xcmd
> 'pipe (endchar
> ?)',
>   '| starmsg
> ',
>
> xcmd,
>   '| specs 9-16 1 17-* strip nw x15
> nw',
>   '| stem linecount.',   /* save results
> */
>   '?',   /* start of second pipeline
> */
>   'literal +01', /* Delay time
> */
>   '| delay', /* Delay
> */
>   '| pipestop'   /* Stop
> */
> say
> rc
>
> cp set msg
> on
> 'pipe stem linecount. |
> console'
> exit
>

--
Dave Jones
V/Soft Software
www.vsoft-software.com<http://www.vsoft-software.com/>
Houston, TX
281.578.7544

/**/
'PIPE (end \)',
'\ f: faninany',
   '| take 1',
   '| pipestop',
'\ starmsg *msg cp smsg' rscsid pfx sys cmd,
   '| b: beat 5 /Timeout/',
   '| eof: nlocate anyc  /garbage/',
   '| f2: faninany',
   '| not chop 16',
   '| stem' stem '1',
   '| take 1',
   '| spec /smsg rscs' pfx sys 'garbage/ 1',
   '| cp',
'\ b:',
   '| take 1',
   '| f:',
'\ eof:',
   '| take 1',
   '| f:',
'\ immcmd q',
   '| take 1',
   '| f:'


Re: A little pipe question.

2011-02-08 Thread Kris Buelens
"xcmd" is no stage, it just is a command that STARMSG will issue just after
its start.

I've got an idea, I don't know if it is easily implemented: pass a command
to STARMSG with a known response.  when that response arrives, send it to
some other stream where you uses SPECS to replace it by the command to
execute, that you pass to a COMMAND (or CP) stage that you give a secondary
output to trap the returncode.
  Something like:
 '!STARMSG comamndWithKnowResponse',
 '!L: NLOCATE /the_expected_response',
 .
 '?L:!SPEC /'xcmd'/ 1',
 '!Cmd: COMMAND',
 '?Cmd:!Var CmdRc',
 ...

2011/2/8 Tom Huegel 

> Thanks David, I thought that was the flow, but I didn't get it to work..
> Maybe I was just tired. Between shoveling snow and watching the Super Bowl
> I'm ready for a vacation.
>
>
> On Tue, Feb 8, 2011 at 5:53 AM, Dave Jones wrote:
>
>> Tom, if the "xcmd" stage has a secondary output stream defined,
>> Pipelines will write the return code from the cp/cms command there.
>>
>> Does that help?
>>
>> DJ
>>
>> On 02/07/2011 02:09 PM, Tom Huegel wrote:
>> > I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG.
>> > I have the following snippet that seems to work fine except for
>> capturing
>> > the return code from the cp/cms command (XCMD).
>> >
>> > Is there a simple fix to this? - Thanks
>> >
>> > /*
>> > */
>> >
>> > trace
>> > o
>> > cp set msg
>> > iucv
>> > arg
>> > xcmd
>> > 'pipe (endchar
>> > ?)',
>> >   '| starmsg
>> > ',
>> >
>> > xcmd,
>> >   '| specs 9-16 1 17-* strip nw x15
>> > nw',
>> >   '| stem linecount.',   /* save results
>> > */
>> >   '?',   /* start of second pipeline
>> > */
>> >   'literal +01', /* Delay time
>> > */
>> >   '| delay', /* Delay
>> > */
>> >   '| pipestop'   /* Stop
>> > */
>> > say
>> > rc
>> >
>> > cp set msg
>> > on
>> > 'pipe stem linecount. |
>> > console'
>> > exit
>> >
>>
>> --
>> Dave Jones
>> V/Soft Software
>> www.vsoft-software.com
>> Houston, TX
>> 281.578.7544
>>
>
>


-- 
Kris Buelens,
IBM Belgium, VM customer support


Re: A little pipe question.

2011-02-08 Thread Tom Huegel
Thanks David, I thought that was the flow, but I didn't get it to work..
Maybe I was just tired. Between shoveling snow and watching the Super Bowl
I'm ready for a vacation.

On Tue, Feb 8, 2011 at 5:53 AM, Dave Jones  wrote:

> Tom, if the "xcmd" stage has a secondary output stream defined,
> Pipelines will write the return code from the cp/cms command there.
>
> Does that help?
>
> DJ
>
> On 02/07/2011 02:09 PM, Tom Huegel wrote:
> > I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG.
> > I have the following snippet that seems to work fine except for capturing
> > the return code from the cp/cms command (XCMD).
> >
> > Is there a simple fix to this? - Thanks
> >
> > /*
> > */
> >
> > trace
> > o
> > cp set msg
> > iucv
> > arg
> > xcmd
> > 'pipe (endchar
> > ?)',
> >   '| starmsg
> > ',
> >
> > xcmd,
> >   '| specs 9-16 1 17-* strip nw x15
> > nw',
> >   '| stem linecount.',   /* save results
> > */
> >   '?',   /* start of second pipeline
> > */
> >   'literal +01', /* Delay time
> > */
> >   '| delay', /* Delay
> > */
> >   '| pipestop'   /* Stop
> > */
> > say
> > rc
> >
> > cp set msg
> > on
> > 'pipe stem linecount. |
> > console'
> > exit
> >
>
> --
> Dave Jones
> V/Soft Software
> www.vsoft-software.com
> Houston, TX
> 281.578.7544
>


Re: A little pipe question.

2011-02-08 Thread Dave Jones
Tom, if the "xcmd" stage has a secondary output stream defined,
Pipelines will write the return code from the cp/cms command there.

Does that help?

DJ

On 02/07/2011 02:09 PM, Tom Huegel wrote:
> I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG.
> I have the following snippet that seems to work fine except for capturing
> the return code from the cp/cms command (XCMD).
> 
> Is there a simple fix to this? - Thanks
> 
> /*
> */
> 
> trace
> o
> cp set msg
> iucv
> arg
> xcmd
> 'pipe (endchar
> ?)',
>   '| starmsg
> ',
> 
> xcmd,
>   '| specs 9-16 1 17-* strip nw x15
> nw',
>   '| stem linecount.',   /* save results
> */
>   '?',   /* start of second pipeline
> */
>   'literal +01', /* Delay time
> */
>   '| delay', /* Delay
> */
>   '| pipestop'   /* Stop
> */
> say
> rc
> 
> cp set msg
> on
> 'pipe stem linecount. |
> console'
> exit
> 

-- 
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544


Re: A little pipe question.

2011-02-08 Thread Frank M. Ramaekers
Try the IBMVM Pipelines Listserv for a response.

 

 

Frank M. Ramaekers Jr.

 

 



From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On
Behalf Of Tom Huegel
Sent: Monday, February 07, 2011 2:10 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: A little pipe question.

 

I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG.
I have the following snippet that seems to work fine except for
capturing the return code from the cp/cms command (XCMD).

Is there a simple fix to this? - Thanks

/* */

trace o

cp set msg iucv

arg  xcmd

'pipe (endchar ?)',

  '| starmsg ',

 xcmd,

  '| specs 9-16 1 17-* strip nw x15 nw',

  '| stem linecount.',   /* save results
*/  
  '?',   /* start of second pipeline
*/  
  'literal +01', /* Delay time
*/  
  '| delay', /* Delay
*/  
  '| pipestop'   /* Stop
*/  
say rc

cp set msg on

'pipe stem linecount. | console'

exit



_
This message contains information which is privileged and confidential and is 
solely for the use of the
intended recipient. If you are not the intended recipient, be aware that any 
review, disclosure,
copying, distribution, or use of the contents of this message is strictly 
prohibited. If you have
received this in error, please destroy it immediately and notify us at 
privacy...@ailife.com.


A little pipe question.

2011-02-07 Thread Tom Huegel
I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG.
I have the following snippet that seems to work fine except for capturing
the return code from the cp/cms command (XCMD).

Is there a simple fix to this? - Thanks

/*
*/

trace
o
cp set msg
iucv
arg
xcmd
'pipe (endchar
?)',
  '| starmsg
',

xcmd,
  '| specs 9-16 1 17-* strip nw x15
nw',
  '| stem linecount.',   /* save results
*/
  '?',   /* start of second pipeline
*/
  'literal +01', /* Delay time
*/
  '| delay', /* Delay
*/
  '| pipestop'   /* Stop
*/
say
rc

cp set msg
on
'pipe stem linecount. |
console'
exit