Page 1 of 1

How to automate PANEL tasks using ISPF background technique

PostPosted: Wed Oct 02, 2019 8:23 am
by ada78
Hi,experts.This is my first topic on this site.
Please help me.

How can I code specifically to run ISPF services in the background such as,
1. select option number and ENTER key
2. (then) type command and ENTER key
3. (then) read short message on the last panel
I would be appreciated if you give me some sample code.

--
If you give me sample code, I will challenge to make some codes to automate to do daily tasks using TWS panels.
TWS has many PIF(Program InterFace) to do routine tasks automatically in the background,but there are some tasks that TWS can not do automatically and I'm forced to do them ONLY on the panels.

Re: How to automate PANEL tasks using ISPF background techni

PostPosted: Wed Oct 02, 2019 1:51 pm
by willy jensen
Please refer to the 'ISPF Services Guide' manual for details.
1. select option number and ENTER key
Use "SELECT PANEL(xyz) OPT(opt)"
2. (then) type command and ENTER key
Use "CONTROL DISPLAY NONDISPL ENTER" then issue the command.
3. (then) read short message on the last panel
Not possible, unless the short message is created using a variable. Check the message member. One such would be the ISPF message member ISRZ00 which uses variable ZEDSMSG.
Just for fun I did a small test:
address ispexec                        
 "control nondispl enter"              
 zedsmsg='Just testing'                
 "setmsg msg(isrz000)"                  
 "display panel(TESTSCRL)"              
 "vget (zscreeni)"                      
 say 'p:'Pos('Just testing',zscreeni)  
 say 'screeni:' zscreeni

But the zscreeni variable did not contain the 'Just testing' value. It was shown when not using CONTROL NONDISPL.
SMS has a feature called NAVIQUEST for running dialogs in batch, are you sure the TWS doesn't have something similar?

Re: How to automate PANEL tasks using ISPF background techni

PostPosted: Wed Oct 02, 2019 3:08 pm
by Blackthorn
Not sure exactly what the OP is trying to accomplish, and hence whether this will help, but be aware that besides the PIF, TWS also has something called OCL (OPC Control Language, I believe), which is available as a free download from IBM. This expands upon, and simplifies, many of the commands available via the PIF.

Re: How to automate PANEL tasks using ISPF background techni

PostPosted: Wed Oct 02, 2019 5:58 pm
by ada78
Blackthorn wrote:Not sure exactly what the OP is trying to accomplish


Thank you for replying,Blackthorn.
I'm trying to "Refreshing the long-term plan". Now,I have to do it with TWS's Panel 9.5 and enter "BY" to finish it in our customer's environment.
It seems there are no way to do it in background using neither PIF in TWS nor OCL(I've just explored manual quickly).

So,now,I'm looking for any other way to do.
If you know about how to refresh long-term plan in TWS automatically,I would be appreciated if you tell me.

Re: How to automate PANEL tasks using ISPF background techni

PostPosted: Wed Oct 02, 2019 6:06 pm
by ada78
willy jensen,
Thanks a lot! I really wanted sample code like it.
I've also read manual 'ISPF service guide' but it is too difficult for me to image specific code that it work.
Thank you very much.

Anyway,I'm going to try it.
I will tell you all the result if it works and achieve my goal.

* * *
Thank you for information about NAVIQUEST.
TWS has also PGM like EQQ* which can a lot of things in background mode.

But as I replied to Blackthorn,there is lack of function about what I want to do.

Re: How to automate PANEL tasks using ISPF background techni

PostPosted: Fri Oct 04, 2019 7:17 pm
by Blackthorn
ada78 wrote:
Blackthorn wrote:Not sure exactly what the OP is trying to accomplish


Thank you for replying,Blackthorn.
I'm trying to "Refreshing the long-term plan". Now,I have to do it with TWS's Panel 9.5 and enter "BY" to finish it in our customer's environment.
It seems there are no way to do it in background using neither PIF in TWS nor OCL(I've just explored manual quickly).

So,now,I'm looking for any other way to do.
If you know about how to refresh long-term plan in TWS automatically,I would be appreciated if you tell me.


OK, that's an unusual requirement. Refreshing the long term plan via option 9.5 also deletes the current plan. Clearly something you would never want to do on your production system, so I assume this is some sort of test system where you load schedules to ensure that there are no dependency loops or whatever. I'm not aware of anyway of doing this in batch since it's such an unusual requirement and is so destructive. EQQLTCRE is the normal program used for creating a long term plan - I can only suggest you look at this and see if it would accomplish what you need.