Page 1 of 2

logic for the below scenario in jcl along with code

PostPosted: Fri Dec 02, 2011 11:17 pm
by mainframes_6002
can any one tell me the logic for the below scenario in jcl along with code

step 1 ---> step1 was executed and its return code is 04


step2 ---> if step 1 return code is 04 then step2 should wait for 20 min


thank u.

Re: logic for the below scenario in jcl along with code

PostPosted: Fri Dec 02, 2011 11:19 pm
by NicC
Impossible

Re: logic for the below scenario in jcl along with code

PostPosted: Fri Dec 02, 2011 11:30 pm
by BillyBoyo
Batch jobs don't do "waiting around for an amount of time".

If you can describe what you are trying to achieve, rather that what you think is a solution for what you are trying to achieve, we might have some suggestions.

Re: logic for the below scenario in jcl along with code

PostPosted: Fri Dec 02, 2011 11:31 pm
by Akatsukami
JCL does not have a wait function. In general, wait function are bad things to use; they tie up resources uselessly.

If your incompetent moron of a designer insists that you do a wait, you can write
//IF1     IF   (STEP1.RC = 4) THEN
//STEP2     EXEC PGM=wait
//STEP3     EXEC PGM=continue

Most sites (and have had for decades) little utilities that wait for a selectable number of seconds; ask your senpai for guidance. If your site does not have one, or if you're afraid that meeting someone's eye will reveal that you lied when you claimed to be John von Neumann, I recommend that you read up on CEE3DLY.

Re: logic for the below scenario in jcl along with code

PostPosted: Sat Dec 03, 2011 12:04 am
by Ed Goodman
Akatsukami,
Your post reads like a Quentin Tarantino script!

Re: logic for the below scenario in jcl along with code

PostPosted: Sat Dec 03, 2011 12:17 am
by Akatsukami
Ed Goodman wrote:Akatsukami,
Your post reads like a Quentin Tarantino script!

I have a tendency to omit words in writing, which is exacerbated by my constantly getting IMed by my client's sotfware engineers, asking what SQLCODE -552 means and what should be done about it? :oops:

Re: logic for the below scenario in jcl along with code

PostPosted: Sat Dec 03, 2011 12:39 am
by dick scherrer
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.

Re: logic for the below scenario in jcl along with code

PostPosted: Sat Dec 03, 2011 5:14 pm
by mainframes_6002
Hi this Chaya my question is

In production one jcl is abended because in that jcl card is not presented.that jcl wait time i have given 2 minutes before
Now i increased wait time 2 minutes to 5 minutes and suppose if the card is not present in that jcl next jcl i want put the condition like this

step1:in that jcl card is present or not checking
step2 if card is not present wait 25 minutes.

first step i used this code
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('mnq.sanj.qwwsp.CARD ')
/*

and second step
//STEP02 IF (STEP01.RC=4) then
//Step2 end if

could you please tell me if any one give best implement code suggestion for this issue


Thank you

Re: logic for the below scenario in jcl along with code

PostPosted: Sat Dec 03, 2011 5:59 pm
by BillyBoyo
Are you waiting for a dataset to arrive from somewhere before using it?

Talk to the people who organise/run your Scheduler. I'm sure they would have a way they'd like to have it done to meet your site's standards.

Re: logic for the below scenario in jcl along with code

PostPosted: Mon Dec 05, 2011 9:37 pm
by Ed Goodman
Can you have the job that creates the waited for CARD also submit your second job?