0

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?

feuGene
  • 3,931
  • 2
  • 33
  • 46
  • 8
    @arunmoezhi - I guess you are not paying for your CUP usage. Somebody must be - and I don't think they would be very happy with this solution! – NealB Aug 03 '12 at 13:11

2 Answers2

7

Probably the easiest method is to use the Language Environment callable service CEE3DLY or CEEDLYM.

cschneid
  • 10,237
  • 1
  • 28
  • 39
0

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.

Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
  • 2
    As the ILBO prefix suggests, this is an original COBOL run-time routine included in LE for "backwards compatability". New programs which insist on the need to "wait" should use the CEE*DLY* callable services. Avoid "waiting" like the plague. If infected by it, use the up-to-date routines. – Bill Woodger Aug 22 '13 at 17:23