You are here: Job and Form Set Rules Reference > JDT Rules Reference > BatchingByPageCountINI

BatchingByPageCountINI

Use this form set level rule to send a transaction to a specific print batch based on the number of pages the system generates when it processes the transaction.

Note The BatchingByPageCountINI rule uses the total page count regardless of recipient and not a specific recipient page count.

Syntax

;BatchingByPageCountINI;;;

You specify which transactions are assigned to the print batch using INI options in these control groups:

Control Group

Description

BatchingByRecip

The name is defined by the system, as shown here.

Print_Batches

The name is defined by the system, as shown here.

PrinterInfo

The name is defined by the system, as shown here.

Batch File Name

You define the name of this control group.

Printed Output File

You define the name of this control group.

You must have these control groups in your FSISYS.INI or FSIUSER.INI file.

BatchingByRecip control group

This control group must contain these INI options:

< BatchingByRecip >

DefaultBatch = DefaultOutput

Batch_Recip_Def =

Use the DefaultBatch option to assign a name to the default batch, such as DefaultOutput. Do not enclose the name in quotation marks.

Use the Batch_Recip_Def option to define the conditions the system will use to determine which batch it should choose for each transaction. The syntax for the Batch_Recip_Def option is shown here:

Condition; ”BatchName”; Recipient

You can define a series of these options to specify all of the conditions necessary to determine the desired batching for your transactions.

Note For a complete description of error and manual batches, see the Documaker Administration Guide.

Parameter

Description

Condition

This lets you specify a condition that must be satisfied before the transaction is assigned to the print batch and recipients. You can use the True keyword to set the condition:

True - Enter this keyword to specify that the condition must always be true. This tells the system to send the form set to the specified print batch if the recipient is specified in the recipient list for the batch.

You can also use these user-defined options instead of the keyword:

Search mask – the search mask consists of one or more offset, data pairs. See Search Criteria.

Error - if the error batch flag is set by another rule, send the form set to the specified print batch (if the form’s recipient is specified in the recipient list for the batch). For example, an error occurs if the Host Required field is set on a Move_It rule and the data is missing.

Manual - if the manual batch flag is set by another rule, send the form set to the specified print batch (if the recipient is specified in the recipient list for the batch). You could also use the KickToWip rule.

Condition name - a condition name defined in the condition table. See Appendix: Condition Tables and the Record Dictionary.

Batch Name

You can specify the batch name by specifying the recipient name, the batch name, or using a batch name defined in the Record Dictionary.

Recipient name - use the desired recipient as defined in the Application Definition setup within Documaker Studio.

Batch name - a batch name extract from the extract file. The format is a comma-delimited field: a search mask followed by a blank space and then an offset, followed by the length of name to use.

Dict( ) – a batch name defined in the Record Dictionary. Enclose this name in quotes, such as “batch1”.

Use the pipe symbol (|) to indicate separate items concatenated together, such as print1|print2.

Recipients

You can specify recipients using a keyword (All) or you can list specific recipients.

All - Enter this keyword to tell the system to use all recipients defined in the Application Definition setup within Documaker Studio.

list - a list of recipient names. If you list the names, separate each recipient with a comma or space, such as customer,agent.

The system processes the information in this order:

  1. If the conditions are met, the print batch you specified is used as the batch for the form set, provided the form set’s recipients are specified in the recipient list for the batch. In addition, the system writes the batch record for the form set to the batches for the specified recipients.
  2. If a transaction does not meet the condition for the first Batch_Recip_Def option, the system continues through the series of Batch_Recip_Def options until the condition for a Batch_Recip_Def option is met.
  3. If a transaction does not meet any of the Batch_Recip_Def criteria, the transaction is placed in the batch specified in the DefaultBatch option. If the DefaultBatch option is not defined, an error occurs. The order in which you list the Batch_Recip_Def options determines how the system determines recipient batches. Put the most likely batches first. Use the All keyword rather than listing all recipients when appropriate.

Print_Batches control group

This control group must include at least one entry for each unique batch name in the BatchingByRecip control group.

< Print_Batches >

Batch name = .\batch\page1

Option

Description

Batch name

You define the name and path for each batch file, such as .\batch\page1.

PrinterInfo control group

This control group must include an entry for each unique batch file name listed in the Print_Batches control group. This control group has the following option:

< PrinterInfo >

Printer = Page1Prt

Option

Description

Printer

You define the name for each batch file listed in the Print_Batches control group, such as Page1Prt.

BatchFileName control group

You define the name for this control group, such as Page1. You must have a BatchFileName control group for each batch name option defined in the Print_Batches control group. This control group must include at least two options. The options are shown here:

< Page1 >

Printer = (file name)

PageRange = 1,3

Option

Description

Printer

You define the name for the printed output file, such as Page1Prt.

PageRange

The minimum and maximum number of pages, separated by a comma. The example above show one as the minimum with three as the maximum.

PrintedOutputFile control group

You define the name for this control group, such as Page1Prt. This control group must include as a minimum one option. There must be a PrintedOutputFile control group for each printer option defined in each BatchFileName control group, as shown here:

< Page1Prt >

Port = .\print\page1prt.pcl

Option

Description

Port

You define the name and path for the printed output file, such as print\page1prt.pcl.

Example

This single-step processing example sends transactions to print batches based on the number of printed pages the system generated as it processed each transaction. The following INI settings and JDT rules tell the system to place the transaction form sets it generates into specific print batches and printed output files based on the page counts.

If the transaction has...

Print_Batches

Printed Output File

 

.\Batch\Page1

.\Print\Page1Prt.pcl

 

.\Batch\Pages2

.\Print\Pages2Prt.pcl

 

.\Batch\Pages4

.\Print\Pages4Prt.pcl

more the 10 pages

.\Batch\DefaultOutput

.\Print\Default.pcl

Here is an example of the AFGJOB.JDT file:

/* JDT Rules showing use of BatchingByPageCountINI rule */

<Base Rules>

;RULStandardJobProc;; Always the first job level rule;

….

;InitSetrecipCache;;;

;InitPrint;;; required to execute GenData/GenPrint as single step;

 

/* Every form set in this base uses these rules. */

<Base Form Set Rules>

;NoGenTrnTransactionProc;;first transaction level rule when not using GenTrn;

;PrintFormset;;; required to execute GenData/GenPrint as single step;

;WriteOutput;;;

;WriteNaFile;;;

;CreateRecordList;;;

;WriteRCBWithPageCount;2;;

;BatchingByPageCountINI;2;;

;ProcessQueue;;PostPaginationQueue;

;PaginateAndPropagate;;;

Here are examples of the FSISYS.INI file control groups and options:

< BatchingByRecip >

DefaultBatch = DefautOutput

Batch_Recip_Def = True;"Page1";All

Batch_Recip_Def = True;"Pages2";All

Batch_Recip_Def = True;"Pages4";All

< Print_Batches >

DefaultOutput = .\Batch\DefaultOutput

Page1 = .\Batch\Page1

Pages2 = .\Batch\Pages2

Pages4 = .\Batch\Pages4

< PrinterInfo >

Printer = DefaultOutputPrt

Printer = Page1Prt

Printer = Pages2Prt

Printer = Pages4Prt

< DefaultOutput >

Printer = DefaultOutputPrt

< Page1 >

Printer = Page1Prt

PageRange = 1,1

< Pages2 >

Printer = Pages2Prt

PageRange = 2,3

< Pages4 >

Printer = Pages4Prt

PageRange = 4,10

< DefaultOutputPrt >

Port = .\Print\DefaultOutputprt.pcl

< Page1Prt >

Port = .\Print\Page1Prt.pcl

< Pages2Prt >

Port = .\Print\Pages2Prt.pcl

< Pages4Prt >

Port = .\Print\Pages4Prt.pcl

In addition to selecting by page count, this rule also has all of the functionality of BatchingByRecipINI rule. Here is an example of how you set it up:

< BatchingByRecip >

Batch_Recip_Def = 30,5;"BATCH1";ALL

Batch_Recip_Def = 51,1;"BATCH2";ALL

Batch_Recip_Def = 30,2;"BATCH3";ALL

Batch_Recip_Def = True;"BATCH4";ALL

Batch_Recip_Def = True;"BATCH5";ALL

< Batch1 >

Printer = Printer1

PageRange = 1,9999

< Batch2 >

Printer = Printer2

PageRange = 1,9999

< Batch3 >

Printer = Printer3

PageRange = 1,9999

< Batch4 >

Printer = Printer4

PageRange = 1,6

< Batch5 >

Printer = Printer5

PageRange = 7,9999

The first Batch_Recip_Def option tells the system to place into BATCH1 all recipients which have a 5 at offset 31. If a transaction does not meet the first condition, processing continues through the INI list. Processing stops once the appropriate batch is found.

Therefore, if no condition is met by the third option, the transaction is assigned to BATCH4 or BATCH5 based on the page count. If the page count is less than seven, it is assigned to BATCH4. If the page count is sever or greater, it is assigned to BATCH5.

The order in which you list the Batch_Recip_Def options determines how the system determines recipient batches. Put the most likely batches first. Use All rather listing all recipients when appropriate.

Keep in mind that when using this rule in this manner you should always include the PageRange parameter in each group, even if the batch is not associated with page counts.

See also