Topic
  • 10 replies
  • Latest Post - ‏2018-08-02T06:32:54Z by D4ni3l
D4ni3l
D4ni3l
52 Posts

Pinned topic IWS RC mapping for R3batch method

‏2018-07-13T12:27:08Z | 9.3 agent iws method r3batch rc scheduler tws workload

Hello guys,

 

we are trying to implement this "rc mapping" in our environment  (https://www.ibm.com/support/knowledgecenter/en/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/apps/src_usr/awsaur3rtcmfname.htm)
I created the rcm folder and joblog file on the extended agent, and set a pattern like this:
"*cancell ed*"=0

We have a test job and in sap logs I can see this line:

13.07.2018. 10:00:03 Job cancelled 00 518 A
 

but the job in TWS is still returns code 1.

 

Can you suggest what is missing?

rcmap and other options are not set they are default. Agent version is 9.3.3

 

Thank you in advance.

  • OrbDW - Pete Meechan
    189 Posts
    ACCEPTED ANSWER

    Re: IWS RC mapping for R3batch method

    ‏2018-07-24T08:42:58Z  
    • D4ni3l
    • ‏2018-07-24T08:27:40Z

    Hello,

     

    let me explain it with an example:

    conman sj testagent#d_test.z_test

    (Est)  (Est)
    Workstation      Job Stream       SchedTime  Job                                      State Pr Start  Elapse ReturnCode Dependencies

    TESTAGENT        #D_TEST          2000 07/23 **************************************** ABEND 10 07/23  00:01
                                   (TEST_EXT_AGENT#)Z_TEST                                  ABEND 10 07/23  00:01           0 #J14976

    You can see before the job number the return code is 0, but if I check the job log file. It ends like this:

    ...

    07/24/2018 10:00:12 00                   518Job cancelled                                                                                                                                     

    +++ EEWO1049I The program has reached the end of the joblog of a job:: Z_TEST                        , 10001200
    +++ EEWO1014I The job was aborted:
    ===============================================================
    = Exit Status           : 1
    = System Time (Seconds) : 0     Elapsed Time (hh:mm:ss) : 0:00:30
    = User Time (Seconds)   : 0
    = Tue 07/24/18 10:00:42 CEST
    =============================================================== 

     

    The pattern I use here is "*cancelled*"=0

     

    Thank you.

    Add the RCCONDSUCC<=1 to the job definition in TWS

  • OrbDW - Pete Meechan
    189 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-13T17:05:35Z  

    Have you tried specifying the default values explictly? e.g.

    "*cancelled*" "*" "*" "*"=0

    If that doesn't work, check that you are returning the joblog if using r3batch-joblog.rcm file from SAP

  • D4ni3l
    D4ni3l
    52 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-14T07:59:33Z  

    Have you tried specifying the default values explictly? e.g.

    "*cancelled*" "*" "*" "*"=0

    If that doesn't work, check that you are returning the joblog if using r3batch-joblog.rcm file from SAP

    How could I check if the joblog is returned or not?

     

    Thank you in advance.

  • OrbDW - Pete Meechan
    189 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-14T09:10:53Z  
    • D4ni3l
    • ‏2018-07-14T07:59:33Z

    How could I check if the joblog is returned or not?

     

    Thank you in advance.

    Make sure the setting retrieve_joblog is set on by specifying the option "-flag enable_joblog" as described here

    https://www.ibm.com/support/knowledgecenter/en/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/apps/src_usr/awsaur3task.htm (composer definition)

    In the workload console you can add the options in the Properties of the SAPjob definition

    This option should be enabled by default, but can be disabled so to make sure specifying at the job level ensures that it is enabled

    You will be able to view the SAP joblog output in the workload console Job Log option when the job has completed execution

  • D4ni3l
    D4ni3l
    52 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-15T08:06:28Z  

    Make sure the setting retrieve_joblog is set on by specifying the option "-flag enable_joblog" as described here

    https://www.ibm.com/support/knowledgecenter/en/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/apps/src_usr/awsaur3task.htm (composer definition)

    In the workload console you can add the options in the Properties of the SAPjob definition

    This option should be enabled by default, but can be disabled so to make sure specifying at the job level ensures that it is enabled

    You will be able to view the SAP joblog output in the workload console Job Log option when the job has completed execution

    Thanks for the hint, the retrieve_joblog option was disabled, now it's working and returns 0 return code, but the job still in abend.

    What else should be configured for this job to end in success if 0 return code is returned?

     

    Thanks

  • OrbDW - Pete Meechan
    189 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-16T09:15:35Z  
    • D4ni3l
    • ‏2018-07-15T08:06:28Z

    Thanks for the hint, the retrieve_joblog option was disabled, now it's working and returns 0 return code, but the job still in abend.

    What else should be configured for this job to end in success if 0 return code is returned?

     

    Thanks

    Check in the <workstation>_r3batch.opts file that RCMAP=on has been set to ensure RC mapping is enabled

    Also what is the abend code of the job now?

    Updated on 2018-07-16T09:16:15Z at 2018-07-16T09:16:15Z by OrbDW - Pete Meechan
  • D4ni3l
    D4ni3l
    52 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-24T06:46:29Z  

    Check in the <workstation>_r3batch.opts file that RCMAP=on has been set to ensure RC mapping is enabled

    Also what is the abend code of the job now?

    Hello,

     

    if I list the jobs with conman sj ... in the return code tab it has 0 return code. So the mapping is working, but in the joblog the exit status is still 1, hence this the job is in ABEND state. I'm wondering if there is any setup that can change this from ABEND to SUCC somehow.

     

    Thank you in advance.

  • OrbDW - Pete Meechan
    189 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-24T08:13:26Z  
    • D4ni3l
    • ‏2018-07-24T06:46:29Z

    Hello,

     

    if I list the jobs with conman sj ... in the return code tab it has 0 return code. So the mapping is working, but in the joblog the exit status is still 1, hence this the job is in ABEND state. I'm wondering if there is any setup that can change this from ABEND to SUCC somehow.

     

    Thank you in advance.

    From the documentation https://www.ibm.com/support/knowledgecenter/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/apps/src_usr/awsaur3brtc.htm

    I'm not sure what you mean "by the return code tab" when using conman command?

    The return code mapping mechanism works as follows:

    1. r3batch reads the output retrieved from the R/3 system (R/3 job log, process chain log, spool list, and so on appended to the stdlist of the related IBM Workload Scheduler job).
    2. Following your specifications in the rcm files, the R/3 return messages or codes are mapped into your custom return codes and passed on to IBM Workload Scheduler.
    3. These return codes are used together with the rccondsucc keyword set in the extended agent job definition and handled accordingly. Return code mapping is meaningful only if you use the return codes to write the expressions that determine job completion. Conversely, in the case of this extended agent, the use of rccondsucc is significant only if IBM Workload Scheduler gets return codes (not exit codes) from the access method.

    It sounds to me that you may still be getting an exit code from r3batch. Can you post a copy of the job log output (or the lines around where your mesage is being mapped to a return code) along with a copy of the mapping file?

     

  • D4ni3l
    D4ni3l
    52 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-24T08:27:40Z  

    From the documentation https://www.ibm.com/support/knowledgecenter/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/apps/src_usr/awsaur3brtc.htm

    I'm not sure what you mean "by the return code tab" when using conman command?

    The return code mapping mechanism works as follows:

    1. r3batch reads the output retrieved from the R/3 system (R/3 job log, process chain log, spool list, and so on appended to the stdlist of the related IBM Workload Scheduler job).
    2. Following your specifications in the rcm files, the R/3 return messages or codes are mapped into your custom return codes and passed on to IBM Workload Scheduler.
    3. These return codes are used together with the rccondsucc keyword set in the extended agent job definition and handled accordingly. Return code mapping is meaningful only if you use the return codes to write the expressions that determine job completion. Conversely, in the case of this extended agent, the use of rccondsucc is significant only if IBM Workload Scheduler gets return codes (not exit codes) from the access method.

    It sounds to me that you may still be getting an exit code from r3batch. Can you post a copy of the job log output (or the lines around where your mesage is being mapped to a return code) along with a copy of the mapping file?

     

    Hello,

     

    let me explain it with an example:

    conman sj testagent#d_test.z_test

    (Est)  (Est)
    Workstation      Job Stream       SchedTime  Job                                      State Pr Start  Elapse ReturnCode Dependencies

    TESTAGENT        #D_TEST          2000 07/23 **************************************** ABEND 10 07/23  00:01
                                   (TEST_EXT_AGENT#)Z_TEST                                  ABEND 10 07/23  00:01           0 #J14976

    You can see before the job number the return code is 0, but if I check the job log file. It ends like this:

    ...

    07/24/2018 10:00:12 00                   518Job cancelled                                                                                                                                     

    +++ EEWO1049I The program has reached the end of the joblog of a job:: Z_TEST                        , 10001200
    +++ EEWO1014I The job was aborted:
    ===============================================================
    = Exit Status           : 1
    = System Time (Seconds) : 0     Elapsed Time (hh:mm:ss) : 0:00:30
    = User Time (Seconds)   : 0
    = Tue 07/24/18 10:00:42 CEST
    =============================================================== 

     

    The pattern I use here is "*cancelled*"=0

     

    Thank you.

  • OrbDW - Pete Meechan
    189 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-07-24T08:42:58Z  
    • D4ni3l
    • ‏2018-07-24T08:27:40Z

    Hello,

     

    let me explain it with an example:

    conman sj testagent#d_test.z_test

    (Est)  (Est)
    Workstation      Job Stream       SchedTime  Job                                      State Pr Start  Elapse ReturnCode Dependencies

    TESTAGENT        #D_TEST          2000 07/23 **************************************** ABEND 10 07/23  00:01
                                   (TEST_EXT_AGENT#)Z_TEST                                  ABEND 10 07/23  00:01           0 #J14976

    You can see before the job number the return code is 0, but if I check the job log file. It ends like this:

    ...

    07/24/2018 10:00:12 00                   518Job cancelled                                                                                                                                     

    +++ EEWO1049I The program has reached the end of the joblog of a job:: Z_TEST                        , 10001200
    +++ EEWO1014I The job was aborted:
    ===============================================================
    = Exit Status           : 1
    = System Time (Seconds) : 0     Elapsed Time (hh:mm:ss) : 0:00:30
    = User Time (Seconds)   : 0
    = Tue 07/24/18 10:00:42 CEST
    =============================================================== 

     

    The pattern I use here is "*cancelled*"=0

     

    Thank you.

    Add the RCCONDSUCC<=1 to the job definition in TWS

  • D4ni3l
    D4ni3l
    52 Posts

    Re: IWS RC mapping for R3batch method

    ‏2018-08-02T06:32:54Z  

    Add the RCCONDSUCC<=1 to the job definition in TWS

    A hint for everybody, if someone trying to implement this.

    In all cases when you set the return code mapping it will change the return codes as it should, but for the job to get in succ, you need to add to job definition the RCCONDSUCC parameter (even if you set it to 0).

     

    Thanks for all help.