The difference would be that 'var' is satisfied after it got the first
record and will sever the input, so eof will propagate back through the
pipeline and eventually 'sql' will find its output gone. One would imagine
'sql' knows how to stop receiving more data from the connection. If it
doesn't, then you'd get the same hang with 'take 1 | stem res.'  for
example.

Rob

On 7 April 2015 at 16:21, Gentry, Steve <
[email protected]> wrote:

> On z/VM , I am running the following pipe:
>    'PIPE ( endchar ? NOMSGLEVEL 7 LISTERR) SQL NOIND',
>          'SELECT NAME',
>          'FROM EMPLOYEE_DIRECTORY',
>          "WHERE USER_ID = '"ud_user"'",
>          '| spec 3-* 1' ,
>          '| strip' ,
>          '| xlate lower' ,
>          '| o: fanout ',
>          '| split after blank ',    /* Retain multiple blanks      */
>          '| xlate 1 ',
>          '| j: join ',               /* Rebuild record              */
>          '| stem lwrList.' ,  /* output occurs here  */
>          '? o: ',
>          '| j:'
> The purpose of this pipe is to retrieve the employees name, i.e. JOHN DOE
> (it will be retrieved in upper case), then translated such that it will
> look like John Doe.    When I use STEM or CONS, the pipe gives the results
> I want.  When I use VAR ,  the PIPE seems to go into a loop.  Running with
> STEM or CONS, the result is returned within 2 seconds, with VAR , I've let
> it run as long as 60 seconds with no results. I finally issue a  #CP  EXT
> to interrupt the process.
> What would be causing what appears to be a loop?
> Thanks,
> Steve
> Ps: ud_user is a variable and contains the persons z/VM userid.
>

Reply via email to