MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

using STIMER FUNCTION

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Tue Apr 11, 2017 1:14 am    Post subject: using STIMER FUNCTION Reply with quote

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
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Tue Apr 11, 2017 10:42 am    Post subject: Re: using STIMER FUNCTION Reply with quote

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.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Tue Apr 11, 2017 11:24 pm    Post subject: Reply with quote

Ya we dont have permission to give &10 command in SDSF. So please let us know if there are any other options
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Wed Apr 12, 2017 12:15 pm    Post subject: Reply with quote

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                                 
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group