View previous topic :: View next topic
|
Author |
Message |
rajesh-amigos Currently Banned New User
Joined: 03 Aug 2007 Posts: 25 Location: India
|
|
|
|
My requirement is to Submit a JCL through a Rexx. This JCL generates a File which is then compared against a static file by another Rexx Program. The second Rexx programm also submits a JCL, besides doing some processing.
The problem is that I dont want the User console to be locked while the first JCl is being executed. Also the second Rexx program should start only if the first JCl has been processed sucessfully. When the second Rexx Program starts a new ISPF screen should Pop up, which should have the option to be swapped (F9'ed)
What is the best method to do this.
Can anybody give me pointers & hints for such a technique. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Submit the second job from the first job when the execution is succesful.
Add an IEBGENER step as the last step of the first job that "submits" the second job thru the internal reader. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Forget about submitting batch processes and do what needs to be done entirely in the foreground. |
|
Back to top |
|
|
rajesh-amigos Currently Banned New User
Joined: 03 Aug 2007 Posts: 25 Location: India
|
|
|
|
Hi Dick,
I understood the idea. That was my original plan.
However when the second Rexx programm is launched, and it pops up a screen, I want that screen to be swappable to another ISPF screen.
The main purpose is that I am expecting the first JCL to run for quite a time, During which time the user might get busy in some more priority work. So when the Second Rexx Programm executes, he should have a choice of swapping the screen to the screen he was working on currently. How can this be acheived.
Hi Superk,
This would work, but it would lock the screen for too long of a time, which I dont want to happen. Thx for the answer anyway. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You simply cannot achieve what You ask....
there is not any intercommunication facility between batch and tso...
Is there any reason that Your users should spoon feeded ??? |
|
Back to top |
|
|
rajesh-amigos Currently Banned New User
Joined: 03 Aug 2007 Posts: 25 Location: India
|
|
|
|
Hi enrico...
Either I didnt get what u just said, or you didnt get my requirements properly...
Let me explain...
"The main purpose is that I am expecting the first JCL to run for quite a time, During which time the user might get busy in some more priority work. So when the Second Rexx Programm executes, he should have a choice of swapping the screen to the screen he was working on currently. How can this be acheived. "
I want the swappable functionality only once the second Rexx programm executes. The second Rexx Programm Will start only after the First JCL has sucessfully completed.
So I dont get where in this scenario is there any intercommunication between TSO and Batch...
I hope I was able to make my requirements more clearer now...
My question now is how do i implement the swappable functionality in my second Rexx Exec. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
So I dont get where in this scenario is there any intercommunication between TSO and Batch... |
Quote: |
So when the Second Rexx Programm executes, he should have a choice of swapping the screen to the screen he was working on currently |
The ability to do something online triggered by the batch run is what Enrico is referring to.
One thing you might try (i believe this will work, but have not tried it) is issuing a TSO SEND from the batch job to the user that tells them that the batch process has completed. They can then choose how they want to proceed with their online session. As i mentioned, i've not tried to do a SEND from batch tso to an online user, so that might be a good first test before doing any more. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
The second Rexx Programm Will start only after the First JCL has sucessfully completed. |
I got perfectly Your requirement
having one process ( TSO session ) notified by some other process ( BATCH )
( not by display a message like job ended blah blah )
but by call_it_what_you_want in order to programmatically start/complete some action
is what is commonly called Inter Process Communication
( I just shortened into Intercommunication )
and it is not possible to have it in vanilla ( unmodified ) TSO
also if I remember correctly there is not the possibility of programmatically swap the screens |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
That sounds somewhat like what I'm thinking. I guess that the users will have to enter the application, do their thing, and submit the job. Then, they can leave the application and go onto some other task. The job would presumably have a NOTIFY= command in the JOB statement, so they should know when the first job has completed. The job should be able to create a log of how it did and if it was successful or not.
Then, the user would enter the second application. The first job's log would be read and, if everything was OK, would delete it and continue on to do its thing and eventually submit the second job. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not append the second job to the first, making one bigger job, and execute the steps from job2 conditionally ? |
|
Back to top |
|
|
rajesh-amigos Currently Banned New User
Joined: 03 Aug 2007 Posts: 25 Location: India
|
|
|
|
Thx for all the advices...
I still am not clear whether i grasped it properly....
Do u mean to say that the second Rexx programm which would be launched by the First JCL....would be running in a batch mode?
@ Expat....There are multiple reasons for not choosing that option:-
1) the first rexx programm would be in execution till the JCL completes, and I expect the JCl to complete in quite a long time...This would freeze the TSO screen for a long time, and the user would be able to do nothing else... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you submit a job, the screen will not freeze. . . Once the submit is issued, the online code will continue.
Your task will be to alert the user whan the submitted job(s) complete. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
No, I am talking about one batch job. Submit and forget until notified. |
|
Back to top |
|
|
|