Automic Workload Automation

How to extract the Spool request number from the results of R3_GET_SPOOLREQUESTS ?

  • 1.  How to extract the Spool request number from the results of R3_GET_SPOOLREQUESTS ?

    Posted 12-27-2017 03:29 PM
    You can use the function PREP_PROCESS_REPORT to extract the spool request from the Post-Processing tab. For example below:

    In the Process tab:
    R3_GET_SPOOLREQUESTS SPOOLNR_FROM='23211',SPOOLNR_TO='23223'

    In the Post-Processing tab:
    :DEFINE &array#, string, 30
    :SET &HND# = PREP_PROCESS_REPORT("JOBS",, "PLOG","*U02004948*",,)
    :PROCESS &HND#
    :   SET &RET# = GET_PROCESS_LINE(&HND#)
    ! :   PRINT &RET#
    :   FILL &array#[] = STR_SPLIT(&RET#,";")
    :   PRINT "Spool Number = &array#[2]"

    :ENDPROCESS


    ### Results ###

    In the Agent log:
    2017-12-27 15:19:21 - U02000005 Job 'R3_GET_SPOOLREQUESTS' with RunID '1194077' started.
    2017-12-27 15:19:21 - U02004018 The job was successfully interpreted.
    2017-12-27 15:19:21             R3_GET_SPOOLREQUESTS SPOOLNR_FROM='23211',SPOOLNR_TO='23223'
    2017-12-27 15:19:21 - U02004948 ;23223;20171227;132932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23222;20171227;122932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23221;20171227;112933;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23220;20171227;102932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23219;20171227;092932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23218;20171227;082933;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23217;20171227;072932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23216;20171227;062932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23215;20171227;052932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23214;20171227;042932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23213;20171227;032932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23212;20171227;022932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004948 ;23211;20171227;012932;;LP01;LIST1S;LP01;SRT_SEQ_DELE;ORSYP
    2017-12-27 15:19:21 - U02004026 Job script ended normally.



    In the post processing tab:
    2017-12-27 20:19:21 - U00020408 Spool Number = 23223
    2017-12-27 20:19:21 - U00020408 Spool Number = 23222
    2017-12-27 20:19:21 - U00020408 Spool Number = 23221
    2017-12-27 20:19:21 - U00020408 Spool Number = 23220
    2017-12-27 20:19:21 - U00020408 Spool Number = 23219
    2017-12-27 20:19:21 - U00020408 Spool Number = 23218
    2017-12-27 20:19:21 - U00020408 Spool Number = 23217
    2017-12-27 20:19:21 - U00020408 Spool Number = 23216
    2017-12-27 20:19:21 - U00020408 Spool Number = 23215
    2017-12-27 20:19:21 - U00020408 Spool Number = 23214
    2017-12-27 20:19:21 - U00020408 Spool Number = 23213
    2017-12-27 20:19:21 - U00020408 Spool Number = 23212
    2017-12-27 20:19:21 - U00020408 Spool Number = 23211