using STIMER FUNCTION
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: using STIMER FUNCTION Author: deepa12Location: chennai PostPosted: Tue Apr 11, 2017 1:14 am
    —
I have taken a look at the following links that mentions about the use of
STIMER function which will suspend the current task & then provide the delay & the task will get re-activated once the time is over.

http://www.mvsforums.com/helpboards/viewtopic.php?t=79&highlight=stimer

http://www.mvsforums.com/helpboards/viewtopic.php?t=7780&highlight=stimer

Currently the TSO session expires after half hour of inactivity
We would like to write a tool to extend the tso session time by just doing for e.g. pressing ENTER key in an sdsf session at the background every 10 mins & stop it once the user comes back.

The following code is available in site
Code:
ZZWAIT   CSECT                     
         SAVE  (14,12),,*           
         BALR  12,0                 
         USING *,12                 
         ST    13,SAVEAREA+4         
         LA    14,SAVEAREA           
         ST    14,8(,13)             
         LR    13,14                 
         L     2,0(,1)               
         MVC   INTERVAL,0(2)         
         STIMER WAIT,,BINTVL=INTERVAL
RETURN   L     13,SAVEAREA+4         
         RETURN (14,12),RC=0         
SAVEAREA DC    18F'0'               
         CNOP  0,4                   
INTERVAL DC    XL4'00'               
         RETURN (14,12),RC=0   
SAVEAREA DC    18F'0'           
         CNOP  0,4             
INTERVAL DC    XL4'00'         
         END                   


So i thought i will use this & test it
Code:
say time()                               
  X=10                                   
  PARM1=D2C(X,4)                         
    ADDRESS LINKPGM "ZZWAIT PARM1"       
    SAY RC                               
SAY TIME()                               
exit                                     

when i execute this rexx it shows a cross & clock in the status bar as if it is consuming time in the foreground.
So it will not susoend itself & this is a wrong way is it
Please advise

#2: Re: using STIMER FUNCTION Author: kolusuLocation: San Jose PostPosted: Tue Apr 11, 2017 10:42 am
    —
deepa12 wrote:

Currently the TSO session expires after half hour of inactivity
We would like to write a tool to extend the tso session time by just doing for e.g. pressing ENTER key in an sdsf session at the background every 10 mins & stop it once the user comes back.


deepa12,

1. You are wasting a ton of resources by doing this.
2. You are trying to re-invent the wheel. SDSF already provides the function Auto-Update

Type &10 in your SDSF panel and your SDSF will be auto updated for every 10 seconds. You will notice **** AUTO UPDATE - 10 SECONDS **** .

If you want 10 minutes, then simply type &600 and press Enter.

To get out of it press the ESC or ATTN key or however you have set up your attention key.

P.S : Most shops restrict the usage of Auto update. If your shop happens to be one of them then even if you use STIMER, it would be kicked out after certain time period.

#3:  Author: deepa12Location: chennai PostPosted: Tue Apr 11, 2017 11:24 pm
    —
Ya we dont have permission to give &10 command in SDSF. So please let us know if there are any other options

#4:  Author: kolusuLocation: San Jose PostPosted: Wed Apr 12, 2017 12:15 pm
    —
deepa12,

As I mentioned earlier, you are just wasting resources and re-inventing the wheel with STIMER macro. The trouble with your approach is that you need your rexx exec to respond to your ATTN key when you want to break out of the loop.

If you insist on wasting resources, here is a simple rexx exec(provided you have OMVS active for SLEEP to work) that loops forever and will only get out when you press the ATTN key. Remember that you may be kicked out if the loop lasts longer than your Job/Task wait time defined at your shop. I do NOT recommend this approach.

Code:

/* REXX */                             
CALL ON HALT                           
DO COUNT = 1 TO 10                     
   COUNT = COUNT - 1                   
   IF LOOP_CONTINUE = 'NO' THEN LEAVE 
      A = SYSCALLS('ON')               
      ADDRESS SYSCALL                 
      "SLEEP 10"                       
END                                   
EXIT 0
                               
HALT:                                 
LOOP_CONTINUE = 'NO'                   
RETURN                                 



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group