Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SLEEP function in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: SLEEP function in REXX
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 23, 2008 11:19 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Oct 23, 2008 11:36 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 23, 2008 11:40 am    Post subject:
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: 7914
Location: Bellevue, IA

PostPosted: Thu Oct 23, 2008 4:49 pm    Post subject:
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

Site Director


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

PostPosted: Thu Oct 23, 2008 10:18 pm    Post subject: Reply to: SLEEP function in REXX
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Nov 03, 2008 2:20 pm    Post subject: Reply to: SLEEP function in REXX
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

Site Director


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

PostPosted: Mon Nov 03, 2008 2:44 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 03, 2008 3:59 pm    Post subject:
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

Site Director


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

PostPosted: Mon Nov 03, 2008 8:43 pm    Post subject: Reply to: SLEEP function in REXX
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 03, 2008 9:02 pm    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us