Skip to main content

Job information in REXX

  • May 5, 2016
  • 1 reply
  • 0 views

Does anyone know of a way to get the Job details for a REXX running under JES?

I am able to call a COBOL program and return the results to the REXX, but if that program in turn calls 'mfjctlbp', I get an abrupt return to the REXX with a return code 32.


#EnterpriseDeveloper

1 reply

  • Author
  • Rocketeer
  • 19312 replies
  • May 19, 2016

Does anyone know of a way to get the Job details for a REXX running under JES?

I am able to call a COBOL program and return the results to the REXX, but if that program in turn calls 'mfjctlbp', I get an abrupt return to the REXX with a return code 32.


#EnterpriseDeveloper

Hi Erik,

I'm not sure where the RC 32 comes from, if there was a problem the construction of the call it should return 16 (-rc-badcall). I can call mfjctlbp from a COBOL program, which itself has been called from a REXX script; here is a little snipit of the code used:

           initialize ctlb-exec-area
           set ctlb-exec-vers-cur to true
           SET ctlb-func-get-exec to true
           call 'MFJCTLBP' using  ctlb-function
                                                 ctlb-retcode
                                                 ctlb-exec-area
            

           display 'Progame Original Name: '
                           ctlb-step-prog-exec
                           upon console
                          
           display 'Alias Progame Called: '
                           ctlb-step-prog-alias
                           upon console
          
           display 'Job Name: '
                           ctlb-job-jobname
                           upon console
          
          
           display 'Job Number: '
                           ctlb-job-jobnum
                           upon console
                          

 

By the way, if you ask for DD information it is important to call back to mfjctlbp when you have finished with it using the function -func-get-dd-end.

Hope this helps.

Andrew


#MFJCTLBP