Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Submitting a JCl and Another Rexx program through a Rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Wed Nov 07, 2007 9:28 pm    Post subject: Submitting a JCl and Another Rexx program through a Rexx
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 07, 2007 10:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Nov 07, 2007 10:19 pm    Post subject: Reply to: Submitting a JCl and Another Rexx program through
Reply with quote

Forget about submitting batch processes and do what needs to be done entirely in the foreground.
Back to top
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Wed Nov 07, 2007 10:42 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Nov 07, 2007 10:53 pm    Post subject: Reply to: Submitting a JCl and Another Rexx program through
Reply with quote

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
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Wed Nov 07, 2007 11:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 07, 2007 11:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Nov 07, 2007 11:42 pm    Post subject: Reply to: Submitting a JCl and Another Rexx program through
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Nov 07, 2007 11:44 pm    Post subject: Reply to: Submitting a JCl and Another Rexx program through
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 07, 2007 11:48 pm    Post subject:
Reply with quote

Why not append the second job to the first, making one bigger job, and execute the steps from job2 conditionally ?
Back to top
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Wed Nov 07, 2007 11:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Nov 08, 2007 12:39 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 08, 2007 11:24 am    Post subject:
Reply with quote

No, I am talking about one batch job. Submit and forget until notified.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us