IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Calling REXX code from ISPF panel


IBM Mainframe Forums -> TSO/ISPF
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
sanchita dey

New User


Joined: 02 Jan 2017
Posts: 2
Location: india

PostPosted: Mon Jan 02, 2017 5:13 pm
Reply with quote

I have REXX code which is executing list of jobs provided by the user. The list is given in a PS file. It is displaying a message 'Execution in progress' in panel everytime a job is submitted. The problem is that for every job submission an user interaction is required(eg-press enter). My requirement is whenever a job is getting completed successfully control should automatically go back to the REXX code from the panel and start executing the next job without waiting for any user intervention. Can anyone help in this?
Let me know if any more details are required.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1348
Location: Israel

PostPosted: Mon Jan 02, 2017 5:47 pm
Reply with quote

To suppress the IKJ56250I message:
JOB XYZABCDE(JOB11111) SUBMITTED
you must use OUTTRAP. Here is an example:
Code:
Call OutTrap(wSub.)                             
"SUBMIT '"JobSrce"'"                             
Ret = RC                                         
Call OutTrap('OFF')                             
                                                 
If Ret <> 0 Then Do                             
   Say 'Submit failed with RC='Ret               
   Do Ix = 1 To wSub.0                           
      Say wSub.Ix                               
   End                                           
   Exit Ret                                     
End                                             
Parse Var wSub.1 . 'JOB' JobName '(' JobNum ')' .
JobName = Strip(JobName)                         


To suppress the end-of-job message:
JOB11111 $HASP165 XYZABCDE ENDED AT MYSITE MAXCC=0000
is even easier: don't put a NOTIFY in the JOB card.
Back to top
View user's profile Send private message
sanchita dey

New User


Joined: 02 Jan 2017
Posts: 2
Location: india

PostPosted: Mon Jan 02, 2017 5:59 pm
Reply with quote

Thanks for the reply. But this is not exactly what I was looking for. My REXX code is already distinguishing a successful and failed job. An example might help-
A-REXX module
B-Panel containing message
A is calling B when a job is submitted. The job is executed successfully. But control is not returning to A unless user interaction is happening. If I press enter then the next job is getting submitted. But I don't want any user interaction for submitting the next job. The control should hit the ISPF panel and return to REXX code without any manual intervention.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1348
Location: Israel

PostPosted: Mon Jan 02, 2017 7:24 pm
Reply with quote

If you want to display a panel but let the REXX program continue executing, you have to use:
Code:
Address ISPEXEC
"CONTROL DISPLAY LOCK"
"DISPLAY PANEL(WAITPNL)"

  • The panel will show on the screen with a little clock in the OIA (the Operator Information Area).
  • Input is inhibited until another panel is displayed.
  • The panel can be displayed in a pop-up window (with ADDPOP and REMPOP).
  • No user action is required, the program continues just as if it was a "SAY" command.

Controlling how long the panel is displayed may be a bit difficult, but if you append new text each time then it is not a problem:
Display #1:
Code:
'JOB X1 SUBMITTED.'

Display #2:
Code:
'JOB X1 SUBMITTED. FINISHED WITH RC=0'

Display #3:
Code:
'JOB X1 SUBMITTED. FINISHED WITH RC=0'
'JOB X2 SUBMITTED.'

Display #4:
Code:
'JOB X1 SUBMITTED. FINISHED WITH RC=0'
'JOB X2 SUBMITTED. FINISHED WITH RC=4'
and so on...
Back to top
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1238
Location: Vilnius, Lithuania

PostPosted: Mon Jan 02, 2017 10:17 pm
Reply with quote

sanchita dey wrote:
I have REXX code which is executing list of jobs provided by the user. The list is given in a PS file. It is displaying a message 'Execution in progress' in panel everytime a job is submitted. The problem is that for every job submission an user interaction is required(eg-press enter). My requirement is whenever a job is getting completed successfully control should automatically go back to the REXX code from the panel and start executing the next job without waiting for any user intervention. Can anyone help in this?
Let me know if any more details are required.

Another incompetent attempt at a job scheduler. What happens is there are no initiators available? If the TSO session of the user times out?
If the job hangs because of unavailable resources?

Moderators, please lock this thread as job schedulers are in the list of banned subjects!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute step regardless of previous s... JCL & VSAM 2
No new posts Error 0C1 Reason Code 1 with branch i... PL/I & Assembler 3
No new posts Any examples of calling FTP from REXX? CLIST & REXX 1
No new posts SummeRx: a new framework for REXX z/OS CLIST & REXX 6
No new posts A command to change LRECL of an exist... JCL & VSAM 7
Search our Forums:

Back to Top