Hi Mohammed,
I note that you are separately picking up the date and time fields.
You could alternatively pick up the combination as a timestamp.
For example
def type=SMF E_Stamp(smftimestamp 17) as smf_section(36,88,8)
The standard event timestamp would analogously be
def type=SMF Stamp(smftimestamp 17) as smf_field(6,8)
The built-in DATETIME field, on the other hand, is a DATETIME. (That is, the first four bytes contain the date, and the second four bytes the time.)
Note that this can be relevant for sorting (you want to first sort on date, and then on time.)
It is possible to convert between those formats using DEFINE.... CONVERT. See https://www.ibm.com/docs/en/szs/3.1.0?topic=define-field-value-manipulation
And here is a bit of CARLa I played around with FWIW:
n type=system; sortlist timezone
n type=smf pl=0 outlim=1
def type=SMF Stamp(smftimestamp 17) as smf_field(6,8)
def type=SMF S_Stamp(smftimestamp 17) as smf_section(36,80,8)
def type=SMF E_Stamp(smftimestamp 17) as smf_section(36,88,8)
s type=119(21)
sortlist TERMINAL SRCIP E_Stamp E_Stamp(smftimestampzone 25),
S_Stamp S_Stamp(smftimestampzone 25) /, ' '(24) E_Stamp(hex 16) /,
stamp(hex 16 p 'eventstamp hex') /,
datetime(hex 16 p 'datetime hex/default') datetime /,
datetime(p 'datetime datetimezone' datetimezone 30) /,
datetime(p 'datetime cef_dtz' cef_dtz 30) /,
datetime(p 'datetime xsd_datetime' xsd_datetime 30) /,
record(dump)
Regards,
------------------------------
Jeroen Tiggelman
IBM - Software Development and Level 3 Support Manager IBM Security zSecure Suite
Delft
------------------------------
Original Message:
Sent: Sun November 12, 2023 04:54 PM
From: Mohammed Ibrahem
Subject: smf 119(21) start/end time field timezone problem
Hi All
i am working on report from smf 119(21) to get IP,Host,LU and start date/time end date/time of connection
as per smf 119(21) layout
80(X'50') |
SMF119TN_NTiTime |
4 |
Binary |
Time of session initiation |
84(X'54') |
SMF119TN_NTiDate |
4 |
Packed |
Date of session initiation |
88(X'58') |
SMF119TN_NTtTime |
4 |
Binary |
Time of session termination |
92(X'5C') |
SMF119TN_NTtDate |
4 |
Packed |
Date of session termination |
i used the below code
newlist type=SMF PL=0
def type=SMF S_Time(smftime) as smf_section(36,80,4)
def type=SMF E_Time(smftime) as smf_section(36,88,4)
def type=SMF S_Date(DATE) as smf_section(36,84,4)
def type=SMF E_Date(DATE) as smf_section(36,92,4)
s type=119(21) ,
sortlist TERMINAL SRCIP HOSTNAME(25) S_Date S_Time E_Date E_Time
it works fine but the problem is time come in wrong timezone it shows GMT only and we are GMT+3
any advise about pre defined start/end date and time or how i can fix this
Thanks
------------------------------
Mohammed Ibrahem
------------------------------