IBM Support

IC69841: AMQSMON SAMPLE PROGRAM SUPPLIED IN WMQ V6/V7 DOES NOT COMPUTE THE STARTTIME/ENDTIME INTERVAL BOUNDARIES CORRECTLY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using the StartTime (-s) and EndTime (-e) parameters of
    the amqsmon sample program supplied with WebSphere MQ v6 and
    v7 to display information for the last day of a month which
    contains 31 days or for the first day of the following month,
    the generated output contains data beyond the specified
    interval.
    Example 1:
    amqsmon.exe -m <qmgr> -t statistics -s "2010-05-30 23.00.00"
    -e 2010-05-31
    The output generated contains data from 01 JUN even though
    the time period is set from 30 MAY to 31 MAY"
    IntervalStartDate: '2010-06-01'
    IntervalStartTime: '00.35.22'
    IntervalEndDate:   '2010-06-01'
    IntervalEndTime:   '01.35.22'
    Example 2:
    amqsmon.exe -m <qmgr> -t statistics -s "2010-06-01 00.00.00"
    -e 2010-06-01
    
    The output generated contains data from 31 MAY even though
    the time period is set for 01 JUN only:
    IntervalStartDate: '2010-05-31'
    IntervalStartTime: '00.00.09'
    IntervalEndDate:   '2010-05-31'
    IntervalEndTime:   '01.00.09'
    
    Note that the time supplied in the -s and -e parameters is
    in GMT and it is converted into local time. There is the
    possibility that you will see records from the wrong 'day'
    because the supplied GMT time was converted.
    

Local fix

  • Modify the amqsmon0 sample program:
    1. find the occurances of ".tm_year-=1900;" (4 of them)
         two show "startTm.tm_year-=1900;"
         and
         two show "endTime.tm_year-=1900;"
    .
    2. add the following line after each of the 4 occurances
       of "*.tm_year-=1900;": "<variablename>.tm_mon-=1;"
    .
    3. recompile
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    All users of the amqsmon sample application.
    
    Platforms affected:
    All Distributed (iSeries, all Unix and Windows)
    ****************************************************************
    PROBLEM SUMMARY:
    amqsmon converts the user supplied data parameters into
    timestamps using the mktime C runtime function. That function
    requires the month to be ranged 0-11, whereas the user supplied
    month range is 1-12. This means the output from mktime is
    wrong, resulting in incorrect ranges being used.
    

Problem conclusion

  • The amqsmon sample has been modified to subtract one from the
    month before calling mktime.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
                       v7.0
    Platform           Fix Pack 7.0.1.4
    --------           --------------------
    Windows            U200323
    AIX                U835793
    HP-UX (PA-RISC)    U836458
    HP-UX (Itanium)    U836463
    Solaris (SPARC)    U836459
    Solaris (x86-64)   U836465
    iSeries            tbc_p700_0_1_4
    Linux (x86)        U836460
    Linux (x86-64)     U836464
    Linux (zSeries)    U836461
    Linux (Power)      U836462
    
                       v6.0
    Platform           Fix Pack 6.0.2.11
    --------           --------------------
    Windows            tbc_p600_0_2_11
    AIX                tbc_p600_0_2_11
    HP-UX (PA-RISC)    tbc_p600_0_2_11
    HP-UX (Itanium)    tbc_p600_0_2_11
    Solaris (SPARC)    tbc_p600_0_2_11
    Solaris (x86-64)   tbc_p600_0_2_11
    iSeries            tbc_p600_0_2_11
    Linux (x86)        tbc_p600_0_2_11
    Linux (x86-64)     tbc_p600_0_2_11
    Linux (zSeries)    tbc_p600_0_2_11
    Linux (Power)      tbc_p600_0_2_11
    Linux (s390x)      tbc_p600_0_2_11
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available, information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC69841

  • Reported component name

    WMQ WINDOWS V7

  • Reported component ID

    5724H7220

  • Reported release

    701

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-07-12

  • Closed date

    2010-07-29

  • Last modified date

    2010-07-29

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WMQ WINDOWS V7

  • Fixed component ID

    5724H7220

Applicable component levels

  • R701 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSDEZSF","label":"IBM WebSphere MQ Managed File Transfer for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
31 March 2023