Automic Workload Automation

Expand all | Collapse all

U00020428 Runtime error in object 'TEST1.JOBI', line '00004'. Row '         0' does not exist.

  • 1.  U00020428 Runtime error in object 'TEST1.JOBI', line '00004'. Row '         0' does not exist.

    Posted Jul 05, 2018 09:09 AM

    Today I saw this error message for the first time:

    U00020428 Runtime error in object 'TEST1.JOBI', line '00004'. Row '         0' does not exist.

    The script line that is causing the error is the second one here:

    :SET &RepHnd# = PREP_PROCESS_REPORT(,&RunID#, "&PPR_ReportType#", "&PPR_Filter#", "&PPR_Def1#", "&PPR_Def2#")

    :SET &NumColumns# = GET_PROCESS_INFO(&RepHnd#,COLUMNS)

    The data sequence is empty because the report has no rows. If the report does have rows, the error does not occur. Is there a way around this?



  • 2.  Re: U00020428 Runtime error in object 'TEST1.JOBI', line '00004'. Row '         0' does not exist.

    Posted Jul 05, 2018 09:27 AM

    Hi Michael

     

    thats very interesting!

    I tried to reproduce the error message, noch chance..

     

    a stupid WIN job with "DIR"

    and a SCRI object

     

    :SET &RUN# = 306085638

    :SET &HND# = PREP_PROCESS_REPORT(,&RUN#,"SAPL")
    :SET &ROWS# = GET_PROCESS_INFO(&HND#,ROWS)
    :SET &COLS# = GET_PROCESS_INFO(&HND#,COLUMNS)
    :CLOSE_PROCESS &HND#

    :PRINT "R:&ROWS#   C:&COLS#"

     

    results in

    2018-07-05 15:21:49 - U00020408 R:0000000000000000   C:0000000000000001

     

    i tried report types SAPL, ACT, POCO,OREP to be sure there is no Report type to process....

     

    V11.2.3+HF2

    cheers, Wolfgang



  • 3.  Re: U00020428 Runtime error in object 'TEST1.JOBI', line '00004'. Row '         0' does not exist.
    Best Answer

    Posted Jul 05, 2018 09:33 AM

    I figured it out.

     

    I solved the problem by checking the number of rows first, and then checking the number of columns second only if there is at least one row.

     

    :SET &RowCounter# = 0
    :SET &RowsWithData# = 0
    :SET &RepHnd# = PREP_PROCESS_REPORT(,&RunID#, "&PPR_ReportType#", "&PPR_Filter#", "&PPR_Def1#", "&PPR_Def2#")
    :SET &NumRows# = GET_PROCESS_INFO(&RepHnd#,ROWS)
    :SET &NumRows# = FORMAT(&NumRows#)
    :IF &NumRows# <> 0
    :  SET &NumColumns# = GET_PROCESS_INFO(&RepHnd#,COLUMNS)
    :  SET &NumColumns# = FORMAT(&NumColumns#)
    :  PRINT "Job report data sequence contains &NumColumns# columns & &NumRows# rows."
    :  PROCESS &RepHnd#
    :    SET &RowCounter# = &RowCounter# + 1
    :    SET &RowCounter# = FORMAT(&RowCounter#)

    ... Do stuff with the data ...

    :  ENDPROCESS
    :  CLOSE_PROCESS &RepHnd#
    :ELSE
    :  PRINT "Job report data sequence contains 0 rows. (It is empty.)"
    :ENDIF
    :SET &RowCounter# = FORMAT(&RowCounter#)
    :PRINT "Done parsing output. &RowCounter# rows processed."

     

    This gracefully handles the situation wherein the data sequence being accessed (in this case, a job report) is empty.