Reputation: 4001
I think I'm using Enterprise COBOL for z/OS.
What's a technique to emulate the functionality of, for example, the standard C library's sleep() function?
Upvotes: 0
Views: 9892
Reputation: 1
You can call the "sleep" command. Here's a basic example passing the number of seconds in a variable.
NOTE: sleep must be in lower case
WORKING-STORAGE SECTION.
77 WS-SLEEPSECS PIC S9(2) VALUE 30.
PROCEDURE DIVISION.
< Miscellaneous Code >
CALL "sleep" USING WS-SLEEPSECS.
Upvotes: 0
Reputation: 10775
Probably the easiest method is to use the Language Environment callable service CEE3DLY or CEEDLYM.
Upvotes: 7
Reputation: 1
I don't know whether you have found your answer or not.
There is an IBM program that enables the machine to sleep ... or to wait : its name is ILBOWAT0.
Here is the link of a very good example on how you can code it : http://www.mvsforums.com/helpboards/viewtopic.php?t=2008&highlight=delay
In this example, WAIT-TIME is in seconds.
Upvotes: 0