CA Service Management

  • 1.  Metric calculation stuck in BSI

    Posted Sep 19, 2018 01:27 AM

    Hello,

     

    We have a Business logic which calculates % downtime of a solution.

    It uses a 2D array and we get a run-time exception :subscript out of range Ubound.

     

    Earlier we used to simply re commit the logic and it would work fine but not it  is getting stuck and does not calculate further than the month of May2018.

     

    Any help regarding this would be appreciated.

     

    Thanks in advance.

     

    Sushank Saini



  • 2.  Re: Metric calculation stuck in BSI

    Broadcom Employee
    Posted Sep 21, 2018 11:59 AM

    Hi Sushank,

     

    from what we could see on the case open for this, it seems to be down to the Business Logic - if you're happy to do so, it would be worth posting it here for others to look at. From the errors we're seeing, it seems a ubound on an array that contains event data is being called at a point where there's nothing in there.

     

    regards

    Iain



  • 3.  Re: Metric calculation stuck in BSI

    Posted Sep 24, 2018 03:02 AM
      |   view attached

    Hello Iain,

     

    Thanks for the response.

    Have attached the Business Logic.

     

     

    Regards,

    Sushank Saini

    Attachment(s)

    zip
    AvailBL.txt.zip   3 KB 1 version


  • 4.  Re: Metric calculation stuck in BSI
    Best Answer

    Broadcom Employee
    Posted Sep 24, 2018 11:09 AM

    Hi,

     

    Looking at this code, this is the only subroutine that's performing a ReDim of arrunplannedDowntime to anything other than (4,1)

     

    Sub CalculatePlannedDowntime(eventDetails)
    'If LogEvents Then Out.Log "I:Planned downtime event="& eventDetails.Dump

    PlannedDowntime = PlannedDowntime + Tools.NetTime(eventDetails.Value("StartDate"),eventDetails.value("EndDate"))/60
    rowp = Ubound(arrunplannedDowntime,2)
    colp = Ubound(arrunplannedDowntime,2)
    arrplannedDowntime(1,colp)= eventDetails.Value("ServiceName")
    arrplannedDowntime(2,colp)= ConvertToDate(eventDetails.Value("StartDate"))
    arrplannedDowntime(3,colp)= ConvertToDate(eventDetails.Value("EndDate"))
    arrplannedDowntime(0,colp)= eventDetails.Value("TicketNo")
    ReDim preserve arrplannedDowntime(4,colp+1)
    End Sub

     

    Since this is also the area of the code that's failing, some additional output to out.log may be useful here; I'd recommend uncommenting that second line.



  • 5.  Re: Metric calculation stuck in BSI

    Posted Sep 25, 2018 03:10 AM

    Thanks Iain.

     

    Did as suggested.