I've written in various assemblers (ok, two), one of them extensively. But I haven't yet written anything in HLASM; it's my next ambition, something I read up on occasionally as time allows. Not ready yet, though.
PL/1 is a wonderful language and for production utilities I'd resurrect my PL/1 skills in a heartbeat. Well, actually in a couple hundred-thousand heartbeats; it's been quite a few years, and I'd have to lay my hands on the compiler JCL and write a few simple programs first, as a refresher. But I was planning to do this in REXX, just because it's at hand.
You and a couple others here, though, have got me thinking: I wrote a socket handler in REXX a while ago, as part of a project that decided to go in a different direction. Maybe I start a batch master program that creates a socket, fires off the first job, and then waits listening at the socket; when the first job sends back a "completed" message to the socket, the master program fires off the next job, and so on, finally quitting when it's submitted the last one. As I recall, listening at the socket for incoming messages involves sleeping in its own way.
/* The cities are for money but the high-up hills are purely for the soul. -from _Galloway_ by Louis L'Amour */
-----Original Message-----
From: TSO REXX Discussion List [mailto:
TSO-...@VM.MARIST.EDU] On Behalf Of Bernd Oppolzer
Sent: Monday, August 13, 2018 18:06
I recently had a similar problem at my actual customer's site;
I wanted a VERY long running job to be controlled from outside;
it should do its work in small packages of contracts (it's an insurance
company), say 1000, and then wait for a certain time, so that the
CPU percentage will not be very high and the overall system thruput
will not suffer. The duration of the pauses was changed while the
job was running, depending on current load measurements. This worked
very good.
The program was written in PL/1, but PL/1 (as far as I saw) does not
have a SLEEP function, too. So I wrote a very small ASSEMBLER subroutine
(less than 10 instructions), callable from PL/1 (and C etc.), which
implemented
the SLEEP function using STIMER WAIT (see MVS System Services, STIMER).
We completed the work in three days, the job ran (almost invisible) all day
long during day shift. It worked on almost 700.000 contracts.
--- Am 13.08.2018 um 18:53 schrieb Bob Bridges:
> I did a little googling on this, and I found that when some newb asks about a SLEEP command on the mainframe, everyone says "that's not a good idea - why do you want to do it?" and the conversation branches out from there and never gets back to the actual question. So I'm going to start by explaining the background, what I want to accomplish. That's the boring way, I realize; I'm sorry.
>
> One of my CA-TSS clients runs six LPARs. Every Monday I make a list of the IDs on each LPAR, and then combine the six lists into one for easy reference; that way no one has to log on to LPAR X to look up an ID there.
>
> My first step every Monday morning used to be to submit a JCL member that is actually six jobs; each one is routed to a different LPAR, where it asks TSS for a list of IDs. But TSS gets a high priority, and to have this job running on all six LPARs at once seriously hurt response time. My new process is to submit each of six jobs one at a time, wait until it's finished, submit the next one, wait some more... So I'd rather have an automated process to run those six jobs one at a time.
>
> I can't write it up as one job, because they run on different LPARs.
>
> I can't put it on the job scheduler, because not all the LPARs have a job scheduler.
>
> I'm pretty sure I ~can~ write a batch REXX that submits the collection job on LPAR 1, watches for it to complete, spawns the next job, and so on. But the only way I know how to do that is to use the TIME(E) function: Check to see whether the job is complete, if not wait another 2500 milliseconds, check again... For that I'm not really pausing, right? I mean, my job is still executing and using up CPU cycles. Isn't there some way to tell the system that it should put my job aside for <n> seconds, so I'm not wasting its attention?
>
> That's what I'm looking for, but if you think you see a better approach feel free.