The i offers a variety of CL commands to help us control and subdue the i. But some of them are more familiar than others. Let's look at one particular family of commands.
Sometimes, on a cold winter evening, as I sit quietly in my den dressed in my favorite smoking jacket and puff contentedly on one of my favorite pipes while a fire crackles on the hearth, I like to take an obscure CL command and just investigate the living daylights out of it. Unfortunately, I also do it during the blazing hot summer when I have had a few too many Sunset Susan cocktails. And that is the case this time.
A rather obscure family of commands (ADDRTGE, CHGRTGE, RMVRTGE) allow you to do all sorts of things to routing entries or at least "all sorts of things" if all you want to do is add, change, and remove routing entries. Now if I only knew what a routing entry was.
Routing Entries
A routing entry is part of the subsystem description. Basically, it defines what happens to a job once it hits the subsystem. OK, so far, so good. A little bit more information can't hurt.
When a job is kicked off, it's directed to a specific subsystem. When it hits the subsystem, the IBM i compares a value in the routing data that accompanies the job to the routing entries that are defined for a subsystem and then assigns the job to a specific routing entry.
That is, the SBMJOB command has a RTGDTA parm where you can specify what compare value you want to use for that job. The default is QCMDB. You can also use *JOBD, which will then use the RTGDTA parm from that command. Or you can key in your own value if you are the willful sort.
A given subsystem can have multiple routing entries, but only one is matched up with a given job. At the same time, you could have several jobs submitted with the same routing entry data.
Anyway, no matter how it is set, the routing entry then assigns a pool, a class, and the system controlling program (like QCMD) to be used with this job. The pool is a memory storage pool, a subset of the total system storage, which is set up manually when you configure or tune your machine. It basically defines how much space the job will have to run in. The class is a system object that contains, among other things, the time slice and the priority for the run time for that job. Finally, the controlling job indicates what system program will oversee the running of this job.
More About Routing Entries
Technically, the routing entry consists of the following primary parms.
- Class (CLS) is the name of the system object that contains the runtime attributes that will be used to run this job—things like the time slice, the run priority, eligibility for purge, etc. None of the routing commands creates the class; they just use one that already exists. Only one of the Guardians of the Galaxy (except maybe for Drax) is allowed to create or modify classes.
- Comparison Data (CMPVAL) is the data that's compared against the routing data from the job entry to see which routing entry pairs up with which job.
- Maximum Active Routing Steps (MAXACT) is the maximum number of jobs or routing steps that may be active at the same time via this routing entry.
- Memory Pool ID (POOLID) is the Pool ID of the storage pool that the job associated with this routing entry should run in—that is, a pool within the subsystem the job has been assigned to.
- Program to Call (PGM) is the system program that will control the execution of this job.
- Sequence Number (SEQNBR) defines the order in which the routing entries are searched to look at the comparison data.
There are other parms, but I don't care about them, so the less said the better. (Do you know of any IBM commands that don't have at least 20 parms that nobody understands?) I believe in knowing just enough to be dangerous. It keeps everyone else on their toes.
The Commands of Routing Entries
You would think there would be a Work with Routing Entries (WRKRTGE) command, something that allows you to list them all and create, change, delete, display, etc. the routing entries that exist for a given subsystem (remember, routing entries always start with a subsystem). But that's not the way it works in this man's army. Instead, you have three separate commands for three separate things.
- ADDRTGE—Duh, it adds routing entries to a given subsystem.
- CHGRTGE—For those of you who can't figure it out, this allows you to change an existing routing entry.
- RMVRTGE—And for Groot or Drax, it removes a routing entry.
The only thing you can't do is see what routing entries are already out there for a given subsystem (because remember that routing entries are not things in their own right; they only have meaning within a subsystem they are defined for). Nor is it as easy as just deciding to do a CHGRTGE for QBATCH sequence 1 (for example) because the sequence numbers are in a range from 1–9999, but there may not be a number 1. I don't really get that, but then again I'm not one of the Guardians of the Galaxy, so maybe it's none of my business.
Summary
I think the lesson to take out of this—and maybe the reason there is no WRKRTGE command—is you have no business screwing around with routing entries that come with the system. I mean really, you think you're going to improve things? What do you think this is? UNIX?
But if you feel the need, you can add, change, and remove the routing entries that you add to the system configuration. Just be careful. With great power comes yada, yada, yada.
LATEST COMMENTS
MC Press Online