× 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.



Here is a function to convert

d TD_StdErrorModel...
d ds Qualified
d Template
d Size...
d Like(StdInt)
d Inz(%Size(TD_StdErrorModel))
d BytesAvailable...
d Like(StdInt)
d Inz(0)
d MessageId...
d Like(StdMsgId)
d Reserved1...
d Like(StdChr)
d MessageData...
d 1024a

*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
=
*
ConvertFromSystemDateTime

* Convert date from system
format.
* In Parms - Date in System Time
Format.
* In/Out Parms -
None.
* Out Parms -
None.
* Return - Timestamp as Timestamp Data
Type.
*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
=
p
ConvertFromSystemDateTime...

p
b
d pi
Like(StdTms)
d
InDateTime...

d 8a
Value


d
ConvertDateTimeAPI...
d pr
ExtPgm('QWCCVTDT')
d
PR_InputFormat...
d
Like(StdNam)
d
Const
d
PR_InputVariable...
d 8a
Const
d
PR_OutputFormat...
d
Like(StdNam)
d
Const
d
PR_OutVariable...
d
17a
d
PR_ErrorCode...
d
LikeDs(TD_StdErrorModel)


d
OutVariable...
d ds
Qualified
d
Date...
d
8a
d
Time...
d
6a
d
Milliseconds...
d
3a


d
FormatedDate...
d s
10a
d
FormatedTime...
d s
8a
d
FormatedTimeStamp...
d s
26a
d
aTimeStamp...
d s
Like(StdTms)
d
ApiError...
d ds
LikeDs(TD_StdErrorModel)
/Free

ApiError.Size = %Size(ApiError);
ConvertDateTimeAPI('*DTS' :
InDateTime :
'*YYMD' :
OutVariable:
ApiError );
If ApiError.BytesAvailable > 0;
ERRH_Throw(ApiError.MessageId :
cCPFMessageFileName:
ApiError.MessageData);
EndIf;

Monitor;
FormatedDate = %Char(%Date(OutVariable.Date:*ISO0):*ISO-);
On-Error;
Return %TimeStamp('0001-01-01-00.00.00.000000');
EndMon;

Monitor;
FormatedTime = %Char(%Time(OutVariable.Time:*HMS0):*HMS.);
On-Error;
Return %TimeStamp('0001-01-01-00.00.00.000000');
EndMon;

FormatedTimeStamp = FormatedDate + '-' + FormatedTime + '.' +
OutVariable.Milliseconds + '00';

Monitor;
aTimeStamp = %TimeStamp(FormatedTimeStamp);
On-Error;
Return %TimeStamp('0001-01-01-00.00.00.000000');
EndMon;

Return aTimeStamp;

/End-Free
p e



On Mon, Jul 29, 2013 at 12:50 PM, <rob@xxxxxxxxx> wrote:

At offset 8, for 8 characters of format SSTS0200 of the Retrieve System
Status (QWCRSSTS) API, is
"Current date and time. The date and time when the status was gathered.
This is in system timestamp format."
So, how do I figure out the current date and time of this?
EVAL &ssts0200 :x
00000 000000A4 000000A4 985A6343 F997A000 - ...u...uq!Ää9pµ.
00010 C7C4C9E2 E8E24040 F0F0F0F0 F0F1F0.. - GDISYS 0000010.
I assume I should be looking at:
985A6343 F997A000

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.