Sort Merge Supports D2 D4 Data Type [ COMMUNICATOR 3000 XL, XL Release 1.1 (Core Software Release A.10.00) ] MPE/iX Communicators
COMMUNICATOR 3000 XL, XL Release 1.1 (Core Software Release A.10.00)
Sort/Merge Supports D2/D4 Data Type
by Jamie Lin, Information Software Division
Sort-Merge 3000 G.02.03 now can handle sorting and merging of short
floating point decimal (SFPD) and floating point packed decimal (FPD)
from Business Basic (HP32115A). SFPD references D2 data type and FPD
references D4 data type. This feature can be evoked both by running
SORT.PUB.SYS/MERGE.PUB.SYS and by calling SORTINIT/MERGEINIT intrinsic.
For running SORT/MERGE stand-alone, two more key types are accepted for
input data, FPDEC and SFPDEC. FPDEC has a fixed length of 8 bytes and
SFPDEC has a fixed length of 4 bytes. The length of the data does not
need to be specified in the SORT/MERGE commands. You can enter "FPD" or
"FPDEC" as part of the command. For example; the command >k 23,FPD is
equivalent to the command >k 23,8,FPDEC; and the command >k 1,SFPD is
equivalent to the command >k 1,4,SFPDEC.
Calling the SORTINIT/MERGEINIT intrinsics for D2/D4 data files, the data
type number for SFPD is 11 and FPD is 12. SORTINIT and MERGEINIT will
verify the length specified is correct. If the length is not "4" for
SFPD or "8" for FPD, the intrinsic will abort with the error "ILLEGAL
LENGTH FOR (SHORT) FP DECIMAL KEY" .
File handling has not been changed, nor has the calling sequence of the
parameters within SORT/MERGE.
The format of SFPD numbers is the following :
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
---------------------------------
| |s| | |
word 0 | 2-comp. exp |g| D1 | D2 |
| |n| | |
|-------------------------------|
| | | | |
word 1 | D3 | D4 | D5 | D6 |
| | | | |
---------------------------------
* The 2's complement exponent is limited to the range of -63..63
* The number is assumed to be normalized, which implies that D1 is
never zero
* If the value of word 0 is zero, then the value of the entire
representation is considered to be zero
The format of FPD numbers is the following :
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
---------------------------------
| | | |
word 0 | 2-comp. exponent | | D1 |
| | | |
|-------------------------------|
| | | | |
word 1 | D2 | D3 | D4 | D5 |
| | | | |
|-------------------------------|
| | | | |
word 2 | D6 | D7 | D8 | D9 |
| | | | |
|-------------------------------|
| | | | |
word 3 | D10 | D11 | D12 | sign |
| | | | |
---------------------------------
* The 2's complement exponent is limited to the range of -511..511
* The number is assumed to be normalized, which implies that D1 is
never zero
* The representation of 0 is a special case, with word 0 being all
zeros
MPE/iX Communicators