IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SLEEP function in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sachin.mandaliya

New User


Joined: 17 Jan 2007
Posts: 24
Location: India

PostPosted: Thu Oct 23, 2008 10:56 am
Reply with quote

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
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Thu Oct 23, 2008 11:17 am
Reply with quote

Sachin,
Please try this.

Code:
CALL SYSCALLS('ON')    /*ENABLE USS-CALLS*/
ADDRESS SYSCALL
"SLEEP" 1                /*SLEEP FOR ?? SECONDS*/
CALL SYSCALLS 'OFF'
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Oct 23, 2008 11:19 am
Reply with quote

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
View user's profile Send private message
sachin.mandaliya

New User


Joined: 17 Jan 2007
Posts: 24
Location: India

PostPosted: Thu Oct 23, 2008 11:27 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 23, 2008 11:36 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Oct 23, 2008 11:40 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 23, 2008 4:49 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 23, 2008 10:18 pm
Reply with quote

Hello,

Quote:
I am not sure that sleeping the REXX is the solution.
Expat is being kind. . . icon_rolleyes.gif

SLEEPING the REXX is NOT the solution.What it is is an indicator of bad design. icon_sad.gif

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
View user's profile Send private message
sachin.mandaliya

New User


Joined: 17 Jan 2007
Posts: 24
Location: India

PostPosted: Mon Nov 03, 2008 2:12 pm
Reply with quote

Hi All,

Thanks for all your suggestions, with above code I was able to hold execution of REXX program.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10874
Location: italy

PostPosted: Mon Nov 03, 2008 2:20 pm
Reply with quote

/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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Nov 03, 2008 2:44 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 03, 2008 3:59 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Nov 03, 2008 8:43 pm
Reply with quote

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 icon_confused.gif

d
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 03, 2008 9:02 pm
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
dajm

New User


Joined: 08 Sep 2018
Posts: 1
Location: Australia

PostPosted: Sat Sep 08, 2018 5:01 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat Sep 08, 2018 6:57 am
Reply with quote

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
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Tue May 23, 2023 12:06 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1269
Location: Bamberg, Germany

PostPosted: Tue May 23, 2023 12:23 pm
Reply with quote

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
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Tue May 23, 2023 12:48 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1269
Location: Bamberg, Germany

PostPosted: Tue May 23, 2023 12:55 pm
Reply with quote

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
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Tue May 23, 2023 1:41 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2548
Location: Silicon Valley

PostPosted: Tue May 23, 2023 10:02 pm
Reply with quote

re: " at no point did they actually offer a solution"

See the first reply to the original question.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts COBOL 6.4 - User Defined Function nee... COBOL Programming 2
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top