View previous topic :: View next topic
|
Author |
Message |
prasad_yadav20
New User
Joined: 12 Mar 2005 Posts: 13 Location: hyderabad
|
|
|
|
my query is
we have 6 digits and 6 bytes date field, but I want to accomodate it into 3 bytes with 6 digits.
don't say use comp-3, because that contains sign....
by
prasad yadav |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi Prasad,
To allocate 6 digit into 3 byte comp-3 is best oprtion in numeric field
Regards
Rupesh |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
You need 4 bytes to accomodate a 6 digit date in COMP-3 format. All that aside, the Y2K frenzey should point us toward 8 digit dates. |
|
Back to top |
|
|
Carl-B
New User
Joined: 17 Sep 2005 Posts: 1
|
|
|
|
Setup an 88 section similar to:
*01 WS-1BYTE PIC X.
* 88 x00 VALUES X"00".
* etc
* etc
* 88 x22 VALUES X"22".
* etc
* etc
Then use a perform loop. Drop 1 character into WS-1BYTE
Use an EVALUATE WS-1BYTE
and list the WHEN's.
You will have to setup an 88 for each possible value (00 thru 99). But eventually you will have the logic to map the hex-decimal to decimal.
Use your imagination. You will see the answer.
Carl. |
|
Back to top |
|
|
|