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: 1353
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: 1353
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
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 Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top