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: 8796 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: 8796 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: 8700 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: 19243 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
Superior Member
Joined: 14 Mar 2007 Posts: 10886 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: 19243 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: 8796 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: 19243 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: 8796 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: 8700 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 |
|
|
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
I will also like to add the word - cantankerous.
Since i've been encountering similar responses, from similar ppl, in many.. oh so many other posts, and frankly - it really makes me think twice, or three times before I actually post here.
Difference is - up until a few months ago, we had no other choice, but to bite-the bullet, and suffer the bullying, arrogance, and general condescension .
Now, we have other tools, (such as CHATGPT), that will only get better over time, and I fear that if this general conduct continues.. the forum will lose its younger generations.
Also, at no point did they actually offer a solution. just many ways to do other things that where not required (Are THEY going to transfer the required BUDGET to the other departments for a NEW quarterly project?.. )
I was told to pick my battles. So I am (Trying).
It's a shame all this knowledge will go to waste over of a few bitter men. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1333 Location: Bamberg, Germany
|
|
|
|
Please be fair. There is a Beginners Forum, and this one for Experts. You can chose where to post. Do not expect that the volunteer experts will answer any often asked questions that can be easily found by STFW. |
|
Back to top |
|
|
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
I'm super fair.
Saying - its not the correct place to ask, please reffer to the begginers forum, is an acceptable answer. Or saying nothing.
My issue is with the unpleasent, condescending attitude.
You want to encourage new ppl. Help them.
Not push them away, or dissuade them.
You catch more bees with honey.
Not bitter and snark. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1333 Location: Bamberg, Germany
|
|
|
|
Consider that most ppl here are helping n00bs in their free time. Would you do the same? Of course lots of knowledge can be shared, but you have to ask the right questions (tm). |
|
Back to top |
|
|
RazVorox
New User
Joined: 19 Oct 2022 Posts: 32 Location: Israel
|
|
|
|
I'm new to mainframe. Not to programming.
As a senior infrastructure designer, with more than a few years and languages under my belt, I have always found the time to help,
If, and when, I could.
When I couldn't, I encouraged others to help,
tried to refer, or..
Again.
Its not about the help.
Its about the attitude.
About the service with a smile.
The positively empowering.
You can say "no".
The question is if you should, and how.
Times are changing. Newer generations respond better to
Positive reinforce, and the "I'm old! You MUST respect me!!" (I'll do what I want) doesn't fly anymore.
Let's agree to disagree, and call it a day. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
re: " at no point did they actually offer a solution"
See the first reply to the original question. |
|
Back to top |
|
|
|