Posted: Mon Nov 16, 2020 10:36 am Post subject: MQ Error logs DATE format difference AIX vs Linux
Partisan
Joined: 19 Aug 2002 Posts: 305 Location: Green Mountains of Vermont
I was writing a script the other day which would interrogate for certain MQ Errors in the AMQERR0x.LOG files. I originally wrote it on AIX (bash) and ported it over to Linux (bash). I was getting odd results when calculating dates based on the log entry date written to the log files. On AIX it is a 2 yr date year (mm/dd/yy)- the century and on Linux it is a 4 yr date year (mm/dd/yyyy).
Is there a way to set the MQ log date format? I find it odd that there is a difference in the way the log entry date(year) if different on the two different OS environments.
I could not find anything on this here or in Google
The date at the start of an entry is usually formatted based on locale settings - for example LC_TIME. Which may vary by environment, user and platform.
But the error log entries also include a standardised time format in the header. See example below.
And if you have the error logs in json, the timestamp is also in a standard format.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum