HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC (was: Re: Dynamically ...)
- From: "Rick Smith" <ricksmith@xxxxxxx>
- Date: Mon, 26 Mar 2007 18:51:23 -0500
"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
.
- Follow-Ups:
- Re: HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC (was: Re: Dynamically ...)
- From: Roger While
- Re: HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC (was: Re: Dynamically ...)
- References:
- Dynamically Determine Numeric PICTURE String
- From: Rick Smith
- Re: Dynamically Determine Numeric PICTURE String
- From: William M. Klein
- Re: Dynamically Determine Numeric PICTURE String
- From: Rick Smith
- Re: Dynamically Determine Numeric PICTURE String
- From: Roger While
- Dynamically Determine Numeric PICTURE String
- Prev by Date: Re: Dynamically Determine Numeric PICTURE String
- Next by Date: Re: data type conversion- help needed
- Previous by thread: Re: Dynamically Determine Numeric PICTURE String
- Next by thread: Re: HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC (was: Re: Dynamically ...)
- Index(es):