Hello and welcome to the forum,
can any one tell me the logic for the below scenario in jcl along with code
Many of us can - none of us should. Once upon a time (before scheduling software) something like this might be done by running some kind of "monitor" task written in assembler to accomplish this kind of "scheduling". Today all well-managed systems use the scheduling software.
Two of the main things that control processing is the successful completion of something or the unsuccessful completion of something. There has not yet been a business requirement at any of my clients' that some "thing" needed to start in 20 minutes (or an hour - whatever). I suspect the time is determined by how long "the thing being waited for" will/should run. This determination is often wrong for various reasons and then there are problems. . .
At several of my sites, the Operations or Scheduling people have been known to purge processes that are "just hanging around". And even if some programmer gets away with testing something, the Configuration Management rules will not permit this being promoted to Production.