0

I got the code as

ACCEPT TIME-TODAY FROM TIME.   

** 10 SECONDS waiting:
PERFORM UNTIL DELTATIME <= 00001000
    ACCEPT TIME-TODAY-2 FROM TIME
    COMPUTE DELTATIME = (TIME-TODAY-2 - TIME-TODAY)
END-PERFORM.

Read more: http://ibmmainframes.com/about9953.html#ixzz4NiZIe8cY

but this code is not working for boundary conditions.

mustaccio
  • 18,234
  • 16
  • 48
  • 57
Sangeetha
  • 1
  • 1

1 Answers1

2

You have the mainframe tag on your question, I'll presume z/OS or z/VM is your operating system.

The runtime routines for your application are collectively called Language Environment. Whether implicitly or explicitly, you will be calling these runtime routines. You cannot avoid it.

The runtime includes CEE3DLY, which accomplishes your goal. Check the Language Environment section of the IBM Knowledge Center.

I understand that you believe your requirement is to create a delay in your code without using "any utility." I am telling you that you are using utilities (the Language Environment runtime routines) all the time in your code. For example, Working-Storage is allocated by Language Environment routines. Calling CEE3DLY doesn't add any dependencies.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • As this is a duplicate: please don't vote on this answer - @cschneid: please copy most of this answer to the answer you gave in your original answer (duplicate), delete your answer, if possible and vote for duplicate – Simon Sobisch Oct 21 '16 at 15:34