Victor Gil wrote:
>Does anyone have a sample code which decrypts Time-of-Day [obtained via STCK]
>into displayable format?
>I have several samples [inluding my own from around 2000] which extract the
>TIME portion, but now I need the DATE as well.
A$$uming you want the current day [TOD] of execution?
If so here is a good sample (part of my code to test out the SysPlex timer, UTC
and Local Time) you can try it out - No STCKCONV as requested.
>The reason I don't want to code STCKCONV is this is going to be used in a
>high-volume transaction process under CICS, so I'd like to minimize the
>overhead.
How much overhead is it? Just curious, if you don't mind please.
(Note, code portions of TIME were left out for this snippet, but take note this
code part produces Local Time.)
TIME DEC,CONVVAL,DATETYPE=YYYYMMDD,ZONE=LT,LINKAGE=SYSTEM
MVC DATET(4),CONDATE YYYYMMDD FORMAT
MVI DATET+4,X'0F' SET SIGN
SRP DATET,63,0 DIVIDE BY 10
OI DATET+4,X'0F' ENSURE SIGN IS AN 'F'
UNPK DWORD,DATET ZONED DATE
MVZ DWORD+7(1),DWORD CLEAR SIGN
MVC OUTDATEY(24),DTAFILL
MVC OUTDATEY,DWORD MOVE YEAR
MVC OUTDATEM,DWORD+4 MOVE MONTH
MVC OUTDATED,DWORD+6 MOVE DAY
*more code (but snipped for this post) for time and a little WTO macro...
CONVVAL DS 0F
CONTIME DC 2F'0'
CONDATE DS F
DC F'0'
DATET DC PL5'0'
DTAFILL DC C' / /dd hh:mm:ss.mm '
DWORD DS D
OUTDATEY DS CL4
DS CL1
OUTDATEM DS CL2
DS CL1
OUTDATED DS CL2
DS CL1
Of course, others can give a more shortened, better and faster code! ;-)
17.38.34 J0566104 ---- MONDAY, 16 NOV 2015 ----
17.38.34 J0566104 IEF403I ???????T - STARTED - TIME=17.38.34
17.38.34 J0566104 +Local Time: 2015/11/16 17:38:34.16
I'm just a novice Assembler programmer...
HTH!
Groete / Greetings
Elardus Engelbrecht