Well, I'm sure the message is a bug (something is trying to convert to
integer), but you're converting those two fields each time you reference
them.  Maybe you should load them into a counter up front?

To find the bug, stick everything needed into a VM archive (VMARC) and send
it to me.  I'd like to capture the original specification list.  If you can
also generate a simpler test case to show the bug, so much the better.

Thanks,

   j.

2011/2/3 van Sleeuwen, Berry <[email protected]>

> OK, indeed this fixed the problem for negative numbers. But, fix one
> thing, break another. Now I get:
>
> PIPSPV058E Decimal number expected, but "2173720651" was found.
> PIPMSG003I ... Issued from stage 8 of pipeline 1.
> PIPMSG001I ... Running "specs select first z: w6".
> PIPSPV1426I ... Evaluating "o-O".
> PIPSPE1490I Processing item number 213: elseif (o-O)>0 then.
>
> Here is (a part of) the pipeline:
>
> Numeric digits 30
> 'PIPE',
> ...
> 'Specs',
> 'Select first',
> ..
> 'o: w25',
> 'Select second',
> ...
> 'O: w25',
> ...
> ' if o=="" then          ',  /* if empty          */
> '       set #14:=0       ',  /* set to 0          */
> ' elseif O=="" then      ',  /* if empty          */
> '       set #14:=0       ',  /* set to 0          */
> ' elseif (o-O)>0 then    ',  /* if delta positive */
> '       set #14:=(o-O)/60',  /* use delta         */
> ' elseif o=O then        ',  /* if the same       */
> '       set #14:=0       ',  /* set to 0          */
> ' else  set #14:=O/60    ',  /* use latest record */
> ' endif                  ',
> ...
> 'print #14 picture   zzzzzz9.999 nw',
>
> The fields o and O have 2173716037 and 2173720651, so the line would
> read "elseif (2173720651-2173716037)>0 then set
> #14:=(2173720651-2173716037)/60". Other parts in the pipeline will
> output the correct values.
>
> Any ideas why we get the PIPSPV058E message? It looks like a decimal
> number to me. I have seen this happening in another field also, on
> number 3001515316.
>
> Regards, Berry.
>
>
>
> -----Original Message-----
> From: CMSTSO Pipelines Discussion List
> [mailto:[email protected]] On Behalf Of John P. Hartmann
> Sent: woensdag 2 februari 2011 11:11
> To: [email protected]
> Subject: Re: [CMS-PIPELINES] Processing large numbers in SPECS
>
> In plastic pipes you can specify a C2Uconversion as well as a conversion
> function:
>
> specs   1.8 c2u 1
> specs   a: 1.12 .  set #0+=c2u(a)
>
> 2011/2/2 van Sleeuwen, Berry <[email protected]>
>
> > Hello listers,
> >
> > We have a pipeline to process monitor records. Most fields contain 4
> > byte unsigned integer counters. Some (such as the CPU counters) are
> > even
> > 8 byte. The records are processed with SPECS to select fields and
> > convert them into decimal where applicable. To be able to process 8
> > bytes we use the runtime distribution and use C2D(8) to convert the
> > counters into a decimal, 4 bytes are processed with plain C2D.
> >
> > We have a few counters that get quite big over time. To avoid a
> > negative number I just added '00' in front of it to avoid the effect
> > that a number larger than '7FFF FFFF' would become a negative in C2D.
> > But once again a counter has grown past '7FFF FFFF'. So yet another
> > counter that should get an additional '00'.
> >
> > Is there be a way to process unsigned counters directly instead of
> > putting a '00' in front of it to avoid getting a negative number?
> >
> > Met vriendelijke groet/With kind regards, Berry van Sleeuwen Flight
> > Forum 3000 5657 EW Eindhoven
> >
> >
>
>

Reply via email to