Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Calling REXX code from ISPF panel

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Calling REXX code from ISPF panel
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: 1224
Location: Israel

PostPosted: Mon Jan 02, 2017 5:47 pm    Post subject:
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    Post subject: Reply to: Calling REXX code from ISPF panel
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: 1224
Location: Israel

PostPosted: Mon Jan 02, 2017 7:24 pm    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 989
Location: Oostende, Belgium

PostPosted: Mon Jan 02, 2017 10:17 pm    Post subject: Re: Calling REXX code from ISPF panel
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.    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us