Re: [CMS-PIPELINES] SPECS IF ... comparing strings

2018-12-17 Thread John P. Hartmann

It has always been sin

On 12/17/18 21:20, Michael Harding wrote:

The last I knew, double-quotes were the only acceptable delineator for this
construct but that may have changed.


Re: [CMS-PIPELINES] SPECS IF ... comparing strings

2018-12-17 Thread Donald Russell
Thanks Mike! That's perfect. :-)

On Mon, Dec 17, 2018 at 12:20 PM Michael Harding 
wrote:

> Easy, use a specs variable:
> ...
> '|Specs a: w -1 . . if a=="stuff" then ... else ... endif
>
> The last I knew, double-quotes were the only acceptable delineator for this
> construct but that may have changed.
> --
> Mike Harding
> z/VM System Support
> /sp
>
>
> CMSTSO Pipelines Discussion List  wrote on
> 12/17/2018 12:07:28 PM:
>
> > From: Donald Russell 
> > To: CMS-PIPELINES@VM.MARIST.EDU
> > Date: 12/17/2018 12:09 PM
> > Subject: SPECS IF ... comparing strings
> > Sent by: CMSTSO Pipelines Discussion List 
> >
> > I'm using structured data with specs to build a record, and the last word
> > of the input record influences part of the value..
> >
> > Rather than
> >  IF1: IF PICK W-1 == /stuff/
> >
> > SPECS ...
> >
> > IF1:
> >
> > SPECS ...
> >
> > IF1:
> >
> > Can the SPECS IF clause compare strings, so I can do something like...
> >
> > SPECS ... IF word(record(),-1) == /stuff/ THEN ... ENDIF
> > (The above got a syntax error)
> >
> > That avoids duplicating things if the two SPECS stage when using the
> > IF/THEN/ELSE with PICK.
> >
> > Thanks,
> > Don
> >
>


Re: [CMS-PIPELINES] SPECS IF ... comparing strings

2018-12-17 Thread Michael Harding
Easy, use a specs variable:
...
'|Specs a: w -1 . . if a=="stuff" then ... else ... endif

The last I knew, double-quotes were the only acceptable delineator for this
construct but that may have changed.
--
Mike Harding
z/VM System Support
/sp


CMSTSO Pipelines Discussion List  wrote on
12/17/2018 12:07:28 PM:

> From: Donald Russell 
> To: CMS-PIPELINES@VM.MARIST.EDU
> Date: 12/17/2018 12:09 PM
> Subject: SPECS IF ... comparing strings
> Sent by: CMSTSO Pipelines Discussion List 
>
> I'm using structured data with specs to build a record, and the last word
> of the input record influences part of the value..
>
> Rather than
>  IF1: IF PICK W-1 == /stuff/
>
> SPECS ...
>
> IF1:
>
> SPECS ...
>
> IF1:
>
> Can the SPECS IF clause compare strings, so I can do something like...
>
> SPECS ... IF word(record(),-1) == /stuff/ THEN ... ENDIF
> (The above got a syntax error)
>
> That avoids duplicating things if the two SPECS stage when using the
> IF/THEN/ELSE with PICK.
>
> Thanks,
> Don
>