There are other tricks: make 1 record of both the counter and the
data.  *Completely
untested*
 "ADDPIPE (sep ! end ?)',
  '? literal',
  '! dup *',
  '!S: spec STOP ANYEOF',
       'recno 1',              /* record nr in col 1 */
       'Select 1 1-* 11',  /* data in cols 11 etc */
  '!*.input:',
 '? *.input:",
  '! spec *-* c2x 1',
  '! fblock 2',
  '! reverse',
  '! fblock 1',
  '!S:'      /* Data to the SPECS stage */

'PEEKTO Record'
if rc=0 then parse var record where 11 Data



Kris Buelens,
     --- freelance z/VM consultant, Belgium ---
-----------------------------------------------------------------------

2016-05-14 17:54 GMT+02:00 <[email protected]>:

> OK, I will do as you adviced. Drawback: such a REXX fails when
> called from CMS command line.
>
> (The free WiFi Cafe is closing at 1800, so TNX and nice WE!)
>
> Ciao.....Mike
>
> Am 14.05.2016 um 17:47 schrieb Kris Buelens:
> > The problem is that the added PIPE runs independently of the REXX stage
> > that added it.  That REXX stage may have ended long before the added pipe
> > ends (or even before it really starts).  That's the reason why VAR and
> > Friend in an added PIPE don't even try to set variables in the REXX that
> > added it, but a level lower.
> >
> > To pass "things" to the REXX that added the pipe section, other
> techniques
> > must be used, like an extra input stream.  A simple solution for this
> case:
> > use a CALLPIPE to grab the variable that was set a level lower:
> >  'PEEKTO record'
> >  if rc=0 then 'CALLPIPE VAR Where 1!Var Where'
>
> --
> www.Ok.de - die kostenlose E-Mail Adresse
>

Reply via email to