Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
Posted: Tue Apr 11, 2017 1:14 am Post subject: using STIMER FUNCTION
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.
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
Joined: 26 Nov 2002 Posts: 12360 Topics: 75 Location: San Jose
Posted: Tue Apr 11, 2017 10:42 am Post subject: Re: using STIMER FUNCTION
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
Joined: 26 Nov 2002 Posts: 12360 Topics: 75 Location: San Jose
Posted: Wed Apr 12, 2017 12:15 pm Post subject:
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
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