Decided to give Mike's pipe a try, but it gives me an error:
pipe literal *|dup 8|spec if #0=='' then set #0:=-5 else set #0+=1 endif print
#0 n|Cons
"
FPLSPX1086E Improper operand for string comparison
FPLMSG003I ... Issued from stage 3 of pipeline 1
Works for me. Maybe you have an older version of CMS Pipelines.
I put it into a Rexx EXEC and surrounded it with double quotes, since you are
using single quotes.
temp
-5
-4
Let me guess. You are on the second record. #0 contains the number 5
and you compare it to a string.
On 06/27/2017 07:10 PM, Stanislawski, Shawn (National VM Capability) wrote:
Decided to give Mike's pipe a try, but it gives me an error:
pipe literal *|dup 8|spec if #0=='' then set #0:=-5 els
It works for me in an EXEC as well. I get similar errors when I run it from
the command line.
-Original Message-
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On
Behalf Of Ackerman, Alan
Sent: Tuesday, June 27, 2017 1:53 PM
To: CMS-PIPELINES@VM.MARIST.EDU
S
> Works for me. Maybe you have an older version of CMS Pipelines.
Right, string operands wasn't in z/VM 6.3 yet. But going all that way?
pipe literal | dup 8 | spec number from -5 | cons
Sir Rob the Plumber
Just tried again from the a command line. The '#' (w/o quotes) might be
causing the problem. CP is interpreting it as an end of line and I'm guessing
the 0 (zero) doesn't get prefixed with the '#'
Steve
-Original Message-
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.
Not so fast.
It all depends how the logical expression
if #0==''
is evaluated. On the first record it is unassigned, which compares
equal with a null string; on the sixth round, it is zero which converts
to "0"; perhaps not what was desired.
A better test for the first record is
Getting same error if performing from an EXEC (portrait style, with double
quote marks surrounding),
or if (I escape the TERMINAL LINEND characters and then) run it from the
console.
"SPEC if first()=1 then"... works for me.
"pipe literal | dup 8 | spec number from -5 | cons"... also works for
Any ideas how I would go about answering the Master Plumber's queries?
(PIPEDEMO EXEC maybe?)
"Let me guess. You are on the second record. #0 contains the number 5 and you
compare it to a string."
"It all depends how the logical expression / if #0=='' / is evaluated."
--Shawn S.
-O