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
 

 

Job submitted thru Rexx.. to stop execution tll completion

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

New User


Joined: 07 Nov 2008
Posts: 19
Location: India

PostPosted: Wed Nov 26, 2008 11:52 am    Post subject: Job submitted thru Rexx.. to stop execution tll completion
Reply with quote

Hi All..
I am submitting a few jobs using Rexx..But I want that until the first job gets completed...code should not execute further..
Say in Line 10, I am submitting a job, now I want that until that job gets submitted.. it should not proceed further...how can I achieve this??
One way may be to get MaxCC of job in a variable and until that variable is being populated (i.e it holds MaxCC of that job), DO FOREVER loop can be used..
Pls help with some better way...I don;t think it to be a good way..
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Nov 26, 2008 11:58 am    Post subject:
Reply with quote

Search the forum foe the word "sleep". There are some example.

By the way, it is considered a bad practice to hold your REXX while waiting for a job.

O.
Back to top
View user's profile Send private message
ashishwach

New User


Joined: 07 Nov 2008
Posts: 19
Location: India

PostPosted: Wed Nov 26, 2008 12:03 pm    Post subject:
Reply with quote

Let me explain you the whole scenario..
I am trying to submit one job for several members...
meaning to say..that job's SYSIN contains the PDSname(<MemberName>)
Now, I need to edit that job's SYSIN every time for each Member so that it gets edited and then I can submit that job...
So, for editing I am using its DISP = OLD...
Now, until the first job gets completed, it won't open the dataset again to edit it...so I want that Rexx should wait for execution until the first job gets completed..
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Nov 26, 2008 12:07 pm    Post subject:
Reply with quote

Use a combination of OUTTRAP, STATUS, "TSO PROFILE NOWTPMSG" & LISTBC.

O.
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 26, 2008 12:12 pm    Post subject:
Reply with quote

ofer71 wrote:
Search the forum foe the word "sleep". There are some example.
By the way, it is considered a bad practice to hold your REXX while waiting for a job.
O.

Please pay attention to the comment above.

You can end up with a locked terminal for most of the day while waiting for things to happen which are beyond your control.

Please think of an alternative method of doing this, for instance multiple copies of the same job each using a different sysin member.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Wed Nov 26, 2008 10:21 pm    Post subject: Reply to: Job submitted thru Rexx.. to stop execution tll c
Reply with quote

Not sure I understand the scenario, but it looks like you are editing the SYSIN file then submitting a file that references it.

I agree with Expat that this is not being done efficiently.

If you already have easy access to the SYSIN, I have a suggestion. I think you should submit job with SYSIN DD * and include the sysin data, rather than refer to it by name.

Or possibly, edit all of your SYSIN members before submitting any jobs.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Thu Nov 27, 2008 2:19 am    Post subject:
Reply with quote

Why do you need JCL at all? Just call your program from Rexx!
Back to top
View user's profile Send private message
ashishwach

New User


Joined: 07 Nov 2008
Posts: 19
Location: India

PostPosted: Thu Nov 27, 2008 12:23 pm    Post subject:
Reply with quote

Thanks for all your valuable suggestion..
As per expat, I copied same JCL to different members and submitted jobs for all of them..
Now, what happens is each job submitted creates a member in an output dataset..so, if I submitted, say 10 jobs, 10 members (one corr. to each) will get created in output datasets..Now, when I am trying to retrieve the members of that datasets in same rexx code, it is giving me an error message..

263 *-* "LISTD '"PDS4"' MEMBERS"
+++ RC(-20) +++

But if I am running the same code (i.e. just to retrieve the members of the output dataset created) in a different Rexx, it's running fine..
pls help
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Nov 27, 2008 1:41 pm    Post subject:
Reply with quote

LISTDS is an autorized command. You need to consult your security guys.

O.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Nov 28, 2008 1:03 pm    Post subject: Reply to: Job submitted thru Rexx.. to stop execution tll c
Reply with quote

ashish,

I had already posted a code for this requirement in this forum. I shall search and post it.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Fri Nov 28, 2008 1:14 pm    Post subject: Reply to: Job submitted thru Rexx.. to stop execution tll c
Reply with quote

Try using the TSOEXEC command:
Code:

Address TSO "TSOEXEC LISTD '"PDS4"' MEMBERS"
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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