Re: HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC (was: Re: Dynamically ...)



I know that FLOAT-xxx are implementor defined but I wonder
what these functions should return for FLOAT-xxx fields and how
to programatically achieve this.

"Rick Smith" <ricksmith@xxxxxxx> schrieb im Newsbeitrag
news:130gjnv8uc1uadb@xxxxxxxxxxxxxxxxxxxxx

"Roger While" <simrw@xxxxxxxxxxxx> wrote in message
news:eu91il$jmf$00$1@xxxxxxxxxxxxxxxxxxxx
Top post - Bill does it as well, so do not shout.
Has the advantage that :
a) Does not rely on compiler implemtation of 31 digits
Compilers can implement more/less digits. (OC goes to 36)
b) Does not reley on TRUNC rules.

The problem that I see is what (logically) is one trying
to achieve in moving a maximum/minimum from one format to antother.
(Very strange these 2002/2008 functions)

Page 827, FDIS 1989:2002, F.2 Substantive changes
not affecting existing programs,

"64) HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC
functions. The HIGHEST-ALGEBRAIC and
LOWEST-ALGEBRAIC functions provide the ability to
manipulate numeric data items in a manner similar to
the means that HIGH-VALUES and LOW-VALUES
permit with alphanumeric data items, but without the risks
of the data incompatibilities associated with those figurative
constants."

Perhaps, they are useful for something like, ...

READ Customer-File NEXT
AT END
MOVE HIGHEST-ALGEBRAIC (Customer-ID)
TO Customer-ID
END-READ

Where "Customer-ID" is numeric and valid values
do not include the highest or lowest algebraic values
for the PICTURE clause.

Or, ...

COMPUTE Balance-Due = HIGHEST-ALGEBRAIC (Balance-Due)
START Customer-File KEY IS LESS THAN Balance-Due
END-START
READ Customer-File PREVIOUS
AT END
MOVE LOWEST-ALGEBRAIC (Balance-Due)
TO Balance-Due
END-READ





.