logic for the below scenario in jcl along with code



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

logic for the below scenario in jcl along with code

Postby mainframes_6002 » Fri Dec 02, 2011 11:17 pm

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.
mainframes_6002
 
Posts: 4
Joined: Fri Dec 02, 2011 10:15 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Fri Dec 02, 2011 11:19 pm

Impossible
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby BillyBoyo » Fri Dec 02, 2011 11:30 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby Akatsukami » Fri Dec 02, 2011 11:31 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby Ed Goodman » Sat Dec 03, 2011 12:04 am

Akatsukami,
Your post reads like a Quentin Tarantino script!
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

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

Postby Akatsukami » Sat Dec 03, 2011 12:17 am

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:
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby dick scherrer » Sat Dec 03, 2011 12:39 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby mainframes_6002 » Sat Dec 03, 2011 5:14 pm

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
mainframes_6002
 
Posts: 4
Joined: Fri Dec 02, 2011 10:15 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Sat Dec 03, 2011 5:59 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby Ed Goodman » Mon Dec 05, 2011 9:37 pm

Can you have the job that creates the waited for CARD also submit your second job?
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post