Subject: | |
From: | |
Reply To: | Peter Chong Sr. Systems Analyst (MRP/ERP) |
Date: | Fri, 5 Feb 1999 10:00:14 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Sorry
Addition
If ALMANAC-LONG < 0
compute ALMANAC-LONG + 65536.
most case greater than 32768 so Change to Negative
so add 2 power 16 (65536).
Peter Chong Sr. Systems Analyst (MRP/ERP) wrote in message
<[log in to unmask]>...
>Boy, It awful familiar with assembler(?) shift left & right.
>move unsign integer 9(4) comp sign to long integer field
>9(9) comp and divide 2 power 9 (512) to get 0:7 year
>move year of century 9(4) comp and use this and turn
>around this century times 2 power 9 (512) = Century year mask
>and Original number long Integer - Century year mask to get
>Day of year.
>
>01 ALMANAC PIC S9(4) COMP.
>01 ALMANAC-LONG PIC S9(9) COMP.
>01 AL-YEAR PIC S9(9) COMP.
>01 AL-CENTURY-MASK PIC S9(9) COMP.
>01 AL-CENTURY-DAY-OF-YR PIC S9(9) COMP.
>~~
>~~
>MOVE ALMANAC TO ALMANAC-LONG.
>COMPUTE AL-YEAR = ALMANAC-LONG / 512.
>COMPUTE AL-CENTURY-MASK = AL-YEAR * 512.
>COMPUTE AL-CENTURY-DAY-OF-YR = AL-ALMANAC-LONG -
>
>AL-CENTURY-MASK.
>
>memory fade away fast.....
>Ben wrote in message <[log in to unmask]>...
>>In the ALMANAC intrinsic, I am supposed to supply a date as a 16 bit
>>unsigned integer by value. The date format, per HP's help files, is 7:9
>>Day of Year, and 0:7 Year of Century. It looks like year of century
>>means the 2 digit year without the century.
>>
>>Perhaps I am missing the point, but how am I supposed to fit 5 bytes
>>into a 16 bit field for COBOLII?
>>
>>Any help on how I should use this intrinsic, or just some help on
>>defining and using the date part, would be greatly appreciated. For
>>some reason the HP help files have no examples, just syntax for the
>>actual statement.
>>
>>Thanks.
>>[log in to unmask]
>>
>>
>
>
>
|
|
|