View previous topic :: View next topic
|
Author |
Message |
sachin.mandaliya
New User

Joined: 17 Jan 2007 Posts: 24 Location: India
|
|
|
|
Hello,
How can I use SLEEP function in REXX?
I have gone through manual in that it is given as external function and to use it the syntax is given as below
x = sleep(no. of seconds) or
call sleep <no of seconds>
I tried this but it is not working. Do I need to include any specific library for that ? |
|
Back to top |
|
 |
Srihari Gonugunta
Active User

Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Sachin,
Please try this.
Code: |
CALL SYSCALLS('ON') /*ENABLE USS-CALLS*/
ADDRESS SYSCALL
"SLEEP" 1 /*SLEEP FOR ?? SECONDS*/
CALL SYSCALLS 'OFF' |
|
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8794 Location: Welsh Wales
|
|
|
|
The use of sleep during a REXX has often been discussed in the forum, and its general usage is highly frowned upon.
Maybe if you were to explain why you need to sleep a REXX exec then maybe some of the users here could come up with a better option. |
|
Back to top |
|
 |
sachin.mandaliya
New User

Joined: 17 Jan 2007 Posts: 24 Location: India
|
|
|
|
First of all thanks for the suggestion.
Actually I am trying to make tool using rexx which will recall all migrated datasets from the list.
And the system has one limitation that the you cannot recall more than 1000 datasets otherwise recall command will fail. So I am trying to use function such as sleep to wait for a perticular time and then again start recalling datasets. |
|
Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
it seems to me you have issues when you need to recall so many datasets.
I hope you have sufficient space available.
Gerry |
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8794 Location: Welsh Wales
|
|
|
|
I am not sure that sleeping the REXX is the solution.
Unfortunately there is no set time for HSM to actually process a recall request because there are so many contributing factors which may affect the elapsed request time.
Also, these is no way to interrogate HSM from within the REXX to monitor the progress of the so far submitted requests and determine that it is a good time to restart the request submission.
Wht the need to recall thousands and thousands of datasets ? |
|
Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8569 Location: Dubuque, Iowa, USA
|
|
|
|
Have you discussed this with the storage administrators of your site? They may or may not have enough disk space for all the recalled datasets, and if there's a valid business reason for such massive recalls they may need to adjust the migration criteria, or set up a different storage pool for these datasets. |
|
Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19245 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am not sure that sleeping the REXX is the solution. |
Expat is being kind. . .
SLEEPING the REXX is NOT the solution.What it is is an indicator of bad design.
Any time this many datasets are believed to need to be recalled, the storage management people should be involved. It may be that there is no need for them to all be recalled and there may be some dasd that could be set aside for this special exercise.
d |
|
Back to top |
|
 |
sachin.mandaliya
New User

Joined: 17 Jan 2007 Posts: 24 Location: India
|
|
|
|
Hi All,
Thanks for all your suggestions, with above code I was able to hold execution of REXX program. |
|
Back to top |
|
 |
enrico-sorichetti
Senior Moderator

Joined: 14 Mar 2007 Posts: 10714 Location: italy
|
|
|
|
/rant on
it' s a great satisfaction to try to give useful advice based on
many years of experience an large customer support
and see people so stubborn to implement stupid solutions
they just belong to the frowned upon category of people who do not ask
a question to get a reasonable answer...
but ask a question to receive the answer that suits them
and if that is not the one ... then it is wrong |
|
Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19245 Location: Inside the Matrix
|
|
|
|
Hi Enrico,
Quote: |
and see people so stubborn to implement stupid solutions |
Yup, and i'm not impressed with the people who post solutions/suggestions like this that can cause system problems. I guess there's that desire to show "I can do that!" regardless that is is a good thing to not do. The attitude is becoming more and more like using a pc - oh, well if it gets stuck, we can re-ipl.
All we can do is recommend and sometimes offer a caution.
And occasionally remove "solutions" that should maybe not be on the forum.
We can also keep an eye in some of the ids that are determined to do things that have been proven to cause problems. |
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8794 Location: Welsh Wales
|
|
|
|
Fixing the symptom rather than the cause gains nothing but more stupid requests - but hey, the guy that implements the stupid solution is the one who usually gets asked to do it again, and again, and again, and again.
As a storage guy, I monitor my HSM queues and if I see something like this going down will usually investigate what the user/idiot (delete as applicable) is trying to do.
The only time that I have done something like this was when the client insisted that all migrated datasets were to be fed through the ACS routines following the implementation of DFSMSsms. And it was done in a controlled fashion. |
|
Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19245 Location: Inside the Matrix
|
|
|
|
Hi Expat,
Quote: |
the guy that implements the stupid solution is the one who usually gets asked to do it again, and again, and again, and again. |
Sometimes known as "job security". . . .
As in, "We need to take good care of Fred, he's the only one who knows how this stuff is put together". . .
Bad place for an organization to be, but many are
d |
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8794 Location: Welsh Wales
|
|
|
|
Quote: |
As in, "We need to take good care of Fred, he's the only one who knows how this stuff is put together". . . |
But I don't hear Fred complaining  |
|
Back to top |
|
 |
dajm
New User
Joined: 08 Sep 2018 Posts: 1 Location: Australia
|
|
|
|
Wow, what a stunning over-reaction to a simple question. Sachin won't ask a question here again and Srihari wont be in a hurry to offer a solution either. What I see here is 2 people collaborating to find a solution and then others trying to look intelligent by bringing Sachin and Srihari down. If you don't agree with the question or the answer and you are still eager to show every one how superior you are, perhaps you could answer like this "your problem can be solved in this way ... but I recommend this alternative approach...".
There are valid times when a SLEEP function is required. Eg I need to re-try something 5 times at 1 minute intervals before I abandon the attempt.
Even Sachin's case could be valid - perhaps he needs to restore all of the files used by his test stream before the test starts because he cannot have the test delayed by auto-recalls? |
|
Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8569 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Wow, what a stunning over-reaction to a simple question. |
Wow -- so you add your comments 9 years, 10 months, and 2 weeks after the original post; you don't think they might be rather late? Sachin posted more through 2009 and Srihari through 2013. |
|
Back to top |
|
 |
|