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

How to issue a non-blocking popup


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Cris_70

New User


Joined: 09 Feb 2021
Posts: 3
Location: Italy

PostPosted: Tue Feb 09, 2021 5:32 pm
Reply with quote

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
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Tue Feb 09, 2021 6:55 pm
Reply with quote

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
View user's profile Send private message
Cris_70

New User


Joined: 09 Feb 2021
Posts: 3
Location: Italy

PostPosted: Tue Feb 09, 2021 8:00 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 707
Location: Whitby, ON, Canada

PostPosted: Tue Feb 09, 2021 8:18 pm
Reply with quote

Look up ISPF service CONTROL DISPLAY LOCK.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 762
Location: Pennsylvania

PostPosted: Tue Feb 09, 2021 8:21 pm
Reply with quote

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
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Tue Feb 09, 2021 8:54 pm
Reply with quote

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... icon_rolleyes.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 762
Location: Pennsylvania

PostPosted: Tue Feb 09, 2021 9:12 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 707
Location: Whitby, ON, Canada

PostPosted: Tue Feb 09, 2021 11:31 pm
Reply with quote

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... icon_rolleyes.gif
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
View user's profile Send private message
Cris_70

New User


Joined: 09 Feb 2021
Posts: 3
Location: Italy

PostPosted: Wed Feb 10, 2021 4:18 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Rebind issue - Package DB2 2
No new posts Storage issue when inserting Chinese ... COBOL Programming 1
No new posts IMS SEGMENT READ ISSUE IMS DB/DC 0
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
No new posts Issue with CR+ catalog backup job. JCL & VSAM 18
Search our Forums:

Back to Top