Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sleep utility

308 views
Skip to first unread message

mkk

unread,
May 24, 1999, 3:00:00 AM5/24/99
to
Hi everybody
Is there an utility which "sleeps" for x seconds ( minutes ) and
wakes up after that ? I want something like this :

//STEP010 EXEC PGM=SLEEP,PARM=300 GOES TO SLEEP SO THAT NEXT STEP STARTS
AFTER 300 SECONDS / MINUT
//STEP020 EXEC ...

TIA
KHALID

Daniel Jacot

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
In article <3749FAF9...@bigfoot.com>,

I you like programming in ASSEMBLER language, you could write your
own program which uses the 'STIMER' macro as described in the following
manual:

OS/390 MVS Programming: Assembler Services Reference, Document Number
GC28-1910-05

If you prefere COBOL, you could use the following program (works for
all releases of COBOL from OS/VS COBOL until the recent IBM COBOL for
OS/390):

CBL DATA(24)
IDENTIFICATION DIVISION.
PROGRAM-ID. WAIT.
***
*** DELAY IN COBOL VIA CALL TO ILBOWAT0
***
*** USAGE:
*** //S1 EXEC PGM=WAIT,PARM=NNNN
*** NNNN IS A NUMBER IN THE RANGE OF 0001 TO 9999 SECONDS
***
DATA DIVISION.
WORKING-STORAGE SECTION.
01 DELAY-AMT PIC S9(9) COMP.
01 ILBOWAT0 PIC X(8) VALUE 'ILBOWAT0'.
01 CURRENT-TIME PIC 9(8).
LINKAGE SECTION.
01 PARAMETER-TO-MAIN.
05 PARM-LENGTH PIC S9(4) COMP.
05 PARM-TEXT PIC X(100).
05 PARM-REDEF REDEFINES PARM-TEXT.
10 PARM-NUMERIC PIC 9999.
10 FILLER PIC X(94).
PROCEDURE DIVISION USING PARAMETER-TO-MAIN.
MAIN SECTION.
MOVE PARM-NUMERIC TO DELAY-AMT
ACCEPT CURRENT-TIME FROM TIME
DISPLAY 'TIME OF DAY BEFORE ILBOWAT0: ', CURRENT-TIME
*
CALL ILBOWAT0 USING DELAY-AMT
*
ACCEPT CURRENT-TIME FROM TIME
DISPLAY 'TIME OF DAY AFTER ILBOWAT0 : ', CURRENT-TIME
GOBACK.
--

Daniel
------------------------------------------------------------------------
visit us at http://www.winterthur.com


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

Daniel Cattin

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
Hi Khalid

Macro STIMER WAIT,DINTVL= does this for you. I have a sample program just
E-Mail me offline.

Daniel

>mkk <m...@bigfoot.com> wrote in <3749FAF9...@bigfoot.com>:

McKown, John

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
If you are running Open Edition / UNIX System Services, you can run a step:

//SLEEP EXEC PGM=BPXBATCH,PARM='SH sleep 300s'
//STDOUT DD PATH='/dev/null'
//STDIN DD PATH='/dev/null'
//STDERR DD PATH='/dev/null'

WARNING - the word "sleep" must be in lower case! As must the "s" after the
300!!!! UNIX is case sensitive!

Griffin, John , London

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
John,
Not being a big OE user yet I tried your JCL and got a JCL error
(IEF212I SFJGGUNX SLEEP STDOUT - DATA SET NOT FOUND). What have I done wrong
?
Kind Regards

John Griffin (MVS Systems Programmer)
Tel : (W) - 0171-867-2709
(M) - 0468-557781
Email : John_G...@ML.COM

McKown, John

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
It works OK on my OS/390 2.6 system. Are you sure the UNIX System Services
is available in "full function" mode? There is a mode where OMVS is started
but not really initialized. OMVS must be fully available for this to work. I
think you can find this out by issuing the operator command "D OMVS,S" if
you see an "OMVS=DEFAULT" then UNIX System Services (USS) is not really
available. Another command is "D OMVS,F" and see if there is a response
simliar to;

HFS 1 ACTIVE RDWR
NAME=OMVS.ROOT
PATH=/

If it looks like USS should be completely available, try doing an "OMVS"
command in TSO. If it fails, then you don't have USS working. If you get in,
do the command (watch the lower case!)

ls -l /dev/null

The response should be:

crwxrwxrwx 1 <something> <something> 4, 0 <date> /dev/null

I'm not totally sure that the "1" is correct. The "4,0" is what is really
important. It is also important that you do not get a message such as

ls: FSUM6785 File or directory "/dev/null" is not found

If you get into OMVS, but get the above "not found" message, then the USS
root filesystem was not installed properly.

Hope this helps!
John

Griffin, John , London

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
The MVS command D OMVS,F gave this :-

D OMVS,F
BPXO044I 14.55.37 DISPLAY OMVS 017
OMVS 000E ACTIVE OMVS=(00)
TYPENAME DEVICE ----------STATUS----------- MODE QJOBNAME QPID
HFS 13 ACTIVE RDWR
NAME=OMVS.IMW.SIMWHFSL
PATH=/usr/lpp/internet/server_root/logs
HFS 12 ACTIVE RDWR
NAME=OMVS.TCPIP.NSTATION.HFS
PATH=/usr/lpp/tcpip/nstation
HFS 11 ACTIVE RDWR
NAME=OMVS.SIMWHFS
PATH=/usr/lpp/internet
HFS 10 ACTIVE RDWR
NAME=OMVS.TCPIP.NSM.HFS
PATH=/usr/lpp/tcpip/nsm
HFS 9 ACTIVE RDWR
NAME=OMVS.TCPIP.HFS
PATH=/usr/lpp/tcpip
HFS 8 ACTIVE RDWR
NAME=OMVS.TCPIP.HE.HFS
PATH=/usr/lpp/he
HFS 7 ACTIVE RDWR
NAME=OMVS.EPH
PATH=/usr/lpp/booksrv
HFS 6 ACTIVE RDWR
NAME=OMVS.HFS.DCEBASE
PATH=/usr/lpp/dce
HFS 5 ACTIVE RDWR
NAME=OMVS.DFSHFS.GLOBAL
PATH=/usr/lpp/dfs/global
HFS 4 ACTIVE RDWR
NAME=OMVS.DFSHFS.LOCAL
PATH=/usr/lpp/dfs/local
HFS 3 ACTIVE RDWR
NAME=OMVS.ECN.V2R4.ECN
PATH=/usr/lpp/encina
HFS 2 ACTIVE RDWR
NAME=OMVS.DCEASHFS.USR
PATH=/usr/lpp/dceas


HFS 1 ACTIVE RDWR
NAME=OMVS.ROOT
PATH=/

The OMVS tso command gave this back :-

ls -l/dev/null
# FSUMA930 ls: Unknown option -/
FSUMA840 Usage: ls Ý-1aAbcCdDEfFgimlLnopqrRtusWx¨ Ýfile ...¨
#

Any ideas ?

Ituriel do Nascimento Neto

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
Jonh,

Here goes a sample program that issues STIMER

Ituriel do Nascimento Neto
itu...@baneb.com.br

Banco do Estado da Bahia - BANEB
Salvador - BA
Brazil

> -----Mensagem original-----
> De: IBM Mainframe Discussion List [mailto:IBM-...@BAMA.UA.EDU]Em nome
> de Griffin, John (London)
> Enviada em: Terça-feira, 25 de Maio de 1999 10:30
> Para: IBM-...@BAMA.UA.EDU
> Assunto: Re: Sleep utility

pgmwait.txt

Griffin, John , London

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
Thanks. I'm fine with the assembler STIMER, it's out of interest
that I want to know why the OE one won't work

Thanks anyway.

Kind Regards

John Griffin (MVS Systems Programmer)
Tel : (W) - 0171-867-2709
(M) - 0468-557781
Email : John_G...@ML.COM

> -----Original Message-----
> From: Ituriel do Nascimento Neto [SMTP:itu...@POINT.BANEB.COM.BR]
> Sent: Tuesday, May 25, 1999 3:35 PM
> To: IBM-...@BAMA.UA.EDU
> Subject: RES: Sleep utility
>
> Jonh,
>
> Here goes a sample program that issues STIMER
>
> Ituriel do Nascimento Neto
> itu...@baneb.com.br
>
> Banco do Estado da Bahia - BANEB
> Salvador - BA
> Brazil
>
> > -----Mensagem original-----
> > De: IBM Mainframe Discussion List [mailto:IBM-...@BAMA.UA.EDU]Em nome
> > de Griffin, John (London)

> > Enviada em: Terga-feira, 25 de Maio de 1999 10:30

> > << File: pgmwait.txt >>

McKown, John

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
It was probably hard to see, but there is a space after the "-l" and before
the "/dev/null". "ls -l /dev/null"

But it really appears that USS is installed. One question. In your JCL, is
the /dev/null in LOWER case? It MUST be in lower case! You will get the JCL
error if it is in UPPER case! Also make user that the parm in in the correct
upper/lower case as in my original example. UNIX is case sensitive!

> -----Original Message-----
> From: Griffin, John (London) [SMTP:grif...@MLE.CO.UK]

> Sent: Tuesday, May 25, 1999 9:06 AM
> To: IBM-...@BAMA.UA.EDU
> Subject: Re: Sleep utility
>

> Any ideas ?


>
> Kind Regards
>
> John Griffin (MVS Systems Programmer)
> Tel : (W) - 0171-867-2709
> (M) - 0468-557781
> Email : John_G...@ML.COM
>
> > -----Original Message-----
> > From: McKown, John [SMTP:JMc...@INSURDATA.COM]
> > Sent: Tuesday, May 25, 1999 2:53 PM
> > To: IBM-...@BAMA.UA.EDU
> > Subject: Re: Sleep utility
> >

Bruce Hewson

unread,
May 25, 1999, 3:00:00 AM5/25/99
to
Hi Khalid,

If you look in SYS1.SAMPLIB(ARCTOOLS) you will find a SLEEP program.

ARCTOOLS --------- STRING(S) FOUND ---------------

3656 //* ASMAL - ASSEMBLE AND LINK EDIT SLEEP PROGRAM
3665 //* SLEEPASM - SLEEP ASSEMBLER PROGRAM
3720 //SYSIN DD DSN=A10DLH.JCL.CNTL(SLEEPASM),DISP=SHR
3728 NAME SLEEP(R)
3840 ./ ADD NAME=SLEEPASM
3841 CMDNAME TITLE ' TSO SLEEP command'
3848 * Command SLEEP puts a REXX Exec to sleep for a
3855 * SLEEP <number_of_seconds>
3862 SLEEP CSECT


Regards
Bruce Hewson


> ------------------------------
>
> Date: Tue, 25 May 1999 07:26:39 GMT
> From: Daniel Cattin <Daniel...@RUEBLILAND.CH>


> Subject: Re: Sleep utility
>
> Hi Khalid
>
> Macro STIMER WAIT,DINTVL= does this for you. I have a sample program just
> E-Mail me offline.
>
> Daniel
>
>
>
> >mkk <m...@bigfoot.com> wrote in <3749FAF9...@bigfoot.com>:
>
> >Hi everybody
> > Is there an utility which "sleeps" for x seconds ( minutes ) and
> >wakes up after that ? I want something like this :
> >
> >//STEP010 EXEC PGM=SLEEP,PARM=300 GOES TO SLEEP SO THAT NEXT STEP
> >STARTS AFTER 300 SECONDS / MINUT
> >//STEP020 EXEC ...
> >
> >TIA
> >KHALID
> >
>

> ------------------------------
>

Griffin, John , London

unread,
May 26, 1999, 3:00:00 AM5/26/99
to
Thanks John, The /dev/null was in upper case. I guess I'm gonna have
real fun with OE.

Kind Regards

John Griffin (MVS Systems Programmer)
Tel : (W) - 0171-867-2709
(M) - 0468-557781
Email : John_G...@ML.COM

> -----Original Message-----
> From: McKown, John [SMTP:JMc...@INSURDATA.COM]
> Sent: Tuesday, May 25, 1999 4:08 PM
> To: IBM-...@BAMA.UA.EDU
> Subject: Re: Sleep utility
>

> > FSUMA840 Usage: ls ]-1aAbcCdDEfFgimlLnopqrRtusWx( ]file ...(

mkk

unread,
May 26, 1999, 3:00:00 AM5/26/99
to
Thank you very much everybody for your prompt reply. I don't know
assembler so I'll go with the COBOL program. As far OE is concerned it's
not available to us in our shop ( only sys progs get to play with it ).
That gives me everything to be able to run my batch schedule without
sitting all night submitting jobs. They won't let me use Zeke because
what I'm doing is "only test stuff" not "production" !
Thank you again
Khalid

Mark Zelden

unread,
May 27, 1999, 3:00:00 AM5/27/99
to
I ran the sample JCL posted using Unix System Services, and it does
not "sleep" in the first step. Whats up? I normally use a rexx sleep
function or a bal pgm I have, but I though I would try this.

//SLEEP EXEC PGM=BPXBATCH,PARM='SH sleep 300s'
//STDOUT DD PATH='/dev/null'
//STDIN DD PATH='/dev/null'
//STDERR DD PATH='/dev/null'

//*
//NEXT EXEC PGM=IEFBR14


--
+--------------------------------+--------------------------------+
| Mark Zelden | OS/390 Consultant |
| http://www.flash.net/~mzelden/ | 3D Business Solutions |
| mailto:mze...@flash.net | mailto:mze...@3dsolutions.com |
+--------------------------------+--------------------------------+

Check out my MVS utilities page at:
http://www.flash.net/~mzelden/mvsutil.html

McKown, John

unread,
May 27, 1999, 3:00:00 AM5/27/99
to
I posted the original JCL. It works for me on the OS/390 2.6 system. UNIX
System Services must be up in full function mode (to the best of my
knowledge). The upper/lower case distinction is critical. Oh, one "weirdie"
is that the step SLEEP does not sleep for the amount of time specified. It
terminates and the step *OMVSEX (which is the next step - somehow inserted
by USS) is the one that actually sleeps. But the job is delayed at this
point for the specified period of time.

> -----Original Message-----
> From: Mark Zelden [SMTP:mze...@FLASH.NET]
> Sent: Thursday, May 27, 1999 3:25 PM
> To: IBM-...@BAMA.UA.EDU
> Subject: Re: Sleep utility
>

Bruce Hewson

unread,
May 27, 1999, 3:00:00 AM5/27/99
to
John,

The *OMVSEX step is the expected behaviour when running USS stuff.....I
just love the pseudo stepname that the developers came up with.

Regards
Bruce Hewson

>
> Date: Thu, 27 May 1999 16:02:45 -0500
> From: "McKown, John" <JMc...@INSURDATA.COM>
> Subject: Re: Sleep utility
>

Mark Zelden

unread,
May 28, 1999, 3:00:00 AM5/28/99
to
"McKown, John" wrote:
>
> I posted the original JCL. It works for me on the OS/390 2.6 system. UNIX
> System Services must be up in full function mode (to the best of my
> knowledge). The upper/lower case distinction is critical. Oh, one "weirdie"
> is that the step SLEEP does not sleep for the amount of time specified. It
> terminates and the step *OMVSEX (which is the next step - somehow inserted
> by USS) is the one that actually sleeps. But the job is delayed at this
> point for the specified period of time.
>
Hmmm.. I'll have to look at this after the weekend. The system is
OS/390 2.6, USS is in full function mode, the case is correct.
0 new messages