[ Up to Main Menu ]
The iDocs SmartRouter is a dataqueue engine that sorts, bursts, filters and routes *SCS spool file on a page by page basis, optionally assigning external printer file attributes. It's distinguishing feature is its ability to work simultaneously with external spool file attributes and spool file content.
The top level container is the SmartRouter Definition. The SmartRouter Definition may contain 9,999 application definitions.
The Application definition is the second level container. It may contain 9,999 targets, and may be conditioned upon 9,999 logical tests.
The Target is the output definition. It may also be conditioned upon 9,999 logical tests..
The Condition is a logical test on an external spool file attribute or internal spool file content. Conditions are used to enable or disable applications and to control output to targets.
The Smart Router is bundled into the iDocs Suite. Older standalone versions may still be installed at customer sites.
The Smart Router is part of the iDocs library and is installed by default. It is a keyed product. Your salesrep can obtain an evaluation license key for you. You will need to install key values PREPRC1 and PREPRC2 using the iDocs key mechanism.
To configure the SmartRouter, issue the command SR3 (SmartRouter) or take option option 13 iDocs Smart Router from the iDocs menu.
At the first screen you may create up to 9,999 preprocessor definitions.
9/14/18 iDocs SmartRouter PR0010H1 19:59:20 SR Engine Definition Maintenance KKRAMER Type options, press enter. 2=Change 3=Copy 4=Delete 5=View 7=Rename 8=Start 9=End Opt SR Engine Description Status FORMSPLIT Formsplit *NONE FPTDEMOSR FPT Demo Smart Route *NONE JCSTMTSR JC STMT SR *NONE OFACKTEST Test Ack for Adel W *NONE OFCDASR CDA Test *NONE OFHCISTSM HCI Statement SM *NONE OFSAMPLE Orlando's Sample Eng *NONE OFSMARTENG Orlando SR Test Eng. *NONE OFWINKLER Winkler Landscape *NONE PKSLIPSR Packing Slip Smart *NONE PRNWBURST2 BURST EVERY 2 PAGES *NONE ROCKYSR Rocky Test *NONE SENTINELSR Sentinel Smt.Router *NONE More... F3=Exit F5=Refresh F6=Add
Use option 2 to change an existing Smart Router definition or F6 to add a new definition.
2/26/22 iDocs SmartRouter PR0010R4 20:01:06 SR Engine Definition Maintenance KKRAMER SR Engine Name/Desc: OFACKTEST Test Ack for Adel W Data Queue Name/Lib: OFACKDTQ OFERRER Archive Outque/Lib.: ARCHIVE2 OFERRER Archive/Delete/Hold: D A/D/H Process Spool File.: *JOBQ *CALL, *JOBQ Job Queue Name .: *JOBD *JOBD, Name Library . . . .: *LIBL Job Priority. . .: *JOBD 1-9, *JOBD F4=Prompt F12=Cancel Enter-Output Queue Maintenance
Do not name the engine beginning with a Q. IBM reserves the letter Q for operating system objects.
Similarly do not use Q as the first letter for the dataqueue name.
Archive/Delete/Hold: A/D/H - SR 6.89 2/26/22
A: Original spool file will be moved to archive queue after processed
D: Original spool file will be deleted after processed
H: Original spool file will be held in current queue after processed
Blank: do nothing with original spool file
To configure the use of a jobqueue for processing rather than default call logic in
versions 3.20 and earlier see Engine Processing Mode.
Press <enter> to proceed to the next configuration screen.
9/14/18 iDocs SmartRouter PR0055R1 20:02:40 SR Outqueue Maintenance KKRAMER SR Engine Name/Desc: OFACKTEST Test Ack for Adel W Data Queue Name/Lib: OFACKDTQ OFERRER Archive Outque/Lib.: ARCHIVE2 OFERRER Type option, press enter. 4=Delete Outqueue .....Outqueue...... Process at Opt Name Library Start-up IN OFERRER N More... F3=Exit F4=Prompt F5=Refresh F12=Cancel
Press <enter> to save changes. Then press F12 to return to the main Smart Router engine listing, then continue the configuration using option 2 - change.
Option 5 - View from the main Smart Router engine listing permits you to drill down to applications contained within the SmartRouter and make any additions or changes to the Targets and Conditions.
9/14/18 iDocs SmartRouter PR0020H1 20:08:59 Application Definition Maintenance KKRAMER SR Engine Name/Desc: OFACKTEST Test Ack for Adel W Data Queue Name/Lib: OFACKDTQ OFERRER Archive Outque/Lib.: ARCHIVE2 OFERRER Type option, press enter. 3=Copy App 4=Remove App 6=Spoolfile Cond 8=Targets Opt Engine App Description Form App Act OFACKTEST Ack test OFACKADEL2 More... F3=Exit F4=Prompt F5=Refresh F12=Cancel
To add and application key its name and description on an empty line and press <enter>.
Form App: This is the name of the associated iDocs form. The form is used to provide mapped field definitions. These definitions can be used to test internal spool file content and map spool file content to output in the targets. This is the sole way the internal spool file content is specified in the Smart Router.
Use option 6 to Work with Conditions for the application. These conditions will be evaluated only for the first page in each spool file, and if they evaluate to TRUE the entire spool file will be processed by the application. All applications with either no conditions or with conditions evaluating to TRUE will process the spool file.
Use option 8 to work with targets for the application. A target is a copy of the spool file that is filtered by the conditions attached to it. Target conditions are evaluated for each page in the spool file and when TRUE the page is written to the target.
9/14/18 iDocs SmartRouter PR0030H1 18:10:52 Target Definition Maintenance KKRAMER SR Engine Name/Desc..: OFACKTEST Test Ack for Adel W Application Name/Desc: OFACKTEST Ack test Form App Reference...: OFACKADEL2 Type options and press enter: 3=Copy, 4=Delete, 6=Conditions, 8=Insert Text Target Name/Desc....: HANDOFFEQ IF EQ Destination Outq/Lib: HANDOFF OFERRER Output type.........: *COPY *NONE *PAGE *COPY *BURST *SORT *SORTBRST Set SPLF Owner......: *SPLOWNER, User profile Override Command....: More... F3=Exit F4=Prompt F5=Refresh F8=Insert Map Field F12=Cancel
This screen shows any existing targets of the application. You can add targets by scrolling down and appending to the list.
Output Target Types | |
---|---|
*NONE | Discard spool file page, NULL output |
*PAGE | Burst every page |
*COPY | Output un-burst, i.e. all output to the target is in one spool file. |
*BURST | Burst output to this target using the bursting definitions in the iDocs form or check specified. |
*SORT | Sor output to this target using the sort definitions in the iDocs form or check specified. |
*SORTBRST | Sort and burst output to this target using the sorting and bursting definitions in the iDocs form or check specified. |
Conditions are entered via option 6, and are attached to applications and/or targets.
9/14/18 iDocs SmartRouter PR0035H1 18:17:03 Target Spoolfile Page Conditions KKRAMER SR Engine...: OFACKTEST Test Ack for Adel W Application.: OFACKTEST Ack test Form App Ref: OFACKADEL2 Target Name/Desc....: HANDOFFEQ IF EQ Destination Outq/Lib: HANDOFF OFERRER Output type.........: *COPY *USRPRF *USRDTA *OUTQUE Line and Attribute or Attribute or *SPLFILE *FORM *JOBNAME Nbr or Mapped Field Test Map Fld or Value *OUTLIB *TOTALPG F8=Edit 0001 &TRIGGER *EQ *BLANKS 0002 0003 0004 0005 0006 More... F3=Exit F23=Delete F5=Refresh F6=Insert F12=Cancel
Mapped Field Types | |
---|---|
iMail To Address | |
TESTBODY | test body |
TRIGGER | Trigger for SR Condition |
There is a feature where you Name objects or conditional list as fields which we defined and they can be reused for many times using the &EMAIL option: Press F8 when cursor is at &EMAIL and the following PR0035W3 window appears:
9/14/18 iDocs SmartRouter PR0035H1 18:17:03 Target Spoolfile Page Conditions KKRAMER PR0035W3 SR Testing Values Ap F Field . . : &EMAIL Ta Test . . : *EQ, *LT, *LE, *GT, *GE, *NE, *IN D O Test value (&MapField, *Attribute,Value, Value1 Value2..) TA *OUTQUE L M *JOBNAME OTALPG 0 0 0 0 More... 0 F4=Prompt F8=Cond. Named Object F10=Save 0 More... F3=Exit F23=Delete F5=Refresh F6=Insert F12=CancelYou can now use the F8=Cond. Named Object option to name the object. The PR0036W1 window is displayed as shown below:
9/14/18 iDocs SmartRouter PR0035H1 18:17:03 Target Spoolfile Page Conditions KKRAMER PR0035W3 SR Testing Values Ap PR0036W1 F Fi Named Objects of Conditional Lists Ta Te D 1=Select 2=Edit 4=Delete O Te Opt Name Description EMAILLINE Find eMail address on line UTQUE L EVEN2-6 Even Pages 2, 4, 6 BNAME IDOCS Test G ODD1-5 Odd Pages 1 - 5 0 REPORTS Reports ID 0 0 0 0 F 0 F3=Exit F6=Add re... F3=Exi
Select a field with option 1 and the PR0035W3 window is displayed as shown below:
9/14/18 iDocs SmartRouter PR0035H1 13:24:46 Target Spoolfile Page Conditions KKRAMER PR0035W3 SR Testing Values Ap 6W1. F Field . . : &EMAIL : Ta Test . . : *EQ *EQ, *LT, *LE, *GT, *GE, *NE, *IN : D : O Test value (&MapField, *Attribute,Value, Value1 Value2..) : EMAILADD : : UTQUE L : BNAME : G : 0 : 0 : 0 : 0 More... : 0 F4=Prompt F8=Cond. Named Object F10=Save : 0 : : re... : F3=Exi :..............................................................:
Enter a Value i.e.:
Webmaster@INFORMDECISIONS.COM
Then we can use field EMAILADD to replace long name ‘Webmaster@INFORMDECISIONS’ The Smart Router will check test value as conditional list, if found will replace test value by values which we have defined.
Tests and Keyword descriptions:
Line and Attribute or Attribute or Nbr or Mapped Field Test Map Fld or Value 0001 *SPLFILE *EQ QPJOBLOG 0002 AND *USRPRF *EQ QSECOFR 0003 0004 0005
Tests | |
---|---|
*EQ | Equals |
*NE | Not Equals |
*GT | Greater Than |
*GE | Greater Than or Equal To |
*LT | Less Than |
*LE | Less Than or Equal To |
Comparand keyword | Meaning |
---|---|
*BLANKS | The compared field is blank |
*FORM | Spool file form type |
*JOBNAME | Spool file job name |
*OUTQUE | Spool file outqueue |
*OUTLIB | Spool file outqueue library |
*SPLFILE | Spool file name |
*TOTALPG | Spool file total pages |
*USRPRF | User profile owning the spool file |
*USRDTA | Spool file user data |
1. The processing priority:
*SPLFILE *USRPRF *JOBNAME *USRDTA *FORM *PGM *TOTALPG *OUTQUE *OUTLIB
2. Program will deal values above for both 2 fields: ‘Field’ and ‘Test value’. For example, we can define as below:
Field . . : ORLANDO@INFORMDECISIONS.COM Test . . : *EQ *EQ, *LT, *LE, *GT, *GE, *NE, *IN Test value (&MapField, *Attribute,Value, Value1 Value2..) &EMAIL
3. Regarding test values: ‘Value, Value1 Value2…’ the program compare values as Constants
Maintain Conditional List Name: ODD1-5 Description: Odd Pages 1 - 5 Value: 1 3 5 Testing Values Field . . : &EMAIL Test . . : *EQ *EQ, *LT, *LE, *GT, *GE, *NE, *IN Test value (&MapField, *Attribute,Value, Value1 Value2..) ODD1-5
It similar to this case below:
Testing Values Field . . : &EMAIL Test . . : *EQ *EQ, *LT, *LE, *GT, *GE, *NE, *IN Test value (&MapField, *Attribute,Value, Value1 Value2..) 1 3 5
Spool file text and/or attribute value is entered via option 8.
iDocs SmartRouter PR0032R1 Insert Text into Spool File KKRAMER SR Engine Name/Desc. : EARNINGS1 Example Earning No.1 Application Name/Desc: EARNSRENG Earning SR Engine Form App Reference . : EARNADD Used for Emp.number add Target Name/Desc . . : HANDOFF To Handdoff OutQ Source Spool Text: Map Field : EMPLOYNO1 Or Constant From Page : Output Text To: Row 1 Column 50 Page: Map Field : EMPLOYNO2 Or Constant From Page : Output Text To: Row 1 Column 50 Page: Map Field : Or Constant From Page : Output Text To: Row Column Page: Map Field : Or Constant From Page : Output Text To: Row Column Page: F3=Exit F2=Conditionally Map F4=Prompt F5=Refresh F12=Cancel F14=Remove Text
In lieu of text, you can also insert the spool file date attribute value in the Text field. This attribute can be scrapped from the spool file and included in the output. In the “Text” field of the Smart Router Target, add *SPLFDATE into Mapped field name and it will insert spool file create date in US format MM/DD/YY (iDOCS 8.0 04/22/2024)
In addition to the spool file date (iDOCS 8.0 10/01/2024) you can add *SPLFTIME into Mapped field name and it will insert spool file create time in US format HH:MM:SS.
On iDocs 6.96 and older… Under the Insert Text function of a Smart Router Application, Conditions were universally applicable to all Mapped Fields listed under the Source Spool Text parameters.
On IDocs 6.97 and newer…
Under the Insert Text function of a Smart Router Application, Conditions are now independently applicable to each of the Mapped Fields listed under the Source Spool Text parameters.
When you put the cursor on each of the Mapped Fields and select the F2=Conditionally Map option, you will see a window to apply your condition to the specific Mapped Field.
For example, for Mapped Field MAPONE, we can have a condition in which the Mapped Field is not equal (*NE) to - - -
- - - (five dashes)
F2=Conditionally Map option on Mapped Field MAPONE displays the screen below:
iDocs SmartRouter PR0032R1 Insert Text into Spool File KKRAMER SR Engine Name/Desc. : EARNINGS1 Example Earning No.1 Application Name/Desc: EARNSRENG Earning SR Engine Form App Reference . : EARNADD Used for Emp.number add ............................................................................... : Conditionally Map Field: &EMPLOYNO1 : : : : Line# AND/OR Mapped Field Test Value : : : : 0001 *NE ----- : : 0002 : : 0003 : : More... : : : : : : : : : : : : : : : :.............................................................................:For the second Mapped Field MAPTWO, we can have a condition in which the Mapped Field is not equal (*NE) to *BLANK
iDocs SmartRouter PR0032R1 Insert Text into Spool File KKRAMER SR Engine Name/Desc. : EARNINGS1 Example Earning No.1 Application Name/Desc: EARNSRENG Earning SR Engine Form App Reference . : EARNADD Used for Emp.number add ............................................................................... : Conditionally Map Field: &EMPLOYNO2 : : : : Line# AND/OR Mapped Field Test Value : : : : 0001 *NE *BLANK : : 0002 : : 0003 : : More... : : : : : : : : : : : : : : : :.............................................................................:
On IDocs 6.97 and newer continued
F4 Prompt in the Page: field will specify where the inserted text will appear. Enter *FIRST, *LAST, *EXTB, *EXTE, *2NDLS or certain page number where text will be displayed.
Page: field parameters on the Insert Text into Spool File screen are as follows:
9/14/18 iDocs SmartRouter PR0010H1 19:42:35 SR Engine Definition Maintenance KKRAMER Type options, press enter. 2=Change 3=Copy 4=Delete 5=View 7=Rename 8=Start 9=End Opt SR Engine Description Status FORMSPLIT Formsplit *NONE FPTDEMOSR FPT Demo Smart Route *NONE JCSTMTSR JC STMT SR *NONE OFACKTEST Test Ack for Adel W *NONE OFCDASR CDA Test *NONE OFHCISTSM HCI Statement SM *NONE OFSAMPLE Orlando's Sample Eng *NONE OFSMARTENG Orlando SR Test Eng. *NONE OFWINKLER Winkler Landscape *NONE PKSLIPSR Packing Slip Smart *NONE PRNWBURST2 BURST EVERY 2 PAGES *NONE ROCKYSR Rocky Test *NONE SENTINELSR Sentinel Smt.Router *NONE More... F3=Exit F5=Refresh F6=Add
Select option 8 to start, option 9 to end. You must specify a job queue into which the engine is launched. The job queue must feed into a batch subsystem. Job queue QS36EVOKE is configured as a multi threaded job queue leading into subsystem QBATCH by default in i5/OS as shipped from IBM; this is usually a good choice. You can also use FMGJOBQ but should check that it is multi threaded first.
Versions 3.11 - 3.20:
This functionality was removed in version 3.30. See the second configuration screen.
As shipped the SmartRouter engine processes jobs serially as part of the engine thread, i.e. it invokes the Smart Routing processor using a 'CALL' command.
Because the processor opens a spool file for each possible target for each input spool file, it can quickly exhaust the maximum number of spool files in the system value QMAXSPLF. Therefore, one can configure the engine to process spool files in a separate thread using 'SBMJOB' rather than 'CALL'.
In the library PRRLOAD3 is a data area PRJOBQ. The engine loads this data area upon startup. If it is blank the engine will 'CALL' the SmartRouting processor; if it contains the name of a jobqueue it will use 'SBMJOB' to submit the Smart Routing processor to the jobqueue named in the data area. The data area must be in the engine library list. If the processor is separately invoked into a jobqueue for each input spool file each processing will start a new spool file number sequence.
Add the following entry to the schedule jobs:
SBMJOB CMD(CALL PGM(PRR0459) PARM(SRENGINE)) JOB(SRENGINE) JOBQ(QS36EVOKE)
Where:
Do not use Q as the first letter of an engine definition. Q is reserved for operating system objects.
Do not name engines names in use elsewhere on your system. Give the engine a truly unique name.
Note that the JOB parameter, specifying job name, must precisely match the Smart Router engine definition name. This is done to provide a means of recognising the engine when ending the engine from the scheduled jobs function (see below).
To end a SmartRouter engine from the job scheduler, presuming that the job name is unique on your system, add this command to the job schedule:
ENDJOB JOB(SRENGINE) OPTION(*IMMED)
where SRENGINE is the job name of the engine and name of the Smart Router engine configuration.
Warning -- job selection is by job name and if you specify this incorrectly you can shut down any job so named, including operating system jobs.
Do not use Q as the first letter of an engine definition. Q is reserved for operating system objects.
Smart Router upgrades in iDocs version 6 are part of COPYDATA, the iDocs migration utility. If upgrading from an earlier release of the standalone Smart Router follow the below instructions.
To manually upgrade the Smart Router into the version integrated into the iDocs Suite please do the following:
CPYF FROMFILE(PRRLOAD/PRDAPPLM) TOFILE(IDOCS/PRDAPPLM) FROMMBR(*FIRST) TOMBR(*FIRST) MBROPT(*REPLACE) CRTFILE(*NO) FMTOPT(*MAP *DROP)
CPYF FROMFILE(PRRLOAD/PRDCOND) TOFILE(IDOCS/PRDCOND) FROMMBR(*FIRST) TOMBR(*FIRST) MBROPT(*REPLACE) CRTFILE(*NO) FMTOPT(*MAP *DROP)
CPYF FROMFILE(PRRLOAD/PRDMASTER) TOFILE(IDOCS/PRDMASTER) FROMMBR(*FIRST) TOMBR(*FIRST) MBROPT(*REPLACE) CRTFILE(*NO) FMTOPT(*MAP *DROP)
CPYF FROMFILE(PRRLOAD/PRDOUTQUE) TOFILE(IDOCS/PRDOUTQUE) FROMMBR(*FIRST) TOMBR(*FIRST) MBROPT(*REPLACE) CRTFILE(*NO) FMTOPT(*MAP *DROP)
CPYF FROMFILE(PRRLOAD/PRDTARGET) TOFILE(IDOCS/PRDTARGET) FROMMBR(*FIRST) TOMBR(*FIRST) MBROPT(*REPLACE) CRTFILE(*NO) FMTOPT(*MAP *DROP)
DSPDTAARA DTAARA(PRRLOAD/PRJOBQ)
where JOBQUEUE is the name of a job queue from PRRLOADOLD/PRJOBQ.
CHGDTAARA DTAARA(IDOCS/PRJOBQ) VALUE('JOBQUEUE')
They are 02 commands: SAVIFDSR to save SR applications and RSTIFDSR to restore SR applications
Save Smart Router Applications (SAVIFDSR) Type choices, press Enter. Smart Router Name(s) . . . . . . __________ Name, *ALL + for more values __________ Save to file . . . . . . . . . . __________ Name Library . . . . . . . . . . . *CURLIB Name, *CURLIB Smart Router library . . . . . . *LIBL Name, *LIBL, *CURLIB Target release . . . . . . . . . *CURRENT *CURRENT, *PRV, V4R4M0...
Details of SAVIFDSR:
+ Smart Router Name(s): specify one, several or all SR applications user wants to save
+ Save to file: specify the save file where SR applications will be saved into
+ Smart Router library: specify the production library of Smart Router. The data of SR files in this library will be saved
Restore Smart Router Apps (RSTIFDSR) Type choices, press Enter. Restore from save file . . . . . __________ Name Library . . . . . . . . . . . *CURLIB Name, *CURLIB Smart Router library . . . . . . *LIBL Name, *LIBL, *CURLIB Overwrite existing application *NO *YES, *NO
Details of RSTIFDSR:
+ Restore from save file: specify the Save file contains the SR applications saved
+ Smart Router library: specify the production library of Smart Router. The SR saved applications will be restored to this library
+ Overwrite existing application: specify whether the existing applications in production library will be overwritten or not.
[ Up to Main Menu ]