MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Communicating with batch ispf

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
faisal
Beginner


Joined: 05 Dec 2002
Posts: 8
Topics: 1

PostPosted: Sat Dec 21, 2002 1:48 pm    Post subject: Communicating with batch ispf Reply with quote

Hi,
I have a rexx, running in batch Ispf. What it does is it runs forever (do forever loop). It sleeps for a few minutes, then does some processing, this goes on. Is there any simple way of sending an instruction to the rexx in the jcl, from a tso session; to change the processing.. for example make it stop, or pass some parameters to it. Currently i stop the job by cancelling it when i don't need it. I wouldn't like a very complicated solution, because i'll be probably too lazy to attempt it.

I have thought of a crude but quick way of doing it (haven't tried it yet). I keep a file where i store commands. Everytime the rexx goes to sleep, it frees the file. In that time I edit the file and code some instructions, basically set variables. When the rexx starts processing again, it reads in the file and uses "Interpret" to run the code written to the file.

Thanks

Faisal
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sun Dec 22, 2002 1:42 am    Post subject: Reply with quote

Faisal,
I think we need a bit more background.

If I understand your query, you have a job that executes a REXX code. And, you want some parameters to be passed on to it via JCL. This should not be very difficult. BTW, I do not quite understand,
Quote:
...simple way of sending an instruction to the rexx in the jcl, from a tso session ...


I have a feeling, you are hiding something! Smile You have a code that has a DO-FOREVER loop. You want control over the EXEC while the job is under execution. If you could show us the larger picture, it would be that much more easier.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
faisal
Beginner


Joined: 05 Dec 2002
Posts: 8
Topics: 1

PostPosted: Fri Dec 27, 2002 1:09 pm    Post subject: Reply with quote

Okay.. I can pass paramaters via the jcl. But I want to pass parameters while the job is running. I'll give an example.. I have the time interval for the sleep function set to 180 seconds intially. Now if I want to change that, i have to stop the job, change the parameter and submit it again. I'd like to do that even as the rexx is executing.

faisal
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Wed Jun 18, 2003 11:43 pm    Post subject: Reply with quote

If you are still interested in a reply then you can put the sleep parameter in an input file and change it whenever and from wherever required.
Back to top
View user's profile Send private message Send e-mail
dorkhead
Beginner


Joined: 07 Jan 2003
Posts: 25
Topics: 0
Location: Lux

PostPosted: Thu Jun 19, 2003 9:15 am    Post subject: Reply with quote

I suspect you want to have some commands/jobs executed at
some predefined times (I do the same to submit bckp jobs after testing day)
am I right ?
_________________
Dorkhead
Back to top
View user's profile Send private message Visit poster's website
dorkhead
Beginner


Joined: 07 Jan 2003
Posts: 25
Topics: 0
Location: Lux

PostPosted: Thu Jun 19, 2003 9:17 am    Post subject: Reply with quote

and what I would do is have my main code read an instruction file free it
do some process go back to sleep

the instruct file would be free so u can write to it (add commands)
_________________
Dorkhead
Back to top
View user's profile Send private message Visit poster's website
dorkhead
Beginner


Joined: 07 Jan 2003
Posts: 25
Topics: 0
Location: Lux

PostPosted: Thu Jun 19, 2003 9:18 am    Post subject: Reply with quote

BTW do u have access to JES2 automatic commands ?

they may help here
_________________
Dorkhead
Back to top
View user's profile Send private message Visit poster's website
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Thu Jun 19, 2003 8:38 pm    Post subject: Reply with quote

You could have it read a dataset which could have the parameters put in them via edit. You'd have to have it dynamically allocated and de-allocated to allow someone to edit the dataset.
Another method could be an ISPF table in which data is added in foreground but read by the batch process, again you'd have to be a little careful to circumvent in-use failures.

Another possibility could just be the creation of datasets that the Rexx could detect, this might get complicated if there's a lot of different parameters. Say, for example you wanted to change the time to 60 from 180, you could create a dataset called MY.PARMPASS.DATASET.60. The program could, via the command LISTCAT LEVEL(MY.PARMPASS.DATASET) detect that this datasets exists, extract the lowest level qualifier and adjust the time accordingly. Obviously you'd then delete the triggering dataset.
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group