HP3000-L Archives

February 1999, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Peter Chong Sr. Systems Analyst (MRP/ERP)" <[log in to unmask]>
Reply To:
Peter Chong Sr. Systems Analyst (MRP/ERP)
Date:
Thu, 4 Feb 1999 15:31:53 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
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]
>
>

ATOM RSS1 RSS2