Ah, Mike and Sir Rob are both quite right.

- Swapping ID for PRINT made it stop throwing errors.
- But I definitely WAY over complicated this approach.

Thank you!

--Shawn S.


-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:[email protected]] On 
Behalf Of Michael Harding
Sent: Wednesday, December 14, 2016 4:55 PM
To: [email protected]
Subject: Re: [CMS-PIPELINES] SPEC IF String equality comparison and output 
including Field identifiers.

Also...  older pipes didn't like the use of a named range as the argument to 
print.  Changing "print a" to "id a" would work.

--
Mike Harding
z/VM System Support
/sp


CMSTSO Pipelines Discussion List <[email protected]> wrote on
12/14/2016 01:59:42 PM:

> From: Rob van der Heij <[email protected]>
> To: [email protected]
> Date: 12/14/2016 02:33 PM
> Subject: Re: SPEC IF String equality comparison and output including 
> Field identifiers.
> Sent by: CMSTSO Pipelines Discussion List 
> <[email protected]>
>
> > The way Ive written a SPEC stage appears to be causing error:
> >
> > FPLSPX1038E Not a decimal number: RANDOM EXEC F 80 40 1 2013-02-06
07:40:30
> > FPLMSG003I ... Issued from stage 5 of pipeline 1 FPLMSG001I ... 
> > Running "SPEC a: 1-* . SELECT SECOND b: 1-* . IF (a,==b)
TH"
> >
> > Input is paired sets of records (strings via two LISTFILE, already
> fed through a LOOKUP).
> > The intention is that output will be suppressed unless the pair of
> records (strings) are not equal.
>
> The messages suggest that you're using older plumbing that did not do
strings
> in named fields like that. But apart from that, this is probably not 
> what
you
> want to do. The 'second reading' in spec makes it process each record
twice,
> not process records pairwise.
>
> There is 'unique pairwise' that might help you out. But if you're
comparing
> the records pairwise like that, the more obvious approch is to put the
two
> records side by side and use 'pick' on the two ranges.
>
>    pad 100 | join | pick 21.80  /== 121.80
>
> If you know the length of the records, you can tell where the ranges are.
I
> was a bit lazy and made them 100 wide so the numbers were easier to
compute.
>
> PS I think this is the last example from my series 'Showing Off with
Lookup'
> that I had in my presentation in Munch this spring. I notice it has 
> the
same
> trick with the 'pad 100' ;-)
>
> /* NEWFILES EXEC On both, show newer */ arg fn ft fm1 fm2 . ; if fm2 = 
> '' then exit 24 address command 'PIPE (end \ name NEWFILES.EXEC:7)',
>   '\ command LISTFILE' fn ft fm1 '( NOH ISO',
>   '| x: lookup w1.2 detail master',
>   '| pad 100',
>   '| join',
>   '| pick 57.19 >> 157.19',
>   '| chop 20',                    /* Just fn ft fm */
>   '| cons',
>   '\ command LISTFILE' fn ft fm2 '( NOH ISO',
>   '| x:',
> exit rc
>
> And I owe you some neat examples with 'select second'
>
> Sir Rob the Plumber
>

Reply via email to