Well, I thought "printonly eof" was a stage option rather than a break, and
the latter "eof" following the if clause sets the break action.  There
aren't any field definitions after that one.
Too, from what you're saying it should complain about the definition of a:,
when instead it seems to be complaining about the definition of b: within
the if clause.

So I removed the printonly eof and the latter eof, just for grins, and got
the same error.  Completely flummoxed now...  Reviewing the Specs
reference, I did come across:
| Conditional groups cannot contain input sources that have identifiers, as
it
| is indeterminate, in general, whether the field has been defined or not.

So maybe that's the problem and the message 1037 was leading me down the
wrong path, except the only identifier being used as an input source was in
"if a>#1", so I put a in another counter prior to the if and tested that:
|Spec printonly EOF a: w3 . set (#0+=1;#5:=a)',
  'if #5>#1 then',
     'b: substr 1.8 of w2 . c: substr 9.6 of w2 .',
     'set (#1:=a;#2:=b;#3:=c) fi',
  'eof print #0 strip 5 /samples, max was/ nw print #1 strip nw',
     '/on/ nw print #2 strip nw /at/ nw print #3 strip nw',
Same error 1037, with or without the printonly and later eof.

Finally, taking all identifier references out of the if clause worked:
'|Spec printonly EOF a: w3 . b: substr 1.8 of w2 . c: substr 9.6 of w2 .',
   'set (#0+=1;#5:=a;#6:=b;#7:=c)',
   'if #5>#1 then',
      'set (#1:=a;#2:=#6;#3:=#7) fi',
   'eof print #0 strip 5 /samples, max was/ nw print #1 strip nw',
      '/on/ nw print #2 strip nw /at/ nw print #3 strip nw',

Seems unnecessarily tortuous to me, but then I'm not programming it
And, I would swear I've used similar code before, deciding how to parse a
record depending on the value of a fixed field.
I.e.    ... a: w1 . if a=="type1" then b:  10.3 . else b: 20.3 endif....
Or maybe I just wrote a rexx stage...

Anyway, thanks for the response.
--
Mike Harding
z/VM System Support

mhard...@us.ibm.com
mikehard...@mindless.com
(925) 926-3179 (w)
(925) 323-2070 (c)
/sp


CMSTSO Pipelines Discussion List <CMS-PIPELINES@vm.marist.edu> wrote on
09/05/2013 01:05:50 PM:

> From: "John P. Hartmann" <jphartm...@gmail.com>
> To: CMS-PIPELINES@vm.marist.edu,
> Date: 09/05/2013 01:06 PM
> Subject: Re: I'm stumped
> Sent by: CMSTSO Pipelines Discussion List <CMS-PIPELINES@vm.marist.edu>
>
> Message 192 gives the game away. Wouldn't you say that EOF is a break?
>
> On 09/05/2013 09:05 PM, Michael Harding wrote:
> > This:
> > '|Spec printonly EOF a: w3 . set #0+=1',
> >     'if a>#1 then',
> >        'b: substr 1.8 of w2 . c: substr 9.6 of w2 .',
> >        'set (#1:=a;#2:=b;#3:=c) fi',
> >     'eof print #0 strip 5 /samples, max was/ nw print #1 strip nw',
> >        '/on/ nw print #2 strip nw /at/ nw print #3 strip nw',
> >
> > causes:
> > PIPSPE1037E Field identifiers cannot be defined in break items.
> > PIPMSG004I ... Issued from stage 2 of pipeline 2 name
"pageRate_alerts".
> > PIPMSG001I ... Running "Spec printonly EOF a: w3 . set #0+=1 if a>#1
then".
> > PIPSPE192I ... Scan at position 31; previous data "a: w3 . set #0+=1 if
> > a>#1 then".
> >
> > and I just can't see it, unless the if...fi clause is considered a
break
> > item.  No complaints without it though.
> >   And I've certainly defined field identifiers within if clauses
before,
> > just not in conjunction with a printonly option.
> >
> > Suggestions?
> > Thanks,
> > --
> > Mike Harding
> > z/VM System Support
> >
> > /sp
>

Reply via email to