× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, Nov 24, 2014 at 11:23 AM, Brian <belstsrv@xxxxxxxxx> wrote:
I am receiving from an ERP system a hex value for a Julian date. This is a
real Julian date, not a JDE type of date. Ultimately I need to convert this
to YYYYMMDD format.

What do you mean by "real Julian date"? The term "Julian date" is
used for at least a couple of different things. It's particularly
confusing in the IBM midrange community (though some folks *in* the
IBM midrange community don't know this :P ).

The hex is just simple text like this: 257D96
This hex should convert to a decimal value of: 2456982

OK, that part is straightforward enough to understand, and is unambiguous.

I was able to use 'cvtch' to get my text representation of the hex number
converted in to real hex. But, I've tried the overlay method of getting the
decimal equivalent of the hex number and that has not worked.

What do you mean by "overlay method"? In principle, you should be
able to just plop a hex value into a data structure and read it out as
any RPG type you like. In this case, I imagine you would want a
4-byte binary integer (pad the input with zeros on the left).

Once you can get an integer, can you do the necessary conversion to a
usable date form, or do you need help with that as well?

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.