|
A packed field can -only- have an odd-number of digits! Because you have 1/2 byte for the sign, either count the bytes by odd numbers (1-3-5-7) until you've counted up to the number of bytes, or calculate-- ((#ofBytes * 2) - 1). Even if you describe the field with even numbers, you still get an extra half-byte once the data's stored on disk.
As far as sorting... it doesn't matter if you have a character, packed, or binary field-- sorting on the field still comes out in the right sequence.
--Paul E Musselman
PaulMmn@xxxxxxxxxxxxxxxxxxxx
At 11:49 AM -0600 12/24/08, Troy Foster wrote:
or 6,2
On 12/24/2008 11:46 AM, Booth Martin wrote:
I went back and looked at my source. sheeeshhh... I had already done
this back in 2003. But I had never made it work because I couldn't
figure out how to substring a packed field.
The program described file has columns 28-31 as packed, 2 decimals.
That is 7/2, right?
What is the SST? SST(field 28 4) doesn't seem right and I am not
even sure how to test it.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.0/1863 - Release Date: 12/24/2008 11:49 AM
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.