Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Fri Nov 25, 2005 9:51 am Post subject:
Theoretically, yes it is easy (sleep, check, sleep, check...) but this is very poor design because you never can be sure when your job will execute. If there are limited initiators, it could be a long wait. If there are no initiators, the job might never run. And if there are errors in the job, you have no way of handling them. It is much better to run the program(s) currently in the job directly from within your Rexx. If this is an online tool, it should be completely online. There may be cases where submitting a job and waiting for the output is reasonable, but they are pretty rare and usually involve submitting jobs from an external source, or they involve some program that will only run in batch (usually due to some dependency on the different TCB structure that exists in batch vs TSO).
Try to do it all online if you can (alloc ddnames and call the program). If that doesn't work, either use the Unix sleep command, the LE sleep module (IL0Wait or something like that) or your own sleep module (which is only a few lines of assembler, or there are many examples of robust ones here).
By the way, please search before posting. This topic has been discussed many times before.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum