At the risk of exciting the ire of other list members, I think you'd better start coding the Assembler solution. You can use some shortcuts, 64-bit arithmentic, etc. that may further help speed the process.

Farley, Peter x23353 wrote:

Hi all,

A question has been asked of me to which I think I know the answer, but
not how (in)efficient it would be:

Is there a z/OS-supplied function to convert GMT to local time (or back
again)?

Now, I don't yet know in what format the "GMT" is arriving for
conversion, but it is very likely NOT in STCK(E) format but rather in
some external character format.

I know I can write a small C routine to convert character format GMT to
time.h format and then use localtime(clock) to perform the conversion
from GMT to local time, or gmtime(clock) to go the other way.

BUT the question is, when called from COBOL will that small C routine
set up and tear down the C environment every time it's called?  If so,
is there a way to make those calls to a C function from COBOL more
efficient?

Or am I barking up the wrong tree because there's another/better/simpler
way to do this conversion?

Obviously I could also write assembler to convert the character format
GMT to STCK(E) format with CONVTOD and then use the CVT fields to
convert that value to local time and then STCKCONV to go back to
character format, but I am hoping there is a simpler HLL-based solution.

TIA for any help/info/RTFM you can provide.  Environment is Enterprise
COBOL 3.4, z/OS 1.8 if it matters.

Peter


This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to