View previous topic :: View next topic
|
Author |
Message |
Cris_70
New User
Joined: 09 Feb 2021 Posts: 8 Location: Italy
|
|
|
|
Hi all, I'm new here as a poster, even though I've been following these forums as a reader for a long time.
I'm developing a Rexx program that needs to connect to an external (i.e. on a remote server) resource to do some operations.
The operation can be quite lengthy (up to a minute) so I would like to display a popup message to the user while he waits.
My problem is htat ISPF lets me display a popup but blocks the execution until the popup is dismissed by the user.
I have been looking for samples on the net, I have tried various approaches, but have been unsuccessful up to now.
However, I see that some programs (e.g. SRCHFOR) display popups to keep the user informed about their progress, so I think it can be done. Maybe not in rexx though?
Any suggestions?
Thank you in advance
Cris |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2023 Location: USA
|
|
|
|
SRCHFOR is displaying its own messages while it is running itself. You cannot start any other activity before SRCHFOR ends.
You can do the same with your own REXX, but you cannot let the “remote operation” continue in background, and allow your single TSO session to perform something else at the same time. |
|
Back to top |
|
|
Cris_70
New User
Joined: 09 Feb 2021 Posts: 8 Location: Italy
|
|
|
|
Thank you very much sergeyken for your reply.
I would be more than happy to be able to do it while my rexx code is running, as the lengthy operation mostly requires polling for results from the external source, so my code is running most of the time (well, it would be running if it was not suspended waiting for the user to dismiss the popup).
Could you be so nice as to point me in the right direction?
Thank you in advance
Cris |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Look up ISPF service CONTROL DISPLAY LOCK. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
What I do in this situation is have TWO Rexx programs.
The first one is initiated by the user: TSO REXX1. This one may collect information from the user (I use a pop-up panel).
REXX1 will submit a Batch Job to perform the rest of the work (I use Skeleton JCL).
REXX1 will tell the user 'Batch Job being submitted to perform work'
The Batch Job will call REXX2 to perform the rest of the work.
Either use the Notify on the batch Job and/or TSO Send to let the user know the Job is done.
In your case, I am not sure how you connect to the external server, and how this remote operation stays in contact with the Mainframe, letting you know when it is done. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2023 Location: USA
|
|
|
|
daveporcelan wrote: |
What I do in this situation is have TWO Rexx programs.
The first one is initiated by the user: TSO REXX1. This one may collect information from the user (I use a pop-up panel).
REXX1 will submit a Batch Job to perform the rest of the work (I use Skeleton JCL).
REXX1 will tell the user 'Batch Job being submitted to perform work'
The Batch Job will call REXX2 to perform the rest of the work.
Either use the Notify on the batch Job and/or TSO Send to let the user know the Job is done.
In your case, I am not sure how you connect to the external server, and how this remote operation stays in contact with the Mainframe, letting you know when it is done. |
It is possible, but the required amount of efforts to organize it (and to learn about these methods, first of all) - usually doesn’t worth the achieved result... |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
It is possible, but the required amount of efforts to organize it (and to learn about these methods, first of all) - usually doesn’t worth the achieved result... |
Quote: |
Could you be so nice as to point me in the right direction? |
I provided a potential solution.
What do you gain by discounting my effort to help this poster out?
Have I ever totally panned your efforts?
This is very discouraging to anyone willing to help.
I am sure the moderators will support you however.
Such is this forum. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
sergeyken wrote: |
It is possible, but the required amount of efforts to organize it (and to learn about these methods, first of all) - usually doesn’t worth the achieved result... |
Seriously? Dave’s approach is much more straightforward than letting a foreground process run, tying up your TSO session while it polls for results that may never come.
The approach that I suggested, using CONTROL DISPLAY LOCK can meet the stated requirement, but raises some challenges. For example, you would need to figure out a way of unlocking the TSO session if the response from the external entity never arrives.
Dave’s approach would also allow the user to perform other work while waiting for a response. In my experience, if a response takes more than 10 seconds, your user will get impatient and want to do just that. |
|
Back to top |
|
|
Cris_70
New User
Joined: 09 Feb 2021 Posts: 8 Location: Italy
|
|
|
|
don.leahy wrote: |
Look up ISPF service CONTROL DISPLAY LOCK. |
Don, thank you very much for your suggestion!
I was able to use it to code exactly the behavior I wanted.
I also introduced a timeout to be sure to unlock the display if I don't get a reply.
Cris |
|
Back to top |
|
|
|