REXX has to wait till JCL finish its execution



IBM's Command List programming language & Restructured Extended Executor

REXX has to wait till JCL finish its execution

Postby Sivapradeep » Fri May 11, 2012 5:46 pm

Hi,

I have a REXX program. In the begining of program i submitted a JCL ( using QUEUE stack ). after submission of this JCL, i have few REXX lines which depends on the output of the JCL that was just submitted. In my execution what's happening was by the time JCL finishes its execution the next few REXX lines were completed and always getting wrong output.
If i could make REXX execution to halt for a while till JCL finishes its execution and resuming immediately once the JCL finishes then i'll get correct output. Any suggestion for this ?

Hope i made it clear.
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: REXX has to wait till JCL finish its execution

 

Re: REXX has to wait till JCL finish its execution

Postby Akatsukami » Fri May 11, 2012 5:59 pm

Yes,I have a suggestion: don't even think about it. Idling about with your mainframe session locked up, waiting for a batch job to finish, is a career-limiting move. Capisce?
"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: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: REXX has to wait till JCL finish its execution

Postby Sivapradeep » Fri May 11, 2012 6:01 pm

that's only the better suggestion i can get ? :(
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: REXX has to wait till JCL finish its execution

Postby BillyBoyo » Fri May 11, 2012 6:05 pm

Yes, pretty much.

The machine is not your machine. It is used by many people. If your program sits there "waiting" for a while, what are you going to do?

So, have the job NOTIFY you. Or send you an e-mail. Then you/whoever can start the next bit. Remember, that can even be hours later, depending on numerous factors.

Do some re-thinking remembering that a Mainframe is a machine for grown-ups, not something you just get to play on without regard to other, quality, teamwork, rationality, etc, etc, etc,
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: REXX has to wait till JCL finish its execution

Postby Sivapradeep » Fri May 11, 2012 6:12 pm

I agree with that......

I have some idea.. i think it will be fine. write a seperate JCL which has 2 steps.
In step 1: submitting JCL whatever i want in my REXX initial lines.
In step 2: based on step 1 RC = 0 , i can call the REXX using IKJEFT01.
so this is as good as REXX starting its execution after my initial step output.

i dont think this will be a problem to my machine.
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: REXX has to wait till JCL finish its execution

Postby Robert Sample » Fri May 11, 2012 6:14 pm

The best suggestion you can get is to break up the REXX so three's no waiting involved. Looping to wait for an event to happen wastes machine resources and prevents you from doing productive work on that terminal while waiting -- a double negative to management. Furthermore, if you're developing something that will be used in production, then you need to take advantage of the production tools (such as job scheduling) that already exist at your site. And, as Billy said, elapsed time is NOT under your control -- if your REXX executes just after a couple thousand jobs hit the system (I worked at one site where between 3 and 4 thousand jobs were dumped into the system by the job scheduler every day at 4 PM Eastern time), or your job needs a resource that is under exclusive control by another job that is running for hours, your terminal could be tied up for quite a while waiting for your job to finish.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: REXX has to wait till JCL finish its execution

Postby Sivapradeep » Fri May 11, 2012 6:24 pm

Robert Sample wrote:The best suggestion you can get is to break up the REXX so three's no waiting involved.

I'll seperate the JCL part from my REXX and executes both of them seperately then.
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: REXX has to wait till JCL finish its execution

Postby BillyBoyo » Fri May 11, 2012 6:43 pm

Yes, that looks like a good way.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: REXX has to wait till JCL finish its execution

Postby mongan » Fri May 11, 2012 8:05 pm

Sivapradeep, I was going to suggest exactly what you have done, but you found the solution yourself within minutes after being told that your first solution would not work. Congratulations. Actually, I usually do it this way - I have a rexx that submits a job including the follow up rexx that will process the output from the job.
User avatar
mongan
 
Posts: 212
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post