I'm looking for a way to read the systemtime from the MVS control blocks in order to get a more precise systemtime.
With trial and error I managed this
LINKAGE section.
01 CTLBLK-001.
05 PTR001 pointer occurs 256.
01 CTLBLK-002.
05 PTR002 pointer occurs 256.
PROCEDURE division.
*PSA control block
set address of CTLBLK-001 to NULL
*TCB control block
set address of CTLBLK-001 to PTR001(136)
move CTLBLK-001(873:8) to TODANM
TODANM contains the date/time in microseconds since 1900-01-01 (TOD-format).
This works OK in the batch environment but not in a CICS-environment. Probably because the offset is outside the TCB control block.
Is there anybody out there who has a cobol or assembler solution to get the systemdate.
With trial and error I managed this
LINKAGE section.
01 CTLBLK-001.
05 PTR001 pointer occurs 256.
01 CTLBLK-002.
05 PTR002 pointer occurs 256.
PROCEDURE division.
*PSA control block
set address of CTLBLK-001 to NULL
*TCB control block
set address of CTLBLK-001 to PTR001(136)
move CTLBLK-001(873:8) to TODANM
TODANM contains the date/time in microseconds since 1900-01-01 (TOD-format).
This works OK in the batch environment but not in a CICS-environment. Probably because the offset is outside the TCB control block.
Is there anybody out there who has a cobol or assembler solution to get the systemdate.