View previous topic :: View next topic |
Author |
Message |
faisal Beginner
Joined: 05 Dec 2002 Posts: 8 Topics: 1
|
Posted: Sat Dec 21, 2002 1:48 pm Post subject: Communicating with batch ispf |
|
|
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 |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Sun Dec 22, 2002 1:42 am Post subject: |
|
|
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! 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 |
|
 |
faisal Beginner
Joined: 05 Dec 2002 Posts: 8 Topics: 1
|
Posted: Fri Dec 27, 2002 1:09 pm Post subject: |
|
|
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 |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Jun 18, 2003 11:43 pm Post subject: |
|
|
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 |
|
 |
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Thu Jun 19, 2003 9:15 am Post subject: |
|
|
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 |
|
 |
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Thu Jun 19, 2003 9:17 am Post subject: |
|
|
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 |
|
 |
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Thu Jun 19, 2003 9:18 am Post subject: |
|
|
BTW do u have access to JES2 automatic commands ?
they may help here _________________ Dorkhead |
|
Back to top |
|
 |
Mike Beginner

Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Thu Jun 19, 2003 8:38 pm Post subject: |
|
|
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 |
|
 |
|
|