Hi Patrik,
Finally getting to " Some examples"...
I've created a simple subsystem as follows:
CRTSBSD SBSD(HOWRTGWRKZ) POOLS((1 *SHRPOOL1)) TEXT('how routing entries work')
CRTJOBQ JOBQ(HOWRTGWRKZ) TEXT('how routing entries work')
ADDJOBQE SBSD(HOWRTGWRKZ) JOBQ(HOWRTGWRKZ)
ADDRTGE SBSD(HOWRTGWRKZ) SEQNBR(10) CMPVAL(RTGTST1) PGM(RTGTST1) CLS(QBATCH)
ADDRTGE SBSD(HOWRTGWRKZ) SEQNBR(20) CMPVAL(RTGTST) PGM(RTGTST2) CLS(QBATCH)
ADDRTGE SBSD(HOWRTGWRKZ) SEQNBR(30) CMPVAL(RTG) PGM(RTGTST3) CLS(QBATCH)
PGM /* RTGTST1 */
SNDPGMMSG msg( 'RTGTST1 was selected' )
ENDPGM
PGM /* RTGTST2 */
SNDPGMMSG msg( 'RTGTST2 was selected' )
ENDPGM
PGM /* RTGTST3 */
SNDPGMMSG msg( 'RTGTST3 was selected' )
ENDPGM
strsbs HOWRTGWRKZ
now for some tests:
1.
SBMJOB JOB(RTGWRKZ1) JOBQ(HOWRTGWRKZ) RTGDTA(RTGTST1)
Will of course match with seqnbr 10 and call RTGTST1.
2.
SBMJOB JOB(RTGWRKZ2) JOBQ(HOWRTGWRKZ) RTGDTA(RTG)
Will match with seqnbr 30 and call RTGTST3
3.
SBMJOB JOB(RTGWRKZ3) JOBQ(HOWRTGWRKZ) RTGDTA(RTGTST4)
Is a bit of a curved ball, matching with seqnbr 20, and so calling RTGTST2.
Note, if seqnbr 20 had a CMPVAL('RTGTST ') then this test case would match with #30 instead.
4.
SBMJOB JOB(RTGWRKZ4) JOBQ(HOWRTGWRKZ) RTGDTA(TSTRTG)
Will fail with CPC1117 - Routing data does not match routing entry.
Note: because none of the routing pgms above use Request Data, IE: "command line", then none need be included. If it is, it's ignored.
Now none of the above directly addresses the 2nd part of your question: what "routing data" usually contain?
Hopefully the above example suggests whatever makes sense to you/your site. Generally, I would not use overlapping values like above because of the results of tests 2 & 3. Though there's a good example below where it does.
You mentioned you looked at a couple of OS SBSD's, so let's have a quick look at the first few entries in QSYSWRK, where in fact the beginning of the first few CMPVAL do overlap:
Seq Nbr Program Library Compare Value Pos
10 QCMD QSYS 'RUNPTY07' 1
20 QCMD QSYS 'RUNPTY10' 1
30 QCMD QSYS 'RUNPTY20' 1
40 QCMD QSYS 'RUNPTY25' 1
50 QCMD QSYS 'RUNPTY35' 1
55 QCMD QSYS 'RUNPTY40' 1
60 QCMD QSYS 'RUNPTY50' 1
300 *RTGDTA 'PGMEVOKE' 29
10 thru 60 all have the same routing pgm, so what's the difference?
Option 5 shows they each have a different Class, and each of those have different RUNPTY values - and the routing entry compare values kind of documents that.
Summary:
Routing data can be more or less whatever suits, except where PGM() is *RTGDTA, but you can read up on that 😊
Routing data is used to either select the routing PGM, and/or different Classes which control attributes like RUNPTY, and/or which subsystem memory pool the job will run in (which I've not discussed).
HTH,
All the best for 2022
Robert
-----Original Message-----
From: C400-L <c400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik Schindler
Sent: Monday, 20 December 2021 12:12 AM
To: Bare Metal Programming IBM i (AS/400 and iSeries) <c400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: [C400-L] Using Data Queues in C, with V4 -- RTGDTA
Hello George,
Am 16.12.2021 um 23:00 schrieb georgelemen@xxxxxxxxxx:
The routing data (in Submit job and in communications jobs) is matched against subsystem Routing Data entries in the subsystem description. The first match allows the execution class found selects the program, execution class object and subsystem memory pool the job runs.
Yes, this is the "official" statement :-)
Some examples would help me greatly to grasp what "routing data" usually contains. Meanwhile I've analyzed some OS SBSDs and at least for batch entries it's either the *PGM name, or the ASJ entry name of the SBSD.
I found the following link to IBM's subsystem documentation that
details subsystem management (including routing entries) at
https://www.ibm.com/docs/en/i/7.1?topic=work-managing-subsystems
I've read that just some days before, and it didn't help to "flip the switch". ;-)
:wq! PoC
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: C400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://archive.midrange.com/c400-l.
Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.