Hi Don,

For the 2nd question you had, this is what I came up with when I ran into the same problem (converting the 8a message timestamp):

/copy qsysinc/qrpglesrc,qusec

p CvtTimStmp      b
d                 pi              z

d CvtDatTim       pr                  extpgm('QWCCVTDT')
d  InpFmt                       10a   const
d  InpValue                     20a   const options(*varsize)
d  OutFmt                       10a   const
d  OutValue                     20a   options(*varsize)
d  ErrCde                             likeds(QUSEC)
d  InpTZ                        10a   const options(*nopass)
d  OutTZ                        10a   const options(*nopass)
d  TZInfo                        1a   const options(*nopass)
d  LenTZInfo                    10i 0 const options(*nopass)
d  PrecInd                       1a   const options(*nopass)
d  InpTimInd                     1a   const options(*nopass)

 *  DOSGetDateTime Value Structure
d DOSds           ds                  qualified
d  hours                         3u 0
d  minutes                       3u 0
d  seconds                       3u 0
d  hSeconds                      3u 0
d  day                           3u 0
d  month                         3u 0
d  year                          5u 0
d  TimZonOffset                  5i 0
d  dayOfWeek                     3u 0

d TSds            ds                  qualified
d  year                          4s 0
d                                1a   inz('-')
d  month                         2s 0
d                                1a   inz('-')
d  day                           2s 0
d                                1a   inz('-')
d  hours                         2s 0
d                                1a   inz('.')
d  minutes                       2s 0
d                                1a   inz('.')
d  seconds                       2s 0
d                                1a   inz('.')
d  hSeconds                      2s 0
d                                4a   inz('0000')

   CvtDatTim('*DTS' : EventDataDS.MsgTimestamp : '*DOS' :DOSds : QUSEC);
   eval-corr TSds = DOSds;
   return %timestamp(TSds);

p                 e

--
*Peter Dow* /
909 793-9050
petercdow@xxxxxxxxx
/

On 9/23/2025 5:43 PM, Don Brown via MIDRANGE-L wrote:
I am testing a watch program to process messages from the QSYSMSG message queue.

In the program I have at the very beginning to enable verbose debugging while I do testing

chgjob log(4 0 *seclvl) logclpgm(*yes)

But I can find any active or ended job or spool file with the joblog details. I know the program is being called as I receive an email that is generated from the watch program.

My second question is in the event data provided to the watch program there is Message timestamp, type char(8) that I want to convert to a value that can be used in a message but what I have tried has failed and searching has not been successful in finding the format this value is in.

378
17A
CHAR(8)
Message timestamp

Any suggestions or links appreciated.

Thanks
Don


Brisbane - Sydney - Melbourne

Don Brown

Senior Consultant



P: 1300 088 400




DISCLAIMER. Before opening any attachments, check them for viruses and defects. This email and its attachments may contain confidential information. If you are not the intended recipient, please do not read, distribute or copy this email or its attachments but notify sender and delete it. Any views expressed in this email are those of the individual sender

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 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.