Rul Book
Rul Book
Documaker
Rules Reference
version 11.3
Skywire Software, L.L.C. Phone: (U. S.) 972.377.1110
3000 Internet Boulevard (EMEA) +44 (0) 1372 366 200
Suite 200 FAX: (U. S.) 972.377.1109 Notice
TRADEMARKS
Skywire® is a registered trademark of Skywire Software, L.L.C.
Docucorp®, its products (Docucreate™, Documaker™, Docupresentment™, Docusave®, Documanage™, Poweroffice®,
Docutoolbox™, and Transall™) , and its logo are trademarks or registered trademarks of Skywire Software or its subsidiaries.
The Docucorp product modules (Commcommander™, Docuflex®, Documerge®, Docugraph™, Docusolve®, Docuword™,
Dynacomp®, DWSD™, DBL™, Freeform®, Grafxcommander™, Imagecreate™, I.R.I.S. ™, MARS/NT™, Powermapping™,
Printcommander®, Rulecommander™, Shuttle™, VLAM®, Virtual Library Access Method™, Template Technology™, and
X/HP™ are trademarks of Skywire Software or its subsidiaries.
Skywire Software (or its subsidiaries) and Mynd Corporation are joint owners of the DAP™ and Document Automation
Platform™ product trademarks.
Docuflex is based in part on the work of Jean-loup Gailly and Mark Adler.
Docuflex is based in part on the work of Sam Leffler and Silicon Graphic, Inc.
Copyright © 1988-1997 Sam Leffler.
Copyright © 1991-1997 Silicon Graphics, Inc.
Docuflex is based in part on the work of the Independent JPEG Group.
The Graphic Interchange Format© is the Copyright property of CompuServe Incorporated. GIFSM is a Service Mark property
of CompuServe Incorporated.
Docuflex is based in part on the work of Graphics Server Technologies, L.P.
Copyright © 1988-2002 Graphics Server Technologies, L.P.
All other trademarks, registered trademarks, and service marks mentioned within this publication or its associated software are
property of their respective owners.
DISCLAIMER
The contents of this publication and the computer software it represents are subject to change without notice. Publication of
this manual is not a commitment by Skywire Software or its subsidiaries to provide the features described. Neither Skywire
Software nor it subsidiaries assume responsibility or liability for errors that may appear herein. Skywire Software and its
subsidiaries reserve the right to revise this publication and to make changes in it from time to time without obligation of
Skywire Software or its subsidiaries to notify any person or organization of such revision or changes.
The screens and other illustrations in this publication are meant to be representative, not exact duplicates, of those that appear
on your monitor or printer.
Contents
Chapter 1, Introduction
2 Rules Overview
3 Types of Rules
iii
69 BuildExcludeList
70 BuildFormList
71 BuildMasterFormList
72 CheckZeroFontID
73 ConvertWIP
74 CreateGlbVar
75 CreateRecordList
76 DelExtRecords
77 Dictionary
78 DocumentExport
78 Defining Export Options
78 Defining the Export Record
80 Format Flags
81 Defining the Export Record Header
81 Date Formats
84 Freeform Formats
86 Using Locale Information
86 Format Specification Flags
88 DumpExtList
89 DumpExtractListToFile
90 ErrorHandler
91 Ext2GVM
92 FilterForm
94 FilterRecip
96 ForceNoImages
97 FormDescription
101 GetCo
102 GetLOB
103 GetRCBRec
104 GetRunDate
105 GVM2GVM
106 IfRecipUsed
107 ImageMapImportData
109 ImportExtract
114 ImportFile
119 ImportNAPOLExtract
124 ImportNAPOLFile
128 ImportXMLExtract
iv
132 ImportXMLFile
134 Using the TF Option
134 Using the File Option
135 Using the INI Option
135 Using the SCH Option
136 Using the GVM Option
137 XML File Format
138
139 InitArchive
140 InitConvertWIP
141 InitMerge
142 InitOvFlw
143 InitPageBatchedJob
144 InitPrint
145 InitSetRecipCache
146 InlineImagesAndBitmaps
147 InsNaHdr
148 InstallCommentLineCallback
149 JobInit1
150 LoadDDTDefs
151 LoadExtractData
152 LoadFormsetFromArchive
154 LoadListFromTable
155 LoadRcpTbl
156 LoadTblFiles
157 LoadTextTbl
158 MergeAFP
159 MergeRecipsFromForm
160 MergeWIP
164 MultipleDataDictionaryFiles
166 NoGenTrnTransactionProc
167 OMRMarks
171 PageBatchStage1InitTerm
172 PaginateAndPropagate
174 ParseComment
175 PostTransDAL
177 PreTransDAL
179 PrintData
v
180 PrintFormset
182 ProcessQueue
183 ProcessRecord
184 ProcessTriggers
185 PXCandidateList
185 INI Options
187 PXTrigger
189 Input Tables
190 The Policy Xpress FED Processing Flow
192 RegionalDateProcess
195 ReplaceNoOpFunc
196 ResetDocSetNames
197 ResetOvFlw
198 RestartJob rule
199 RULCheckTransaction
200 RULNestedOverFlowProc
204 RULStandardFieldProc
205 RULStandardImageProc
206 RULStandardJobProc
207 RULStandardTransactionProc
208 RULTestTransaction
209 RunSetRcpTbl
210 RunTriggers
211 RunUser
212 ServerFilterFormRecipient
214 ServerJobProc
217 SetErrHdr
218 SetOutputFromExtrFile
221 SetOverflowPaperTray
224 SetOvFlwSym
225 SetRecipCopyCount
226 SetRecipCopyCount2
227 SortBatches
227 Specifying Key fields
228 Sorting with a Single Key
228 Sorting with Multiple Keys
229 INI Options
230 Replacement Strings
vi
233 StandardFieldProc
234 StandardImageProc
235 TicketJobProc
236 TranslateErrors
237 UpdatePOLFile
238 UseXMLExtract
239 Mapping Fields
240 Overflow in XML
241 WIPFieldProc
242 WIPImageProc
243 WIPTransactions
245 WriteNAFile
246 WriteOutput
247 WriteRCBFiles
248 WriteRCBWithPageCount
250 XMLFileExtract
251 Mapping Fields
252 Overflow in XML
vii
273 Assigning a Rule
275 Displaying Rule Reports
275 Image Report
275 View Rules Report
276 View Compare Report
viii
336 CreateSubExtractList
338 DAL
340 DateDiff
342 DateFmt
345 DeleteDefaultSeriesData
346 DelImageOccur
347 DontPrintAlone
348 EjectPage
349 FfSysDte
351 Field2GVM
353 FieldVarsToChartSeries
355 FmtDate
356 FmtNum
358 GlobalFld
361 GroupBegin
361 Using the Box Function
362 Using the GroupPagination Function
364 Using the List Function
364 Using the StayTogether Function
365 Using the Column Function
373 GroupEnd
374 HardExst
378 If
380 Examples
384 IncOvSym
385 JustFld
390 KickToWip
391 Suppressing Warning Messages
392 LookUp
394 MapFromImportData
397 Master
398 MessageFromExtr
399 Creating Messages
402 Using the Record Dictionary
406 Mk_Hard
408 MNumExt
411 Move_It
416 MoveExt
ix
418 MoveMeToPage
419 MoveNum
427 MoveSum
429 MovTbl
431 NoOpFunc
433 OvActPrint
435 OvPrint
437 PaginateBeforeThisImage
438 PostImageDAL
440 PowType
441 Suppressing Warning Messages
442 PreImageDAL
444 PrintIf
446 PrtIfNum
449 PurgeChartSeries
450 RemoveWhiteSpace
452 ResetImageDimensions
454 ResetOvSym
455 SetGroupOptions
456 RunDate
459 SAPMove_It
461 SetAddr
464 SetAddr2
467 SetAddr3
470 SetCpyTo
471 SetCustChartAxisLabels
473 SetImageDimensions
474 SetOrigin
478 SetOriginI
480 SetOriginM
482 SetRecipFromImage
484 SetState
486 SpanAndFill
488 StrngFmt
490 SysDate
492 TblLkUp
494 TblText
x
496 TerSubstitute
499 TextMergeParagraph
500 UnderlineField
501 XDB
504 XDD
519 Index
xi
xii
Chapter 1
Introduction
Welcome to the Rules Reference for Documaker
Server. This guide serves as a reference to the various
rules you can use to control how the system handles
jobs, form sets, sections (images), and fields.
This chapter discusses the following topics:
1
Chapter 1
Introduction
RULES OVERVIEW You can use rules to control how information is merged onto forms, how that
information is then processed, and how the information and those forms are output.
This guide serves as a reference to those rules.
Documaker Server uses resources you create using Documaker Studio or the older
tool, Image Editor, to process information and forms. This processing includes merging
external data onto forms, processing data according to rules you set up, creating print-
ready files, archiving data and forms, and, if applicable, sending incomplete forms to
Documaker Workstation for completion by a user.
Forms can be completed using Documaker Workstation when user input is required or,
if all of your information can be extracted from external data sources, Documaker
Server can be set up to process forms without requiring user input.
Documaker Server can create print-ready files for a variety of printer languages
including AFP, PostScript, PCL, and Xerox Metacode printers. In addition, using Oracle
Insurance’s Internet Document Server, the system can produce output in Adobe
Acrobat PDF format.
2
Types of Rules
TYPES OF RULES The GenData program processes these types of rules, based on this hierarchy:
NOTE: Only memory limits the number of rules you can add to a section, however,
having a large number of forms associated with a single section can be difficult
to maintain.
3
Chapter 1
Introduction
4
Chapter 2
Adding Job and Form Set
Rules
Job and form set rules help you control how a
processing job is run and how the system processes
the various form sets.
The rules which apply to the job and form set are
stored in the AFGJOB.JDT file, which is called the job
definition table, or JDT file. You add these rules directly
into that file using a text editor.
In this chapter you will find information about:
5
Chapter 2
Adding Job and Form Set Rules
USING THE JOB The rules which apply to the job and form set are stored in the job definition table,
which is called the AFGJOB.JDT or JDT file. You edit this file using a text editor. When
DEFINITION TABLE editing the AFGJOB.JDT file, you can use these types of delimiters:
The base system uses the rules in the JDT file when you run the main batch system
programs (GenTrn, GenData, GenPrint, GenWIP, and GenArc). You can run these
programs several ways:
• Multi-step processing
• Single-step processing
• WIP transaction processing
For multi-step processing, you run each program separately. With single-step
processing, you run the GenData program using rules to perform the tasks handled by
the GenTrn and GenPrint programs. The AFGJOB.JDT files differ for each approach.
Examples of each approach follow.
WIP transaction processing lets you add or merge WIP transactions manually approved
or rejected into a GenData processing run. These transactions can be processed as new
transactions or appended to an master resource library (MRL) already processed by the
GenData program.
MULTI-STEP PROCESSING
Multi-step processing lets you run each batch system program in turn and check the
log and error messages after each step. You can learn more about the system flow and
the input and output files for each processing step in Chapter 2 of the Documaker
Server System Reference.
6
Using the Job Definition Table
;SetErrHdr;;*:------------------------------------------------;
;CreateGlbVar;;TXTLst,PVOID;
;CreateGlbVar;;TblLstH,PVOID;
;JobInit1;;;
;LoadDDTDefs;;;
;InitOvFlw;;;
;LoadTextTbl;;;
;LoadTblFiles;;;
;SetOvFlwSym;;CGDECBDOVF,QGDCBD,1;
;BuildMasterFormList;;4;
Every form set in the base system uses these form set level rules:
<Base Form Set Rules>
;RULStandardTransactionProc;;Always the first transaction level
rule;
;LoadExtractData;;;
;GetCo;;11,HEADERREC 35,3;
;GetLOB;;11,HEADERREC 40,3;
;ResetOvFlw;;;
;IfRecipUsed;;BATCH1=INSURED;
;IfRecipUsed;;BATCH2=COMPANY;
;IfRecipUsed;;BATCH3=AGENT;
;BuildFormList;;;
;LoadRcpTbl;;;
;UpdatePOLFile;;;
;RunSetRcpTbl;;;
Every image in the base system uses these image level rules:
<Base Image Rules>
;RULStandardImageProc;;Always the first image level rule;
;InsNAHdr;;;
SINGLE-STEP PROCESSING
To enhance performance, you can combine the execution and functionality of the
GenTrn and GenData steps into a single step. Combining these steps enhances
performance by reducing the number of times files have to be opened and closed
during processing. For more information, see Chapter 2 of the Documaker Server
System Reference.
To combine the GenTrn and GenData steps, you place the NoGenTrnTransactionProc
rule in under the <Base Form Set Rules> header in your AFGJOB.JDT file, along with
several other rules. To then combine the GenData and GenPrint steps, add the
following rule under the <Base Rules> header in your AFGJOB.JDT file:
;InitPrint;;;
and add this rule below the <Base Form Set Rules> header in your AFGJOB.JDT file:
;PrintFormset;;;
To use single-step processing, change the TrnFile option in the FSISYS.INI file to NUL,
as shown below:
7
Chapter 2
Adding Job and Form Set Rules
Single-step processing When you use single-step processing, where the GenData program runs the GenTrn
AFGJOB.JDT file and GenPrint processes as a single step, you use the following AFGJOB.JDT file. This file
is also called the performance mode JDT file:
<Base Rules>
;RULStandardJobProc;1;Always the first job level rule;
;SetErrHdr;;*:------------------------------------------------;
;SetErrHdr;;*: FormMaker Data Generation (Base);
;SetErrHdr;;*: ;
;SetErrHdr;;***: Transaction: ***ACCOUNTNUM***;
;SetErrHdr;;***: Company Name (after ini conversion): ***Company***;
;SetErrHdr;;***: Line of Business (after ini conversion): ***LOB***;
;SetErrHdr;;***: Run Date: ***RunDate***;
;SetErrHdr;;*:------------------------------------------------;
;JobInit1;;;
;CreateGlbVar;;TXTLst,PVOID;
;CreateGlbVar;;TblLstH,PVOID;
;InitOvFlw;;;
;SetOvFlwSym;;SUBGROUPOVF,SUBGROUP,5;
;BuildMasterFormList;;4;
;PageBatchStage1InitTerm;;;
;InitSetrecipCache;;;
/* the following is required to run GenData/GenPrint as single
step.*/
;InitPrint;;;
Every form set in the base system uses these form set level rules:
<Base Form Set Rules>
;NoGenTrnTransactionProc;;First transaction level rule when omitting
GenTrn;
;ResetOvFlw;;;
;BuildFormList;;;
;LoadRcpTbl;;;
;RunSetRcpTbl;;;
/* the following is required to run GenData/GenPrint as single
step.*/
;PrintFormset;;;
;WriteOutput;;;
;WriteNaFile;;;
;WriteRCBWithPageCount;;;
;ProcessQueue;;PostPaginationQueue;
;PaginateAndPropagate;;;
;BatchingByRecipINI;;;
Every image in the base system uses this image level rule:
<Base Image Rules>
;StandardImageProc;;Always the first image level rule;
8
Using the Job Definition Table
Every field in the base system uses this field level rule:
<Base Field Rules>
;StandardFieldProc;;Always the first field level rule;
• Executing the GenWIP program after the GenData program to process the
transactions in the manual batch. Then using Documaker Workstation to:
Manually view a transaction and update any required data. Then use the WIP,
Save option to save the transaction with a status code such as: Approved or
Accepted.
Manually view a transaction and then use the WIP, Save option to save the
transaction with a status code of Rejected.
Manually view a transaction, update any required data, and save the
transaction using the File, Complete, Batch Print option. This assigns a Batch
Print status code to the transaction.
• Creating a new transaction using Documaker Workstation and then using the WIP,
Save or File, Complete, Batch Print option to save it with a status code such as
Approved, Accepted, or Rejected.
You can then process these transactions as:
• New transactions
• Transactions appended to an existing MRL recipient batch, NewTrn, NA, and POL
files created by a prior run of the GenData program
GenData WIP Transaction Processing creates new recipient batch, NewTrn, NA, and
POL files which you can print, archive, or both using the GenPrint and/or GenArc
programs.
To do this, you execute the GenData program using a simplified AFGJOB.JDT file that
contains rules to replace the existing form set, image, and field rules. In addition, you
must add two rules.
Here is a list of the rules used for GenData WIP Transaction Processing. All of these
rules are required in the simplified AFGJOB.JDT file.
Rule Description
MergeWIP on This job level rule initializes WIP Transaction Processing and
page 160 specifies the status codes for the transactions added or appended
to a newly-created NA and POL list.
9
Chapter 2
Adding Job and Form Set Rules
Rule Description
GVM2GVM on This form set rule to copies GVM variable data from the WIP.DBF file
page 105 into GVM variables needed by the GenData program. Use the
Trigger2WIP control group options to define GVM variable names
NOTE: All WIP file transactions added to the transaction memory list by the MergeWIP
rule are deleted from the WIP file after processing. You can remove specific
transaction types, such as Rejected, by including the status code in the
parameters for the MergeWIP rule and omitting it in the parameters for the
WIPTransactions rule.
• Address information or other field level information to the batch record, which is
typically unique for each recipient.
• Recipient information that is not handled by normal field mapping from the
transaction DFD to the recipient batch DFD.
• Cumulative or calculated information not available until the document is nearly
completed.
Understanding the System Before this feature was implemented in version 10.2, the recipient batch records were
identical except for the recipient code field which contains a unique identifier assigned
to a given recipient. If additional recipient data was required, you had to write a custom
rule.
Use the options in the RecipMap2GVM control group to set up this capability. Data that
can be added to the recipient batch record can be:
10
Using the Job Definition Table
Option Description
Image Enter the name of the image. You can also enter an image name root.
An image name root is the first part of a name. For instance, MAILER is the root
name for images with names such as MAILER A, MAILER_B, or MAILERS.
Suppressing Use the WarnOnLocate option to suppress the following warning message from the
RCBMapFromINI function RCBMapFromINI function:
warning messages
Cannot locate image root named/image
Here is an example:
< RecipMap2GVM >
WarnOnLocate = No
Option Description
WarnOnLocate Enter No if you want to suppress this warning message from the
RCBMapFromINI function:
Cannot locate image root named/image
The default is Yes.
Optional formatting You can add optional formatting information as a parameter of the Opt INI option. This
information formatting information is comprised of four items separated by commas.
Item Description
11
Chapter 2
Adding Job and Form Set Rules
Item Description
Input format mask Date - see the FmtDate rule in the Rules Reference.
Number – see the FmtNum rule in the Rules Reference.
Output format mask Date - see the FmtDate rule in the Rules Reference.
Number – see the FmtNum rule in the Rules Reference.
This converts an input date, mmddyyyy, into month name dd, yyyy, such as February
17, 2009.
n, nCAD, nUSD, “$zzz,zz9.99”
This converts an input numeric value in Canadian French format into a value in United
States format.
Keep in mind...
• For the Req option, if the data is missing an error occurs and the transaction is
send to the error batch.
• For the Opt option, if the data is missing the system stores an empty string in the
GVM variable.
• A RCB GVM variable cannot be restored to its original or default value after it has
been changed using this method.
• Any RCB GVM variable not assigned using this method retains the value originally
set during the transaction processing.
• Some RCB GVM variables should never be changed using this mapping technique.
These include:
TRN_Offset
NA_Offset
POL_Offset
• If the image defined in the Image option in the RecipMap2GVM control group does
not name an image, the feature is disabled for all transactions.
• If the image defined in the Image option is missing from the form set being
processed, the GVM data is not changed. Depending on where the GVM data is
mapped, this could mean data from the prior transaction will still be in the GVM
variables.
• If there are multiple images with the same name in the form set, the form specified
in the Form option is used to identify the image to use. If the Form option is
omitted, the first image found in the current form set is used.
• The system assumes the specified image contains all of the unique data except for
a constant value or data gathered from an INI built-in function.
12
Using the Job Definition Table
• If more than one recipient is assigned to the image, all recipient batch records
receive the same added data.
Example This example creates a mailer cover page for each insured, agent, and/or company
recipient per transaction. The cover page is created using banner page processing
which occurs during GenPrint processing. Examples of the three different mailer cover
pages are as follows.
Suzy Smith
Jill Smith
• Agent and company recipient batch files are sorted (agent number and company
name, respectively) before the GenPrint program runs. This sorting allows for the
creation of only one mailer cover page per unique agent and company.
• Unique information is contained on the form/image, Dec Page/Q1MDC1.
13
Chapter 2
Adding Job and Form Set Rules
BeginSub PreTrans
last_agent_id = last_agent_id
If Trim(RecipName()) = "AGENT" Then
If last_agent_id != Trim(GVM("AgentID")) Then
last_agent_id = Trim(GVM("AgentID"))
SetGVM("NameA" ,GVM("AgentName") ,,"C",41)
SetGVM("NameB" ,GVM("OfficeAddress") ,,"C",41)
SetGVM("AddressA" ,GVM("TownandState") ,,"C",41)
GoTo exit:
Else
14
Using the Job Definition Table
SuppressBanner()
GoTo exit :
End
End
last_company_name = last_company_name
If Trim(RecipName()) = "COMPANY" Then
If Trim(GVM("Company")) != last_company_name Then
last_company_name = Trim(GVM("Company"))
If Trim(GVM("Company")) = "SAMPCO" Then;
SetGVM("NameA" ,"Sampco, Inc." ,,"C",41)
SetGVM("NameB" ,"316 N.E. 3rd Avenue" ,,"C",41)
SetGVM("AddressA" ,"Pompano Beach, FL 33333" ,,"C",41)
GoTo exit:
ElseIf Trim(GVM("Company")) = "FSI"
SetGVM("NameA" ,"FSI Inc." ,,"C",41)
SetGVM("NameB" ,"222 Newbury St." ,,"C",41)
SetGVM("AddressA" ,"Northwest City, FL 99999" ,,"C",41)
GoTo exit:
End
Else
SuppressBanner()
GoTo exit:
End
End
exit:
EndSub
BeginSub PstTrans
EndSub
15
Chapter 2
Adding Job and Form Set Rules
The RCBDFDFL.DAT file contains the following GVM variable definitions which are
defined in the RecipMap2GVM control group:
• Name1
• Name2
• Address1
• Address2
• CityCounty
• AgentName
• AgentID
• OfficeAddress
• TownAndState
Here are two recipient batch records from this example:
SAMPCOLB12234567SCOM1FLT1 B2199802232234567890 0 22560
******001 3724 452Jill Smith Morris
11111 Oak Circle Suite 999 Smyrna,
FL 12345 Martin Short Agent 963 Main Street,
Suite 1250 Miami, FL 30202
Also assume the first two examples have the following INI options defined in the
FSISYS.INI or FSIUSER INI file.
These options define the recipient batch names:
< Print_Batches >
Insured = .\batch\Insured
Agent = .\batch\Agent
Company = .\batch\Company
16
Using the Job Definition Table
These options define the output printer names for each recipient batch. You must have
a control group for each recipient batch.
< Insured >
Printer = InsuredPrt
< Agent >
Printer = AgentPrt
< Company >
Printer = CompanyPrt
These options define the print-ready output file name for each recipient name:
< InsuredPrt >
Port = .\Print\Insured.PCL
< AgentPrt >
Port = .\Print\Agent.PCL
< CompanyPrt >
Port = .\Print\Company.PCL
Using the IfRecipUsed You run the GenData program using a simplified AFGJOB.JDT file which contains an
rule IfRecipUsed rule for each recipient. This example places print-ready output for each
recipient in the following files:
Insured INSURE.PCL
Agent AGENT.PCL
Company COMPANY.PCL
Transactions with status codes defined in the WIPTransactions rule are appended to an
existing MRL recipient batch, NewTrn, NA, and POL files or are appended to newly-
created recipient batch, NewTrn, NA, and POL files. These files can be printed, archived,
or both using the GenPrint and GenArc programs.
All transactions with a Rejected or an Approved status code are deleted from the WIP
file. Here is an example of the AFGJOB.JDT file. Note that the Rejected status code is
omitted from the WIPTransactions rule.
<Base Rules>
;RulStandardJobProc;;;
;MergeWIP;;Approved,Rejected;
;JobInit1;;;
<Base Form Set Rules>
;WIPTransactions;;Approved;
;GVM2GVM;;Trigger2WIP;
;IfRecipUsed;;Batch1=Insured;
;IfRecipUsed;;Batch2=Company;
;IfRecipUsed;;Batch3=Agent;
;UpdatePOLFile;;;
<Base Image Rules>
17
Chapter 2
Adding Job and Form Set Rules
;WIPImageProc;;;
<Base Field Rules>
;WIPFieldProc;;;
Using the You run the GenData program using a simplified AFGJOB.JDT file which contains the
BatchingByRecipINI rule BatchingByRecipINI rule. The BatchingByRecip control group contains an option for
each recipient. Define this control group in the FSISYS.INI or FSIUSER.INI file. This
example places print-ready output for each recipient in the following files:
Insured INSURE.PCL
Agent AGENT.PCL
Company COMPANY.PCL
Transactions with status codes defined in the WIPTransactions rule are appended to an
existing MRL recipient batch, NewTrn, NA, and POL files or are appended to newly-
created recipient batch, NewTrn, NA, and POL files. These files can be printed, archived,
or both using the GenPrint and GenArc programs.
All transactions with a Rejected or Batch Print status code are deleted from the WIP file.
Here is an example of the AFGJOB.JDT file. Note that the Rejected status code is omitted
from the WIPTransactions rule.
<Base Rules>
;RULStandardJobProc;1;;;
;JobInit1;;;
;MergeWIP;;BatchPrint,Rejected;
;InitSetrecipCache;;;
<Base Form Set Rules>
;WIPTransactions;;BatchPrint;
;WriteOutput;;;
;WriteNaFile;;;
;BatchingByRecipINI;;;
<Base Image Rules>
;WIPImageProc;;;
<Base Field Rules>
;WIPFieldProc;;;
Using the You run the GenData program using a simplified AFGJOB.JDT file which contains the
BatchingByPageCountINI BatchingByPageCountINI rule. The BatchingByRecip control group contains an option
rule for each recipient. Define this control group in the FSISYS.INI or FSIUSER.INI file.
This example places print-ready output for each recipient into the following files based
on the number of pages in each transaction processed.
File Description
18
Using the Job Definition Table
File Description
Transactions with status codes defined in the WIPTransactions rule are appended to an
existing MRL recipient batch, NewTrn, NA, and POL files or are appended to newly-
created recipient batch, NewTrn, NA, and POL files. These files can be printed, archived,
or both using the GenPrint and GenArc programs.
All transactions with a Rejected or Batch Print status code are deleted from the WIP file.
Here is an example of the AFGJOB.JDT file. Note that the Rejected status code is omitted
from the WIPTransactions rule.
<Base Rules>
;RulStandardJobProc;;;
JobInit1;;;
;MergeWIP;;BatchPrint,Rejected;
;InitSetrecipCache;;;
<Base Form Set Rules>
;WIPTransactions;;BatchPrint;
;GVM2GVM;;Trigger2WIP;
;WriteOutput;;;
;WriteNaFile;;;
;BatchingByPageCountINI;;;
;WriteRCBWithPageCount;;;
;ProcessQueue;;PostPaginationQueue;
;PaginateAndPropagate;;;
<Base Image Rules>
;WIPImageProc;;;
<Base Field Rules>
;WIPFieldProc;;;
Here are the INI options used with the BatchingByPageCountINI rule:
< BatchingByRecip >
DefaultBatch = Default
Batch_Recip_Def= True;"InsOver3";Insured
Batch_Recip_Def= True;"InsUndr4";Insured
Batch_Recip_Def= True;"AgiOver3";AddLinsd
Batch_Recip_Def= True;"AgiUndr4";AddLinsd
Batch_Recip_Def= True;"CtrOver3";CertHld
Batch_Recip_Def= True;"CrtUndr4";CertHld
< Print_Batches >
InsOver3 = .\batch\InsOver3
InsUndr4 = .\batch\InsUndr4
AgiOver3 = .\batch\AgiOver3
AgiUndr4 = .\batch\AgiUndr4
CtrOver3 = .\batch\CtrOver3
CtrUndr3 = .\batch\CtrUndr4
19
Chapter 2
Adding Job and Form Set Rules
Default = .\batch\Default
< PrinterInfo >
Printer = InsOver3Prt
Printer = InsUndr4Prt
Printer = AgiOver3Prt
Printer = AgiUndr4Prt
Printer = CtrOver3Prt
Printer = CrtUndr4Prt
Printer = DefaultPrt
< InsOver3 >
Printer = InsOver3Prt
PageRange = 4,999
< InsUndr4 >
Printer = InsUndr4Prt
PageRange = 1,3
< AgiOver3 >
Printer = AgiOver3Prt
PageRange = 4,999
< AgiUndr4 >
Printer = AgiUndr4Prt
PageRange = 1,3
< CtrOver3 >
Printer = CtrOver3Prt
PageRange = 4,999
< CrtUndr4 >
Printer = CrtUndr4Prt
PageRange = 1,3
< Default >
Printer = DefaultPrt
< InsOver3Prt >
Port = .\Print\InsOver3.PCL
< InsUndr4Prt >
Port = .\Print\InsUndr4.PCL
< AgiOver3Prt >
Port = .\Print\AgiOver3.PCL
< AgiUndr4Prt >
Port = .\Print\AgiUndr4.PCL
< CtrOver3Prt >
Port = .\Print\CtrOver3.PCL
< CrtUndr4Prt >
Port = .\Print\CrtUndr4.PCL
< DefaultPrt >
Port = .\Print\Default.PCL
20
Processing Import Files
PROCESSING The GenData program can import and process these types of export files created by
Documaker Workstation:
IMPORT FILES
• Standard export
• WIP/NA/POL export
• XML export
The transactions exported to a file can be created by:
• Executing the GenWIP program after the GenData program to process any
transactions in the manual batch. You then use Documaker Workstation to view
the transaction and update any required data. Finally, you use the File, Complete,
Export Data option to create the export file.
• Creating a transaction using Documaker Workstation. You then use the File,
Complete, Export Data option to create the export file.
• Creating a transaction using iPPS.
You can then process the export files as a:
NOTE: Create a separate AFGJOB.JDT file for this process, instead of updating an
existing one by commenting out rules and adding new one.
21
Chapter 2
Adding Job and Form Set Rules
Using Documaker Server You run the GenData program using an extract file and then execute the GenWIP
program to process any transactions in manual batch. These transactions are then
added to the WIP file.
Extract
file GenData GenWIP
Documaker
Workstation
WIP
Export
GenData file
GenPrint GenArc
NOTE: Transactions in the manual batch file were placed there because they were
flagged to go to manual batch, missing required field data, or were flagged as
KickToWIP.
You then open the WIP transactions using Documaker Workstation, make necessary
changes, and use the File, Complete, Export File option to create the export file.
After you finish, you run GenData Import File Processing using simplified AFGJOB.JDT
and INI files. Using the export file as an import file, the GenData program then creates
new recipient batch, NewTrn, NA, and POL files which you can print, archive, or both
using the GenPrint and GenArc programs.
22
Processing Import Files
Using Documaker You create new transactions using Documaker Workstation and then use the File,
Workstation Complete, Export File option to create the export file.
Documaker
Workstation
Export
file GenData
GenPrint GenArc
You then use GenData Import File Processing to create new recipient batch, NewTrn,
NA, and POL files. These files can be printed, archived, or both using the GenPrint and
GenArc programs.
Using iPPS You create a transaction using iPPS that is then processed by GenData Import File
Processing to produce PDF files. These files can be viewed on-line and printed.
iPPS
Export
file GenData
GenPrint GenArc
23
Chapter 2
Adding Job and Form Set Rules
RULES USED IN Specific rules are used to combine the execution and functionality of the GenTrn,
GenData, and GenPrint programs into a single step. These rules are listed below, with
SINGLE-STEP a brief description.
PROCESSING
NOTE: You can find more information, including a detailed description of how
processing occurs, in Chapter 2 of the Documaker Server System Reference.
Rule Description
BuildMasterFormList on Use this rule to load the FORM.DAT file into an internal
page 71 linked list within the GenData program. You must include
this rule in the AFGJOB.JDT file because the RunSetRcpTbl
rule is dependent on the list this rule creates.
InitPrint on page 144 Use this rule to load printer and recipient batch information.
This rule sets up PRTLIB data, initializes print options, and
loads a table which contains page totals for recipient batch
files.
Use this rule when you run the GenData program by itself to
execute GenTrn and GenPrint processes. This rule, when
combined with the PrintFormset rule, prints form sets.
InitSetRecipCache on Use this rule to set the cache the system uses to store
page 145 recipient information in memory. With this rule you can tell
the system the amount of memory to set aside and use for
storing information in the Key1 and Key2 fields, often used
to store the company and line of business.
NoGenTrnTransactionPr Use this rule when you use the GenData program by itself to
oc on page 166 execute the GenTrn and GenData steps. When combined
with the InitPrint and PrintFormset rules, it creates the
output files created during the GenPrint step.
PageBatchStage1InitTerm Use this rule to create and populate a list of records which
on page 171 contain page ranges and total page counts for each
recipient batch file.
PaginateAndPropagate on Use this rule to paginate the form set and merge in or
page 172 propagate field data.
PrintFormset on page Use this rule when you run the GenData program by itself to
180 execute GenTrn and GenPrint processes. This rule, when
combined with the InitPrint rule, prints form sets.
24
Rules Used in Single-Step Processing
Rule Description
ProcessQueue on page Use this rule to process the queue you specify. This rule
182 loops through the list of functions for the queue you specify
and then frees the queue when finished.
StandardFieldProc on This rule tells the system to process each field on all of the
page 233 images triggered by the SETRCPTB.DAT file. If you use the
StandardFieldProc rule is in your JDT, you must also include
the WriteNAFile rule.
StandardImageProc on This rule tells the system to process each image triggered
page 234 by the SETRCPTB.DAT file.
WriteNAFile on page 245 Use this rule to append the NAFILE.DAT file data records for
the current form set into an existing NAFILE.DAT file.
WriteOutput on page 246 Use this rule to create the POLFILE.DAT file.
WriteRCBWithPageCount Use this rule to write page counts for each recipient.
on page 248
25
Chapter 2
Adding Job and Form Set Rules
RULES USED FOR The following descriptions will help familiarize you with the rules that are required to
perform the 2-up printing process. All of the rules listed in the topic, Rules Used in
2-UP PRINTING Single-Step Processing on page 24 are required for 2-up printing, plus the additional
rules listed below.
NOTE: You can find more information, including a detailed description of how
processing occurs, in Chapter 2 of the Documaker Server System Reference.
Here’s a list of the additional rules you can use for 2-up printing.
Rule Description
AddLine on page 36 (Optional) Use this form set level (level 2) rule to add a line
record, such as for OMR marks, to the AFP record list built by
the MergeAFP rule.
AddTextLabel on page (Optional) Use this form set level (level 2) rule to add a text
37 label record to the AFP record list built by the MergeAFP rule.
GetRCBRec on page 103 Use this form set (level 2) level rule to set the current recipient
batch file. This rule initializes the current recipient batch file, if
necessary.
InitMerge on page 141 Use this job level (level 1) rule to create a list of printers,
batches, and buffers for the comment (RCB) records. This rule
also creates a list to hold AFP records and AFP fonts.
InitPageBatchedJob on Use this job level (level 1) rule to open NA and POL files.
page 143
MergeAFP on page 158 Use this form set level (level 2) rule to initialize input files. This
rule populates the AFP record list, retrieves comment (RCB)
records, and terminates the input files.
OMRMarks on page 167 (Optional) Use this job level (level 1) rule to generate OMR
marks on 2-up documents printed on any AFP printer that
supports 2-up printing.
ParseComment on page (Optional) Use this form set level (level 2) rule to parse
174 comment records into the GVM variable.
PrintData on page 179 Use this form set (level 2) rule to print the form set. This rule is
used for handling 2-up printing on AFP and compatible
printers.
ProcessRecord on page Use this form set (level 2) rule to switch between print files as
183 necessary when printing 2-up forms on an AFP printer. This
rule updates the page count for current print file and loads and
merges the form set.
26
Chapter 3
Job and Form Set Rules
Reference
Job and form set rules help you control how a
processing job is run and how the system processes
the various form sets.
The rules which apply to the job and form set are
stored in the AFGJOB.JDT file, which is called the job
definition table, or JDT file. You add these rules directly
into that file using a text editor.
27
Chapter 3
Job and Form Set Rules Reference
JDT RULES The following pages list and explain the various job and form set rules you can use. The
rules are discussed in alphabetical order on the pages following this table.
REFERENCE The following table lists the rules by function in the first column. The Level column
indicates whether the rule is a job level rule (1) or a form set level rule (2) in the
AFGJOB.JDT file.
The Overflow column indicates the rules which support the overflow feature. The
overflow features allow extract data to flow onto an additional page if needed.
28
JDT Rules Reference
29
Chapter 3
Job and Form Set Rules Reference
30
JDT Rules Reference
31
Chapter 3
Job and Form Set Rules Reference
32
JDT Rules Reference
33
Chapter 3
Job and Form Set Rules Reference
34
JDT Rules Reference
35
Chapter 3
Job and Form Set Rules Reference
AddLine
Use this form set level (level 2) rule to add a line record, such as for OMR marks, to the
AFP record list built by the MergeAFP rule.
Syntax ;AddLine;;Top,Bottom,Left,Right;
Parameter Description
NOTE: The parameter values are all in absolute FAP coordinates. No shifting is done,
which lets you place the marks anywhere on the printable area of the paper.
Example ;AddLine;;600,1200,600,1000;
This example tells the system to draw a line ¼ inch from the left edge of the page, down
¼ inch from the top of the page, for a length of ½ inch, with a width of a ¼ inch.
36
AddTextLabel
AddTextLabel
Use this form set level (level 2) rule to add a text label record to the AFP record list built
by the MergeAFP rule. This rule is used in 2-up printing.
Syntax ;AddTextLabel;;Text,XPos,YPos,Orientation,Font;
Parameter Description
Orientation The optional text rotation (0, 90, 180, or 270 degrees).
Font The AFP code font file name of the font to be used.
Make sure the font has been defined in the font cross-reference (FXR) file
and the font has already been used in a field, text label, or text area on that
form set.
In some situations, you may want to add a hidden field which uses the font
you specify in this parameter of the AddTextLabel rule.
NOTE: Enter the XPos and YPos values in absolute FAP coordinates. No shifting
occurs, which lets you place the marks anywhere on the printable area of the
paper.
Example ;AddTextLabel;;Preliminary,600,600,90,X0DACOBF;
This example tells the system to write the text, Preliminary, on each page beginning ¼
inch down from top of page and ¼ inch in from the left page edge. The system rotates
the text 90 degrees and uses Courier bold 16 pitch as the font.
Here is another example:
;AddTextLabel;;=DAL("page_1.dal"),5740,4500,0,X0DATIN9;
;AddTextLabel;;=DAL("page_1_barcode"),1800,35200,90,X0BC4N9P;
These rules tell the system to execute the DAL script named page_1 to get the dynamic
data that will be placed on each page beginning 4500 FAP units down from top of the
page and 5740 FAP units in from the left page edge using the Times Roman 9 pitch font.
Here is another example:
;AddTextLabel;;=DAL("page_1_barcode"),1800,35200,90,X0BC4N9P;
37
Chapter 3
Job and Form Set Rules Reference
This rule tells the system to execute the DAL script named page_1_barcode to get the
data will be placed on each page beginning 35200 FAP units down from top of the page
and 1800 FAP units in from the left page edge rotated down 90 degrees. The dynamic
data will be displayed as a 3x9 barcode.
38
AllocDebug
AllocDebug
Use this rule to get information on the number of memory bytes allocated and freed
each time there is new maximum value of allocates not being freed. This rule outputs
its error messages to the LOGFILE.DAT file instead of the ERRFILE.DAT file. You can use
this rule to find cumulative memory allocations not reported as leaks.
The AllocDebug rule is unique in that you can use it at any level in the AFGJOB.JDT file
because it is designed to run in all three processing states during rule Pre- and Post-
processing.
You can place this rule in the <Base Rules>, <Base Form Set Rules>, <Base Image
Rules>, and <Base Field Rules> sections in the AFGJOB.JDT file.
Syntax ;AllocDebug;;;
Example ;AllocDebug;;;
39
Chapter 3
Job and Form Set Rules Reference
AppendGblToExtr
Use this form set level rule (level 2) to append a global variable to the extract file. You
can use this rule to place selected fields in the trigger file into an extract file.
NOTE: If you enter the string NOHEADER as the ExtractFile_Key, the system appends
global variables to the extract list without a header key.
If the accumulated length exceeds MaxExtRecLen, the rule fails and issues the
following error:
Error in AppendGblToExtr(): Global variable <> exceeds maximum
length. Check MaxExtRecLen in INI group <TRN_FILE>
Example ;AppendGblToExtr;;;
40
Archive
Archive
Use this form set level rule (level 2), along with the InitArchive rule, to run the GenArc
program as part of single-step processing.
The InitArchive rule checks the INI options in the Trigger2Archive control group,
initializes the database, opens the APPIDX.DFD and CAR files, and perform other steps
to initialize archive.
The Archive rule then unloads the current form set and converts field data for archive
using the INI options in the Trigger2Archive control group.
Syntax ;Archive;2;;
41
Chapter 3
Job and Form Set Rules Reference
AssignBatWithTbl
Use this form set level rule (level 2) to specify the print batch file for all recipients based
on data found in the extract list.
There are three semicolon-delimited fields, the first is a batch name, the second is a
search mask which will be run against the extract data list for a possible match. The
search mask field consists of one or more offset,data pairs. If there is data from
different records, delimit the search masks by entering a pipe symbol (|).
Example ;BATCH1;1,123|1,546,18,XXX;HO,I,B1,B2;
The first record who’s search mask matches a record in the extract data, moving from
top to bottom through the list, will be used to determine the batch name for the
processing of that transaction.
There must always be an entry which has an asterisk (*) as its search mask. This is the
default batch the system uses if no matches are found. You must specify a default
batch.
In the third field you can enter a set of recipient codes delimited by commas. If you
enter this information, the system will only print forms for the recipients you specify.
Note that the printed recipients will be a subset of the recipients specified.
NOTE: This rule can produce errors if it is run before the form set is created. You must
place this rule after any rule which is used to build the form set. Normally, you
would use the BuildFormList rule to build the form set.
42
AssignToBatch
AssignToBatch
Use this form set level rule (level 2) to identify form sets from a particular source and
place those form sets into a special batch for review purposes. For instance, you can
use this rule to identify policies from a particular agent, operator, or branch and place
those policies into a special batch.
NOTE: You can insert several AssignToBatch rules in the base rules file (AFGJPB.JDT).
All that return true will be placed in the appropriate recipient batch.
Syntax ;AssignToBatch;;(parameters);
Parameter Description
Name The recipient batch name to which the transaction should be assigned.
Search mask One or more pairs of offsets and data (search criteria) in a comma
delimited list. Here is an example:
;AssignToBatch;;Manual=1,Patch399,31,AssignToBatch;
This example searches the records of each transaction for the string
Patch399 at offset 1 and the string AssignToBatch at offset 31. If a match
is found then this transaction will be assigned to the Manual batch.
This table explains the order in which rules are assigned to recipient batches:
Error If an error occurs that causes the batch assignment of the transaction.
Manual If the KickToWIP rule exists and its condition are met.
xxxxxx AssignToBatch rule assignment if the rule exists and its search criteria is met.
43
Chapter 3
Job and Form Set Rules Reference
…
…
Any transaction that has a record that matches the search criteria (character strings:
'Patch399' at offset 1, 'GVM' at offset 31 and ' AssignToBatch' at offset 190) will be
assigned to the Manual batch.
44
BatchByPageCount
BatchByPageCount
Use this form set level (level 2) rule to check the value of a field supplied for processing
against that for transactions currently in the linked list of objects. These transactions
are populated by the CreateRecordList rule. This rule is also used with multi-mail
processing.
If the field has changed, the system writes the records to the recipient batch file, based
on the total page count for all recipients of all form sets in the set of transactions. If you
omit the parameter, the system writes records in the generic linked list of objects to the
appropriate recipient batch files, based on the page count for the individual records.
If you are using multi-mail, the system updates the TotPage field of the recipient batch
record to reflect the total page count for all recipients of all transactions in the multi-
mail transaction set.
NOTE: Keep in mind this rule calculates the page count at the transaction level, not
the recipient level.
Syntax ;BatchByPageCount;;(MMField);
Parameter Description
MMField (Optional) Name of the INI option in the Trn_Fields control group which
defines where the multi-mail code will be found in each transaction.
NOTE: If you use this rule, you must also use the PageBatchStage1InitTerm,
CreateRecordList, and WriteRCBWithPageCount rules.
Example ;BatchByPageCount;;MMField=MM_Field;
In this example, the system uses the multi-mail code defined in each transaction for
batching purposes. The system checks the value in each transaction against that for
transactions currently a VMMList, which is populated by CreateRecordList rule.
If the field has changed, the records are written to the recipient batch based on the
total page count for all recipients for all form sets in the entire set of transactions.
NOTE: Because the end of a multi-mail transaction set is not known until after the
following transaction, each multi-mail transaction set (or each transaction, in
the non multi-mail situation) is written out during processing of the following
transaction.
45
Chapter 3
Job and Form Set Rules Reference
BatchingByRecipINI on page 66
CreateRecordList on page 75
PageBatchStage1InitTerm on page 171
PrintFormset on page 180
WriteRCBWithPageCount on page 248
JDT Rules Reference on page 28
46
BatchingByPageCountINI
BatchingByPageCountINI
Use this form set level rule (level 2) 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:
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 This control group must contain these INI options:
group
< 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
Server System Reference.
47
Chapter 3
Job and Form Set Rules Reference
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 on page 290.
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
Using Condition Tables and the Record Dictionary on page 507.
Batch You can specify the batch name by specifying the recipient name, the batch
Name name, or using a batch name defined in the Record Dictionary.
Recipient name - use one of the names contained in the Recip_Names
control group as batch name. Enclose this name in quotes, such as
“customer”.
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 in the
Recip_Names control group.
list - a list of recipient names. If you list the names, separate each recipient
with a comma or space, such as customer,agent.
48
BatchingByPageCountINI
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 This control group must include at least one entry for each unique batch name in the
group 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 You define the name for this control group, such as Page1. You must have a
group 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.
PrintedOutputFile control You define the name for this control group, such as Page1Prt. This control group must
group 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
49
Chapter 3
Job and Form Set Rules Reference
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.
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
50
BatchingByPageCountINI
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.
51
Chapter 3
Job and Form Set Rules Reference
52
BatchingByPageCountPerRecipINI
BatchingByPageCountPerRecipINI
Use this form set level rule (level 2) to send a transaction to a specific print batch based
on the number of page count for each recipient of all form sets the system generates
when it processes the transaction.
Syntax ;BatchingByPageCountPerRecipINI;;;
You specify which transactions are assigned to the print batch using INI options in
these control groups:
• BatchingByRecip
• Print_Batches
• PrinterInfo
• BatchFileName (You can define the name of this control group.)
• PrintedOutputFile (You can define the name of this control group.)
You must have these control groups in your FSISYS.INI or FSIUSER.INI file.
BatchingByRecip control This control group must contain these INI options:
group
< 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 should 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.
53
Chapter 3
Job and Form Set Rules Reference
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.
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.
?XDB token - a token name that equates to a named item in the XDB.
=GVM (expression) - returns the value of a GVM symbol named in the
expression.
=DAL (expression) - returns the value of a DAL script named in the
expression.
=(expression) - returns the value of a DAL symbol represented in the
expression.
BatchName 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 one of the names contained in the Recip_Names
control group as batch name. Enclose this name in quotes, as shown
here:
“customer”
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, as shown here:
“batch1”
Use the pipe symbol (|) to indicate separate items concatenated
together, as shown here:
print1|print2
Recipients You can specify recipients by using a keyword (All) or by listing specific
recipients.
All - Enter this keyword to tell the system to use all recipients in the
Recip_Names control group.
list - a list of recipient names. If you list the names, separate each
recipient with a comma or space, such as customer, agent.
54
BatchingByPageCountPerRecipINI
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 This control group must include at least one entry for each unique batch name in the
group BatchingByRecip control group.
< Print_Batches >
Batch name = ..\batch\AllOnePageBatch.bch
Option Description
Batch name You define the name and path for each batch file, such as
..\batch\AllOnePageBatch.bch
PrinterInfo control group This control group must include an entry for each unique batch file name listed in the
Print_Batches control group.
< PrinterInfo >
Printer = Printer1
Option Description
Printer You define the name for each batch file listed in the Print_Batches control
group, such as Printer1.
BatchFileName control You define the name for this control group, such as AllOnePageBatch. You must have
group a BatchFileName control group for each batch name option defined in the
Print_Batches control group. This control group must include at least these two
options. The options are shown here:
< AllOnePageBatch >
Printer = (file name)
PageRange = 1,1
Option Description
Printer You define the name for the printed output file, such as Printer1.
55
Chapter 3
Job and Form Set Rules Reference
PrintedOutputFile control You define the name for this control group, such as Printer1. This control group must
group 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:
< Printer1 >
Port = ..\PrintFiles\AllOnePageBatch.PCL
Option Description
Port You define the name and path for the printed output file, such as
..\PrintFiles\AllOnePageBatch.PCL
Scenario 1 In this scenario, we will be showing how to set up a True condition. 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. Here is an example from the FSISYS.INI file:
< BatchingByRecip >
DefaultBatch = Default
Batch_Recip_Def = True;"INSURED1PAGE";INSURED
Batch_Recip_Def = True;"COMPANY1PAGE";COMPANY
Batch_Recip_Def = True;"AGENT1PAGE";AGENT
Batch_Recip_Def = True;"INSUREDMULTIPAGE";INSURED
Batch_Recip_Def = True;"COMPANYMULTIPAGE";COMPANY
Batch_Recip_Def = True;"AGENTMULTIPAGE";AGENT
Batch_Recip_Def = Manual;"MANUAL";ALL
Batch_Recip_Def = Error;"ERROR";ALL
For each recipient, all one-page form sets go into one batch as shown here:
< Insured1Page >
Printer = Printer1
PageRange = 1,1
< Company1Page >
Printer = Printer2
PageRange = 1,1
< Agent1Page >
Printer = Printer3
PageRange = 1,1
All forms sets with two or more pages for each recipient go into a different batch, as
shown here:
< InsuredMultipage >
Printer = Printer4
PageRange = 2,99999
< CompanyMultipage >
Printer = Printer5
PageRange = 2,99999
< AgentMultipage >
Printer = Printer6
PageRange = 2,99999
< Default >
56
BatchingByPageCountPerRecipINI
Printer = PDefault
Form sets that need to go into WIP are in the manual batch:
< Manual >
Printer = Printer7
PageRange = 1,99999
Form sets with errors go into the error batch:
< Error >
Printer = Printer8
PageRange = 1,99999
This excerpt shows how to set the Print_Batches, PrinterInfo, and PrintedOutputFile
control groups:
< Print_Batches >
Default = default.bch
Insured1Page = insured1page.bch
Company1Page = company1page.bch
Agent1Page = agent1page.bch
InsuredMultipage = insuredmultipage.bch
CompanyMultipage = companymultipage.bch
AgentMultipage = agentmultipage.bch
Manual = manual.bch
Error = error.bch
< Printer1 >
Port = data\insured1page.pcl
< Printer2 >
Port = data\company1page.pcl
< Printer3 >
Port = data\agent1page.pcl
< Printer4 >
Port = data\insuredmultipage.pcl
< Printer5 >
Port = data\companymultipage.pcl
< Printer6 >
Port = data\agentmultipage.pcl
< Printer7 >
Port = data\manual.pcl
< Printer8 >
Port = data\error.pcl
< PDefault >
Port = data\pdefault
< PrinterInfo >
Printer = Printer1
Printer = Printer2
Printer = Printer3
Printer = Printer4
Printer = Printer5
Printer = Printer6
Printer = Printer7
Printer = Printer8
Printer = PDEFAULT
57
Chapter 3
Job and Form Set Rules Reference
Scenario 2 This scenario defines two simple conditions in a condition table based on information
in the data dictionary. In the condition table two conditions are set which define the
two company types, representing the two different company transactions in the extract
file. Condition 1 (Cond1) searches for an S for Sampco company transactions. Condition
2 (Cond2) searches for an F for FSI company transactions. This scenario creates
batches for recipients by company and page count. The data dictionary and condition
table for this scenario are shown below:
From the data dictionary:
<Records>
Header = Search(11,HEADERREC)
<Variables>
CompanyType = Record(Header) Offset(1) Length(1) Type(Char)
For each recipient, all one-page form sets for each company go into a separate batch
as shown here:
< Sampco1Page >
Printer = Printer1
PageRange = 1,1
< FSI1Page >
Printer = Printer3
PageRange = 1,1
For each recipient, all form sets with two or more pages go into a separate batch for
each company as shown here:
< SampcoMultipage >
Printer = Printer2
PageRange = 2,99999
< FSIMultipage >
Printer = Printer4
PageRange = 2,99999
Form sets that go to WIP are put into the manual batch:
< Manual >
Printer = Printer5
PageRange = 1,99999
58
BatchingByPageCountPerRecipINI
This excerpt shows how to set the Print_Batches, PrinterInfo, and PrintedOutputFile
control groups:
< Print_Batches >
Default = default.bch
Sampco1Page = sampco1page.bch
SampcoMultipage = sampcomultipage.bch
FSI1Page = fsi1page.bch
FSIMultipage = fsimultipage.bch
Manual = manual.bch
Error = error.bch
< Printer1 >
Port = data\sampco1page.pcl
< Printer2 >
Port = data\sampcomultipage.pcl
< Printer3 >
Port = data\fsi1page.pcl
< Printer4 >
Port = data\fsimultipage.pcl
< Printer5 >
Port = data\manual.pcl
< Printer6 >
Port = data\error.pcl
< PDEFAULT >
Port = data\pdefault
< PrinterInfo >
Printer = Printer1
Printer = Printer2
Printer = Printer3
Printer = Printer4
Printer = Printer5
Printer = Printer6
Printer = PDefault
< Tables >
Path = .\tables\
Recipient = reciptbl.dat
Conditions = condition.tbl
< DataDictionary >
Name = datadict.tbl
< SymLookup >
MaxCache = 1000
LeastFrequent = Yes
59
Chapter 3
Job and Form Set Rules Reference
Scenario 3 This scenario looks for a token from the XDB to send form sets to agent batches. Here
is an excerpt from the FSISYS.INI file:
< BatchingByRecip >
DefaultBatch = Default
Batch_Recip_Def = ?AGENT NAME;"AGENTNAME1PAGE";AGENT
Batch_Recip_Def = ?AGENT NAME;"AGENTNAMEMULTIPAGE";AGENT
Batch_Recip_Def = Manual;"MANUAL";ALL
Batch_Recip_Def = Error;"ERROR";ALL
If the token is not found, the system sends form sets to the Default batch:
< Default >
Printer = PDefault
If a token is found, the system sends all one-page transactions to an Agent batch
specifically for one-page form sets:
< AgentName1Page >
Printer = Printer1
PageRange = 1,1
If a token is found, the system sends all transactions that are more than one page to an
Agent batch designed to hold forms sets that consist of two or more pages:
< AgentNameMultipage >
Printer = Printer2
PageRange = 2,99999
Form sets that go to WIP are put into the manual batch:
< Manual >
Printer = Printer3
PageRange = 1,99999
60
BatchingByPageCountPerRecipINI
Printer = Printer2
Printer = Printer3
Printer = Printer4
Printer = PDefault
Scenario 4 Like the previous scenario, this scenario sends form sets to agent batches depending
on the number of pages. This scenario, however, uses a GVM variable as the condition
and an XML extract file. In the AFGJOB.JDT, you must first create the global variable you
are going to use for the condition. In this scenario, it is called AGT1. To create it, use the
CreateGlbVar rule. Then, use the Ext2GVM rule to map the data to the GVM variable
named AGT1. This rule is placed after the LoadExtractData rule in the AGFJOB.JDT file.
If the GVM variable (AGT1) holds a value, the condition is considered true and the
transaction is written to the appropriate batch by the page count. If the GVM variable
(AGT1) does not hold a value, the condition is considered false and the transaction will
be written to the Default batch. Here is an example:
/* This base (this implementation) uses these rules. */
<Base Rules>
;RULStandardJobProc;1;Always the first job level rule;
;SetErrHdr;1;*:;
;SetErrHdr;1;*:------------------------------------------------;
;SetErrHdr;1;*: FormMaker Data Generation (Base);
;SetErrHdr;1;*: ;
;SetErrHdr;1;***: Transaction: ***PolicyNum***;
;SetErrHdr;1;***: Symbol: ***Symbol***;
;SetErrHdr;1;***: Module: ***Module***;
;SetErrHdr;1;***: State: ***State***;
;SetErrHdr;1;***: Company Name (after ini conversion):
***Company***;
;SetErrHdr;1;***: Line of Business (after ini conversion):
***Lob***;
;SetErrHdr;1;***: Trans Type: ***TransactionType***;
;SetErrHdr;1;***: Run Date: ***Rundate***;
;SetErrHdr;1;*:------------------------------------------------;
;CreateGlbVar;1;TXTLst,PVOID;
;CreateGlbVar;1;TblLstH,PVOID;
;CreateGlbVar;1;AGT1,CHAR_ARRAY,15;
;JobInit1;1;;
;LoadDDTDefs;1;;
;InitOvFlw;1;;
;LoadTextTbl;1;;
;LoadTblFiles;1;;
;SetOvFlwSym;1;CGDECBDOVF,Q1GDBD,5;
;BuildMasterFormList;1;4;
<Base Form Set Rules>
;RULStandardTransactionProc;2;Always the first transaction level
rule;
;LoadExtractData;2;;
;GetCo;2;11,HEADERREC 35,3;
;GetLOB;2;11,HEADERREC 40,3;
;Ext2Gvm;2;!/COMPANY/FORMS/FORM/SECTION/FIELDS/AGENTNAME 1,15,AGT1;
;ResetOvFlw;2;;
;BuildFormList;2;;
;LoadRcpTbl;2;;
;UpdatePOLFile;2;;
;RunSetRcpTbl;2;;
61
Chapter 3
Job and Form Set Rules Reference
;BatchingByPageCountPerRecipINI;;;
If the GVM variable holds a value, the system sends all one-page transactions to an
Agent batch specifically for one-page form sets:
< AgenName1Page >
Printer = Printer1
PageRange = 1,1
If the GVM variable holds a value, the system sends all transactions that are more than
one page to an Agent batch designed to hold form sets that consist of two or more
pages:
< AgentNameMultipage >
Printer = Printer2
PageRange = 2,99999
Form sets that go into WIP are put in the manual batch:
< Manual >
Printer = Printer3
PageRange = 1,99999
Form sets with errors go into the error batch:
< Error >
Printer = Printer4
PageRange = 1,99999
This excerpt shows how to set the Print_Batches, PrinterInfo, and PrintedOutputFile
control groups:
< Print_Batches >
Default = default.bch
AgentName1Page = agentname1page.bch
AgentNameMultipage = agentnamemultipage.bch
Manual = manual.bch
Error = error.bch
< Printer1 >
Port = data\agentname1page.pcl
< Printer2 >
Port = data\agentnamemultipage.pcl
< Printer3 >
Port = data\manual.pcl
< Printer4 >
Port = data\error.pcl
< PDefault >
Port = data\pdefault
< PrinterInfo >
Printer = Printer1
62
BatchingByPageCountPerRecipINI
Printer = Printer2
Printer = Printer3
Printer = Printer4
Printer = PDefault
Scenario 5 Like scenario 4, this scenario sends form sets to agent batches depending on the
number of pages. This scenario, however, uses a DAL script called agent.dal to set the
condition along with using an XML extract file. In the AFGJOB.JDT, we must use a
PreTransDAL to call the DAL script to set the condition. In this scenario, it is called
AGT1. This rule is placed after the RunSetRcpTbl rule in the AGFJOB.JDT file. Once the
DAL script set a value to the DAL variable, the condition is considered true and the
transaction is written to the respective batch for the Batch_Recip_Def condition by
page count. If the DAL script does not set a value to the DAL variable, the condition is
considered false and the transaction is written to the Default batch instead. Here is an
example:
/* This base (this implementation) uses these rules. */
<Base Rules>
;RULStandardJobProc;1;Always the first job level rule;
;SetErrHdr;1;*:;
;SetErrHdr;1;*:------------------------------------------------;
;SetErrHdr;1;*: FormMaker Data Generation (Base);
;SetErrHdr;1;*: ;
;SetErrHdr;1;***: Transaction: ***PolicyNum***;
;SetErrHdr;1;***: Symbol: ***Symbol***;
;SetErrHdr;1;***: Module: ***Module***;
;SetErrHdr;1;***: State: ***State***;
;SetErrHdr;1;***: Company Name (after ini conversion):
***Company***;
;SetErrHdr;1;***: Line of Business (after ini conversion):
***Lob***;
;SetErrHdr;1;***: Trans Type: ***TransactionType***;
;SetErrHdr;1;***: Run Date: ***Rundate***;
;SetErrHdr;1;*:------------------------------------------------;
;CreateGlbVar;1;TXTLst,PVOID;
;CreateGlbVar;1;TblLstH,PVOID;
;JobInit1;1;;
;LoadDDTDefs;1;;
;InitOvFlw;1;;
;LoadTextTbl;1;;
;LoadTblFiles;1;;
;SetOvFlwSym;1;CGDECBDOVF,Q1GDBD,5;
;BuildMasterFormList;1;4;
<Base Form Set Rules>
;RULStandardTransactionProc;2;Always the first transaction level
rule;
;LoadExtractData;2;;
;GetCo;2;11,HEADERREC 35,3;
;GetLOB;2;11,HEADERREC 40,3;
;ResetOvFlw;2;;
;BuildFormList;2;;
;LoadRcpTbl;2;;
;UpdatePOLFile;2;;
;RunSetRcpTbl;2;;
;PreTransDAL;;Call("agent.dal");
;BatchingByPageCountPerRecipINI;;;
63
Chapter 3
Job and Form Set Rules Reference
If the DAL variable holds a value, the system sends all one-page transactions to an
Agent batch specifically for one-page form sets:
< AgentName1Page >
Printer = Printer1
PageRange = 1,1
If the DAL variable holds a value, the system sends all transactions that are more than
one page to an Agent batch designed to hold form sets that consist of two or more
pages:
< AgentNameMultipage >
Printer = Printer2
PageRange = 2,99999
If the DAL variable does NOT hold a value, the condition is considered false and the
transaction is sent to the Default batch.
< Default >
Printer = PDefault
Form sets that go into WIP are put in the manual batch:
< Manual >
Printer = Printer3
PageRange = 1,99999
64
BatchingByPageCountPerRecipINI
Printer = Printer1
Printer = Printer2
Printer = Printer3
Printer = Printer4
Printer = PDefault
65
Chapter 3
Job and Form Set Rules Reference
BatchingByRecipINI
Use this form set level (level 2) rule to send transactions to a batch you specify based
on data in the extract file and conditions and recipients specified using INI options.
Syntax ;BatchingByRecipINI;;;
You pass parameters for this rule using the BatchingByRecip control group in your
FSISYS.INI or FSIUSER.INI file. Make sure this control group is in the INI file and
includes these options:
• DefaultBatch
• Batch_Recip_Def
The DefaultBatch option has only one parameter, a literal name such as Default. Do not
enclose it in quotation marks.
The syntax for the Batch_Recip_Def option is shown here:
Condition; ”BatchName”; Recipient
Parameter Description
Batch name Batch name 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. Keep in mind the batch name is limited to eight
characters. You can use these keywords:
Recip_Name means to use the names contained in the Recip_Names
control group as batch names
Dict( ) – The 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.
Recipients Enter All for all recipients or list the recipient names. If you list the names,
separate each recipient with a comma or space.
66
BatchingByRecipINI
If the conditions are met, the 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.
If a transaction does not meet the first condition, processing continues through the INI
list. Processing stops once the appropriate batch is found.
If a transaction does not meet one of the Batch_Recip_Def criteria, the system places
it in the default batch. If you do not define the DefaultBatch option, 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 All rather than
listing all recipients when appropriate.
Example For this example, assume you have this rule in the AFGJOB.JDT file:
;BatchingByRecipINI;;;
And these INI options:
< BatchingByRecip >
DefaultBatch = default
Batch_Recip_Def = 4,1234567;"BATCH1";INSURED
Batch_Recip_Def = true;"BATCH2";INSURED
Batch_Recip_Def = true;"BATCH5";COMPANY AGENT
The DefaultBatch option tells the system that any output which has not already been
sent to a batch by one of the Batch_Recip_Def options should be placed in the default
batch:
DefaultBatch = default
You must set up the batch name under the Print_Batches control group.
The first Batch_Recip_Def option tells the system to place into BATCH1 any output
which goes to the INSURED recipient and has 1234567 beginning at position 4 in the
extract file:
Batch_Recip_Def = 4,1234567;"BATCH1";INSURED
The next Batch_Recip_Def option tells the system to place all recipients named
INSURED into BATCH2:
67
Chapter 3
Job and Form Set Rules Reference
Batch_Recip_Def = true;"BATCH2";INSURED
This Batch_Recip_Def option follows the same syntax as the earlier examples, but
shows how you can use the pipe symbol to place two segments on one line:
Batch_Recip_Def = true;”BATCH”|”5”;COMPANY AGENT
The last Batch_Recip_Def option tells the system to place all recipients named
COMPANY and AGENT into the concatenated name BATCH5.
As shown earlier, you have to specify the batch name under Print_Batches and the
recipient name under RECIP_NAMES.
68
BuildExcludeList
BuildExcludeList
Use this job level rule (level 1) to selectively exclude transactions from being processed
in one- and two-step mode processing.
You must include this rule in the AFGJOB.JDT file because neither one- nor two-step
mode executes the GenTran program which processes transactions during multi-step
processing.
NOTE: You must define the transactions to be excluded in a file specified by the
Exclude option in the Data control group. In addition, this rule does not remove
excluded transactions from the extract file as would occur in multi-step
processing.
Syntax ;BuildExcludeList;;;
Example Assume your master resource library has the following items defined. Your FSIUSER.INI
file looks like this:
< Data >
Exclude = Exclude.dat
You have a file named JONES.DAT in DefLib. This file contains:
30,Jones
In this example the system processes all of the transactions except RG1003 and
RG1005. These transactions are excluded because the search mask criteria (35,Jones)
defined in the EXCLUDE.DAT file was found in both transactions.
69
Chapter 3
Job and Form Set Rules Reference
BuildFormList
Use this form set level rule (level 2) to load and initialize all forms that the processing
of extract data could possibly produce.
NOTE: You can use the LoadFormsetFromArchive rule to replace the BuildFormList,
LoadRcpTbl, and RunSetRcpTbl rules in the AFGJOB.JDT file.
Syntax ;BuildFormList;;;
There are no parameters for this rule.
This rule loads the entire form set into a master form set list and creates the duplicate
list which is altered during processing. The system only creates the master form set list
the first time it executes this rule. Subsequent calls to this rule delete the existing
duplicate form set (in the working form set) and recreate it from the master form set
list.
This rule makes sure the extract data exists and resets all form recipient copy counts
to zero (0). It also loads the set recipient table data from file into a list. This file is
defined in the SetRcpTb option in the Data control group.
NOTE: This rule erases the list of data from the SETRCPTB file.
Example ;BuildFormList;;;
70
BuildMasterFormList
BuildMasterFormList
Use this job level rule (level 1) to load the FORM.DAT file into an internal linked list used
by the GenData program.
You must include this rule in the AFGJOB.JDT file because the RunSetRcpTbl rule is
dependent on the list this rule creates.
Syntax ;BuildMasterFormList;;KeyCount;FORM.DAT
Parameter Description
FORM.DAT List the FORM.DAT files you want the system to load. This lets you load
multiple FORM.DAT files and have them appear in memory as if they came
from one large FORM.DAT file.
If you do not specify the FORM.DAT file name, the system looks for the
master resource library settings to find the correct file to load.
Example ;BuildMasterFormList;1;4;
The KeyCount parameter determines the number of items in the FORM.DAT line
considered part of the form set key. The system organizes the form set list based on the
number of items specified by the KeyCount parameter, minus one.
For example, the RPEX1 FORM.DAT file contains as its first two lines:
;SAMPCO;LB1;DEC PAGE;;R;;qsname|...
;SAMPCO;LB1;LETTER;;RD;;qsname|D...
This rule compares the lines to determine if an item is already in the list after finding
the 4th (KeyCount) semicolon in each line and comparing up to the lesser position.
These lines would be compared up to the following point:
;SAMPCO;LB1;DEC PAG;
;SAMPCO;LB1;LETTER;
NOTE: The KeyCount parameter should be one more than the number of keys in the
FORM.DAT file to allow for the leading semicolon. Do not change the KeyCount
parameter unless the library uses a different number of keys.
71
Chapter 3
Job and Form Set Rules Reference
CheckZeroFontID
Use this form set level (level 2) rule to see if the form set has any fields with a zero font
ID. The rule will produce an error or warning for any fields it finds which have font IDs
equal to zero. You can then correct the font ID problems and restart the processing
cycle.
Syntax ;;CheckZeroFontID;;Message;
Parameter Description
Message Enter E if you want to see error messages. Leave this parameter blank if you
want to see warning messages.
The error or warning message includes information about the form, image, and field:
Message Description
72
ConvertWIP
ConvertWIP
Use this form set level (level 2) rule to see if the current transaction is assigned to the
MANUAL.BCH file. If it is, the rule adds the record to WIP and unloads the contents of
the POLFILE.DAT and NAFILE.DAT files into new files with unique names.
The system generates unique form set IDs using a globally unique identifier (GUID) for
the new files. This helps to make sure form set IDs created for WIP records do not clash
even if multiple applications are generating WIP records, such as if you had multiple
IDS servers generating WIP.
You can then view these WIP records using Documaker Workstation or Print Preview,
which is part of the Internet Document Server (IDS).
Using this rule eliminates the need to run the separate GenWIP process to transfer
transactions into WIP.
NOTE: You must have separate licenses to run Documaker Workstation and IDS.
Contact your sales representative for more information.
Syntax ;ConvertWIP;;;
Example ;ConvertWIP;2;;
The order in which you place the ConvertWIP rule is important. Place it in front of the
PrintFormset, WriteOutput, and WriteNAFile rules, as shown here:
;NoGenTrnTransactionProc;2;required to combine GenTran/GenData;
;ConvertWIP;2;;
;PrintFormset;2;;
;WriteOutput;2;;
;WriteNAFile;2;;
The PrintFormset rule is required to combine the GenData and GenPrint processes into
a single step.
73
Chapter 3
Job and Form Set Rules Reference
CreateGlbVar
Use this job level rule (level 1) to create a global variable which can be used by all code
in the system. You specify the type and size of the variable. List all instances of this rule
at the beginning of the AFGJOB.JDT file.
Syntax ;CreateGlbVar;;;
NOTE: This rule resets the global variable created during pre-processing.
• SHORT
• LONG
• DOUBLE
• FLOAT
• LONG DOUBLE
• CHAR_ARRAY
• PVOID
The following example creates a character array of 20 bytes named MYCHARARRAY.
Remember that the array should be large enough to include the null terminating
character if it contains strings.
;CreateGLBVar;1;MYCHARARRAY,CHAR_ARRAY,20;
74
CreateRecordList
CreateRecordList
Use this form set level rule (level 2) to copy the NA_Offset and POL_Offset into global
variables.
This rule calculates page counts for each recipient and sends transactions to error,
manual, and previously assigned (such as Braille) batches, as necessary. This rule also
appends RCB comment records for all other transactions into a generic linked list of
objects.
This rule writes out the recipient batch records for error, manual, and previously
assigned batches.
NOTE: If the current record will be appended to the generic linked list of objects, this
rule takes care of filling in a number of fields in the recipient batch record.
These fields would normally be filled in by a call to the RULUpdateRecips
function. The RULUpdateRecips function is inappropriate for page count
batching, which is why the fields are filled in manually.
Syntax ;CreateRecordList;;;
Example ;CreateRecordList;;;
75
Chapter 3
Job and Form Set Rules Reference
DelExtRecords
Use this form set level rule (level 2) to search the extract data list and delete all data
records which match the search mask you specify.
For instance, you can use this rule to remove data records that are confidential, out of
date, or should never be processed on the form.
To use this rule, you must add it to the AFGJOB.JDT file after the extract data is loaded
but before the extract data is used for mapping or other purposes.
Syntax ;DelExtRecords;;;
Example This example deletes all extract records which contain the text RECTYPE1 at offset 1,
and KEY1 at offset 50.
;DelExtRecords;;1,RECTYPE1,50,KEY1;
NOTE: Be sure that the search mask is specific enough to avoid deleting more records
than intended.
76
Dictionary
Dictionary
Use this job level rule (level 1) to terminate an XDB instance and free memory. You only
include this rule if you also used the GlobalFld rule.
NOTE: For information on the Dictionary Editor, see the Docucreate User Guide.
Syntax ;Dictionary;;;
77
Chapter 3
Job and Form Set Rules Reference
DocumentExport
Use this form set (level 2) rule to write full NA and POL information as well as certain
export field information. You can control how the export information the rule generates
is formatted and you can specify which fields should be included.
Syntax ;DocumentExport;;;
Option Description
File Enter the name you want to assign to the file. If you omit this name,
the user must specify it.
Path Enter a path to indicate where the file should be written. The default
is the current working directory. If you include the File option and the
file name contains a path, that path overrides this option.
Ext Enter the extension you want to use. The default is DS. If you include
the File option and the file name includes an extension, that
extension overrides this option.
AppendedExport If you enter Yes, the data on the current form set data is appended to
the existing file. The default is No.
Fixed or variable record Fixed length records are always the same. In a fixed length record, all field data has a
lengths known (output) size that must be generated. Adding all the field lengths together,
generally equals the fixed record length. (Remember to add two separator strings for
each field to determine the actual length.)
Variable record length output typically means that some or all of the data element will
not adhere to a fixed size.
78
DocumentExport
With variable length records, you often need a marker that identifies where each field
element begins and ends. These elements are typically constant —meaning each field
begins and ends with the same value. This is the purpose of the field separator
mentioned previously. The field separator defaults to a quotation mark (“), but you can
specify any string of up to 39 characters.
Delimiting the fields is often necessary because the importing program needs to
recognize where fields begin and end within the variable record. Although a fixed
length record may not always require field separators, there is no harm caused by
using them.
Defining the export fields Once you have identified the fields that comprise the export record, you have to define
and formats these fields and the formats required to build the defined record layout.
The record layout for the record must be defined in the INI file, in this control group:
< ImpExpCombined >
For each field that should be exported to the export record line, you must include a line
in the INI file. You may export as many fields as necessary. Each line must begin with
the FIELD= statement and has the following syntax.
FIELD = GVM Fieldname;formatstring
You can omit the GVM Fieldname from any record location that must contain constant
or filler information not derived from the actual export record. See Format Specification
Flags on page 86 for more information.
79
Chapter 3
Job and Form Set Rules Reference
The formatstring is optional. If you include it, be sure to precede it with a semicolon.
Whatever occurs after the semicolon is used to modify the field data in a specific
manner. You can use format string flags to increase or decrease the data to a
predetermined size or convert the data from one value format to another.
If a named export field is not followed by the format string, the format is derived
internally by querying the GVM definition and will yield a constant string length result.
Specifying the format If the output record area for a definition is a filler area — meaning that the output data
is predetermined and not part of the export data — you can omit the field name. If you
omit the field name in this manner, you must specify a format or nothing is written to
the output record.
Constant data is often used to write header or trailer information to variable length
records to help the importing system recognize where the record begins and ends.
Also, you can use this method to write additional characters or data between fields
such as, for example, if you need to include a comma between each field data element
of a variable length record. Here are some examples:
FIELD = Key1;%-3.3s
FIELD = ;,
FIELD = KeyID;%-10.10s
In the first case, the value from Key1 is formatted as three characters in the output data.
This constant text value of a comma is written next, followed by 10 characters from
KeyID. If you assume Key1 contains BOB and KeyID contains 123456789, the result is
as follows:
WIP = “BOB”“,”“123456789 ”
Notice that each field, whether constant or not, contains field separators. Also notice
that the data for KeyID was padded to 10 characters even though the actual value only
contained nine characters.
Converting dates Date format conversions are specified using the D as the first character. The D is
followed by the input format specifier for the data, a semicolon, and the format
specification for output. Here is an example:
FIELD=CREATETIME;DX;D4
This example names the field CREATETIME. The D following the semicolon tells the
system to retrieve this field and convert it from the format defined as X into the output
format, D4. X represents the hexadecimal character format. D4 is a standard
YYYYMMDD format without separators.
Format Flags
If you are familiar with C programming, the data conversions provided with format flags
will be familiar. Essentially, the printf function format definitions for %s, %f, and %d
are supported with some limitations.
Remember that most export record data and other internal data is usually text.
Therefore, to convert to a numerical format of %f or %d, the form set data must be
deformatted internally and then converted into the required format.
The output written to the exported record is formatted as text. Here are some
examples:
FIELD = DESC;%d
80
DocumentExport
FIELD = ORIGUSER;%-32.32s
FIELD = APPDATA;%8.2f
These examples use format flags. The first example retrieves the value of the field
DESC (the description) then converts that value into an integer (losing any decimal
portion it might have had) and outputs it as an integer value. If the data was not a
number, the result is zero (0).
The second example writes exactly 32 characters for the value taken from ORIGUSER.
If the field value does not contain 32 characters, it is padded with spaces. Note also the
use of the dash (-) indicator. This tells the system to left justify the field. If you omit the
dash, the system pads the data with spaces on the left, right justifying it.
The last example demonstrates a floating point output with two decimal places. The
field value is converted into a floating point number. The system then applies the
format you specify and rounds the value if it contained more than two decimal places.
Option Description
WIPHeader Enter the text for the header. You can enter as much text as you like, but
avoid exceeding 1024 characters in the entire export record line. The
default is WIP.
Separator Enter the text value used to separate fields. The default is a quotation
mark (“). If a variable record layout is being used for WIP information,
field separators are essential. You can enter up to 39 characters. Choose
a separator that is not likely to appear in any of the data you intend to
output.
Date Formats
Standard date format You can enter dates in a variety of formats. The date format has three possible
components or characters. The first character specifies the order of the date. The
second character specifies the type of separator character for the date. The third
character specifies the length of the year.
Date order The first character in the date format indicates the order of the date and whether the
month should be numeric or alphabetic. The first character must be a digit from 1 to 9
or an alphabetic character. The default order is format 1. The following table lists your
options:
81
Chapter 3
Job and Form Set Rules Reference
82
DocumentExport
Separators The second character in the date format indicates the separator to use in the date. If
you omit the separator character, the system includes a forward slash (/). You can
choose from these separator characters:
Character Example
/ 02/17/2009
- 02-17-2009
. 02.17.2009
, 02,17,2009
b (blank) 02 17 2009
You specify the separator character by including it as the second character in the date
format. For example, if you enter 5-, you specify date format 5 with a dash as a
separator character. The date appears as 02-17-2009. If you enter 5b, you specify date
format 5 with blanks or spaces as a separator. Your date appears as 02 17 2009.
Year length The third character in the date format specifies the year length. The year must appear
as either two or four digits. Enter 2 for a two digit year or 4 for a four digit year.
You can omit the year length character from a date format. If you do not specify the year
length, the system uses the length of the original entry. For example, if you enter a date
as 10/30/09 and do not specify a length, the system retains 05. If you enter 10/30/
2009, the system retains 2009.
If you enter 5-2, you specify date format 5, a dash (-) as a separator character and a two-
digit year. Your date appears as _9-11-09. If you enter 5-4, your date appears as _9-11-
2009.
83
Chapter 3
Job and Form Set Rules Reference
NOTE: If you do not enter a separator character the year length specification is the
second digit in the date format. For example, if you enter 54, you specify date
format 5 and a four-digit year. Since the separator character is not specified
the default character (/) applies. Your date appears as _9/11/2009.
Avoid two-digit year representations. For example, if you enter 5/2, you specify
date format 5 and a two-digit year. Your date appears as 9/11/09.
Freeform Formats
The format argument consists of one or more codes; each formatting code is preceded
by a percent sign (%). Characters not prefixed with a percent sign copied unchanged to
the output buffer. Any character following a percent sign is not recognized as a valid
format code is copied unchanged to the destination. Therefore, you can enter %% to
include the percent sign in the resulting output string.
You can use these format codes:
Code Description
%@xxx Specify language locale (Where xxx identifies one of the supported
languages. For example. A format of %@CAD%A might produce mardi, the
French word for Tuesday.)
84
DocumentExport
Format Output
%m-%d-%Y 01-01-2009
Additional format An octothorp (#) tells the system to suppress leading zeros for the following format
attributes codes. This flag is recognized on these formats and is ignored on all other format codes
not listed here.
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#w
For example, if %d outputs 01, using %#d the output will become 1.
NOTE: This flag only affects the format code that specifies it. Any subsequent codes
that are numeric are not affected unless they also specify the flag.
Enter a greater than symbol (>) to uppercase the resulting text. This flag is only
recognized on these format codes:
%>p, %>A, %>b, %>B
For example, if %A results in Tuesday, %>A produces TUESDAY.
NOTE: This flag only affects the format code that specifies it. Any subsequent codes
that have text are not affected unless those also specify the flag.
Enter a less than symbol (<) to lowercase the resulting text. This flag is valid for the
following codes and ignored on all others:
%<p, %<A, %<b, %<B
NOTE: This flag only affects the format code that specifies it. Any subsequent codes
that have text are not affected unless they also specify the flag.
Enter <> to capitalize the first letter of the resulting text. This flag is valid for the
following codes and ignored on all others:
%<>p, %<>A, %<>b, %<>B
NOTE: This flag only affects the format code that specifies it. Any subsequent codes
that have text are not affected unless they also specify the flag.
85
Chapter 3
Job and Form Set Rules Reference
Enter To output
Flags Use these flags to control justification of the output and the printing of signs, blanks,
decimal points, and octal and hexadecimal prefixes. More than one flag can appear in
a format specification.
– Left aligns the result within the given field Right align.
width.
+ Prefixes the output value with a sign (+ or –) if Sign appears only for
the output value is of a signed type. negative signed values
(–).
86
DocumentExport
blank (' ') Prefixes the output value with a blank if the No blank appears.
output value is signed and positive; the blank
is ignored if both the blank and + flags appear.
# When used with the f format, the # flag forces Decimal point appears
the output value to contain a decimal point in only if digits follow it.
all cases.
Width Here you can control the minimum number of characters printed. If the number of
characters in the output value is less than the width you specify, the system adds
blanks to the left or the right of the values — depending on whether the flag for left
alignment is specified — until the minimum width is reached. If you prefix the width
with a zero (0), the system adds zeros until the minimum width is reached (not useful
for left-aligned numbers).
Your entry for width never causes a value to be truncated. If the number of characters
in the output value is greater than the width you specify, or if you omit the width, all
characters of the value are printed (subject to the .Precision specification).
.Precision This optional number specifies the maximum number of characters printed for all or
part of the output field, or the minimum number of digits printed for integer values.
For format s, the precision specifies the maximum number of characters to print.
Characters in excess of precision are not printed. Characters are printed until a null
character is encountered.
For format f, the precision specifies the number of digits after the decimal point. If a
decimal point appears, at least one digit appears before it. The value is rounded to the
appropriate number of digits. The default precision is six (6); if the precision is zero (0),
or if a period (.) appears without a number following it, no decimal point is printed.
For format d, the precision specifies the minimum number of digits to be printed. If the
number of digits in the argument is less than the precision value, the output value is
padded on the left with zeros. The value is not truncated when the number of digits
exceeds the precision. The default precision is one (1).
87
Chapter 3
Job and Form Set Rules Reference
DumpExtList
Use this form set level rule (level 2) to dump the extract list to a file. The result provides
information about the generic linked list of objects, such as its handles and the
information contained in each element.
The file the system creates is a flat text file which shows only text values—binary data
is written as spaces to preserve placement.
Syntax ;DumpExtList;;(Name);
Parameter Description
Name Name of the file to which the extract records will be written.
NOTE: Only use this rule for test purposes, so you can inspect the contents of the
extract data list. The use of this rule slows processing in proportion to the size
of the extract data list.
Example ;DumpExtList;;ExtrListDump.txt;
88
DumpExtractListToFile
DumpExtractListToFile
Use this form set level rule (level 2) to dump the extract list to a file. This rule is helpful
if you are debugging and you want to see what is currently in the extract list.
Syntax ;DumpExtractListToFile;;(parameters);
Parameter Description
Name Name of the file to which the extract records will be written.
Flag The append flag. Enter Y to append the records for each transaction to the
file plus a header. Enter N to only create a dump file for the last transaction.
Example ;DumpExtractListToFile;;ExtrDump.txt,Y;
For each transaction in the extract file, the system appends to the EXTRDUMP.TXT file
a transaction header plus the contents of each record in the transaction. Here is an
example of this file:
*************************************************
==> Extract data for:
TransactionId:<Patch399>
GroupName1:<CWNG>
GroupName2:<CIS>
GroupName3:<>
External Form Name:<>
Transaction Type:<>
**************************************************
Patch399 HEADER CWNGCIS Patch # …
Patch399 GVM1 Morris Sandra …
…
…
**************************************************
==> Extract data for:
TransactionId:<Patch400>
GroupName1:<CWNG>
GroupName2:<CIS>
GroupName3:<>
External Form Name:<>
Transaction Type:<>
**************************************************
Patch400 HEADER CWNGCIS Patch # …
Patch400 GVM1 Bob Jane …
…
…
NOTE: The Y option can create a very large file depending on the size of the extract
file.
89
Chapter 3
Job and Form Set Rules Reference
ErrorHandler
Use this job level (level 1) rule to send transactions to the manual batch when specified
field errors occur. This lets normal processing continue if errors occur.
Syntax ;ErrorHandler;;;
Use the following INI option to identify the field errors which cause a transaction to be
sent to the manual batch:
< Error2Manual >
(CurrentError) = (NextError1),..,(NextErrorN),(M)
Parameter Description
NextError1 The error caused by the CurrentError failure. This continues through the
list of errors until the last one.
M This tells the system to send the transaction to the manual batch.
Errors Here is a sample set of error messages which would appear if a field error occurred:
Error Description
Add this rule to the < Base Rules > section in the AFGJOB.JDT file:
;ErrorHandler;;;
If field error DM10513 occurs, it will cause these errors: DM12051, DM12048, DM1283,
and DM12074. This function sends these transactions to the manual batch for user-
entry, continues processing, and then creates a blank field in the NAFILE.DAT file.
90
Ext2GVM
Ext2GVM
Use this form set level rule (level 2) to add data from the extract list into previously
defined global variables. To use the rule, you must add it to the AFGJOB.JDT file after
the extract data is loaded.
You can also use this rule to get data into the NEWTRN.DAT file during GenData
processing instead of using Trn_Fields. To do this you define a field for the data to be
mapped in the TRNDFDFL.DFD file and then use the Ext2GVM rule to map the data from
extract file to the NEWTRN.DAT file.
Syntax ;Ext2GVM;;(parameters);
You can use these parameters with this rule:
Parameter Description
SearchMask One or more pairs of offsets and data (search criteria) in a comma-
delimited list.
DataLocation The offset and length of the data in the extract record.
GVMName The name of the GVM variable where the data will be stored.
SuppressFlag Enter S to suppress error messages if the search mask is not found in a
transaction. The default is blank, which tells the system not to suppress
error messages.
Example The following example locates the extract record that matches the search mask (1, D1)
and moves the value found at position 21 for a length of 5 to the global variable TestVar.
In addition, it suppresses the error messages if the search mask is not found in the
transaction.
<Base Rules>
... ...
... ...
;CreateGlbVar;;TestVar,CHAR_ARRAY,5;
... ...
<Base Form Set Rules>
... ...
;Ext2GVM;;1,D1 21,5,TestVar,S;
... ...
NOTE: Refer to the DAL Reference for information on these related DAL functions:
GVM, HaveGVM, and SetGVM.
91
Chapter 3
Job and Form Set Rules Reference
FilterForm
Use this form set level (level 2) rule to remove all forms from a form set except those
that match the filter criteria you specify.
Option Description
Form Use this option to specify the search location for form filter criteria. All
occurrences of the data specified in the data are used for filtering. You
can specify the search location as an XML search string or as a flat file
search mask.
FilterByForm (Optional) Use this option to turn the rule on or off by transaction. If you
specify this option, the rule looks for a value of TRUE at that specified
search location. If TRUE is not found, the filter logic is not executed. If
you omit this option, the rule is always executed.
Only forms FormA and FormB will remain in the form set after the filtering process is
complete.
92
FilterForm
;BatchingByRecipINI;2;;
;FilterForm;2;;
/* Every image in this base uses these rules. */
<Base Image Rules>
;WIPImageProc;;
/* Every field in this base uses these rules. */
<Base Field Rules>
;RULWIPFieldProc;;
93
Chapter 3
Job and Form Set Rules Reference
FilterRecip
Use this form set level (level 2) rule to remove all forms from a form set except those
that match the recipient filter criteria you specify.
Syntax ;FilterRecip;;;
You can use these INI options with this rule:
< FilterRecip >
Recip =
FilterByRecip =
Option Description
Recip Use this option to specify the search location for the Recip filter criteria.
All occurrences of the data specified in the data are used for filtering.
You can specify the search location as an XML search string or as a flat
file search mask.
FilterByRecip (Optional) Use this option to turn the rule on or off by transaction. If you
include this option, the rule looks for a value of TRUE at the specified
search location. If TRUE is not found, the filter logic is not executed. If
you omit this option, the rule is always executed.
Filtering is performed using all data that matches the search criteria. Assume you have
this INI setting:
< FilterRecip >
Recip = !/transaction/PrintRecip
And this transaction data:
<transaction>
…
<PrintRecip>Insured</PrintRecip>
<PrintRecip>Agent</PrintRecip>
…
</transaction>
Only recipients Insured and Agent will remain in the form set after the filtering process
is complete.
94
FilterRecip
;WriteNaFile;2;;
;BatchingByRecipINI;2;;
;FilterRecip;2;;
/* Every image in this base uses these rules. */
<Base Image Rules>
;WIPImageProc;;
/* Every field in this base uses these rules. */
<Base Field Rules>
;RULWIPFieldProc;;
95
Chapter 3
Job and Form Set Rules Reference
ForceNoImages
Place this rule in your AFGJOB.JDT file to bypass all image processing specified in the
DDT file. This rule prevents any image level DDT rules from executing.
For instance, you could use this rule if the form set for each transaction is created and
mapped by a higher level rule which removes the necessity for executing image or field
level rules.
You can also use this rule in 2-up printing to return the msgNO_MORE_IMAGES
message. There are no parameters for this rule.
Syntax ForceNoImages( )
This rule prevents errors if you have no image level rules.
96
FormDescription
FormDescription
Use this form set level (level 1) rule to write out a form or several forms, which contain
descriptions of the other forms included in the form set. You can also specify a DAL
script you want the system to execute to get the actual descriptions to use.
NOTE: This capability exists in Documaker Workstation. This rule provides the
capability to Documaker Server.
Syntax ;FormDescription;;NoOverflow;
Parameter Description
NoOverflow Optional. This parameter tells the system not to overflow the form
description line image if there are not enough Form Description Line fields
to include the maximum number of selected forms. Keep in mind that if
this parameter is turned on and there are more forms than there are Form
Description Line fields, some of the descriptive information may be lost.
The default is the system will overflow to accommodate all selected
forms.
Keep in mind...
• Place this rule after the UpdatePOLFile rule if you are running in multi-step mode.
For single- and two-step mode, place the rule after the PaginateAndPropagate
rule.
• The names of Form Description Line variable fields must begin with FORM DESC
LINE. You can include multiple lines of these fields on a form by varying the field’s
name, such as FORM DESC LINE #002, FORM DESC LINE #003, and so on.
• For each form in a form set (and optionally for each Key2 grouping), the system will
assign to a Form Description Line field a text description of that form. Only one text
description is assigned to each From Description Line field.
• Form description lines do not wrap the description to succeeding lines. If a text is
longer than the field’s representation, the text can extend beyond page
boundaries or into undesirable areas. Make sure the Form Description Line fields
can contain the longest description. Smaller fonts generally allow more characters
per line.
• Any form can contain Form Description Line fields. You can place form description
lines on separate forms. You can also place forms with these fields among other
fields, logos, and so on.
• The placement of the form in the FORM.DAT file is important. Only those forms
placed after the first form which contains a FORM DESC LINE field will be included
in the listed forms. Please note the first form, which contains the form description
lines, is not included in the list.
INI options You can use these INI options to tell the system how to represent form group lines on
form description lines.
< FormDescTable >
IncludeKey2 = No
BoldKey2 = No
97
Chapter 3
Job and Form Set Rules Reference
Key2Prefix =
Key2PostInc = 0
IncludeDuplicateForms = No
IncludeFormName = No
StartFromFirstForm =
ColumnFormat = No
ExludedForm =
IncludeFormDesc =
< FormDescription >
Script =
Option Description
Key2Prefix Enter the text you want to appear before each Key2
description line. The system automatically adds a single
space after the text. By default, this option is blank and does
not affect the description lines.
For instance, if you enter Form Applicable – the system
prefixes all Key2 descriptions with that text. The output might
look like this:
Form Applicable — General Liability Coverage
Key2PostInc Use this option to add blank lines between Key2 descriptions
the form descriptions. For example, if you include Key2
descriptions, and set this option to one, you out put might
look like this:
Form Applicable – General Liability Coverage
IncludeDuplicateForms If you want the system to include duplicate forms, set this
option to Yes. The system excludes the duplicate forms from
the form description lines as a default.
IncludeFormName Enter No if you want to suppress the form name from the form
description lines. By default, the system includes the form
names.
98
FormDescription
Option Description
StartFromFirstForm Enter Yes if you want the system to include forms starting
from the first form. By default, only forms placed after the first
form that contains a FORM DESC LINE field are included in the
list of forms.
Note that the form that contains the form description lines is
not included in the list unless this option is turned on.
ColumnFormat By default, the system writes out the form description lines in
a columnar format with the form name on the left and pads the
text based on the longest form name. To have the system
write out the form description lines in a non-columnar format,
set this option to No. If set to No, the system adds the form
description to the end of the form name, separated by two
spaces.
Script The name of DAL script you want the system to execute.
99
Chapter 3
Job and Form Set Rules Reference
Example This example shows how you can call a DAL script to customize the description placed
in the Form Description Line fields. To use this functionality, make sure you have the
Script option set up in the FormDescription control group:
< FormDescription >
Script = AddDate.DAL
Now suppose you want to add (11/03) to the end of each description line. You would set
up the Script option to call the DAL script that contains the logic to do so. Here is an
example of the DAL script:
FName = FormName( )
FDesc = FormDesc( )
return(FName & " " & FDesc & " (11/03)");
Below is an example of the description lines generated without calling DAL script.
DEC PageCommon Policy Declarations
END PageEndorsement Page
CG DECGeneral Liability Declarations
Here is an example of the output when you call the DAL script:
DEC PageCommon Policy Declarations (11/03)
END PageEndorsement Page (11/03)
CG DECGeneral Liability Declarations (11/03)
100
GetCo
GetCo
Use this form set level rule (level 2) to get the company code (Key1 field) from the
extract data, and get its equivalent value from the INI file for use by the system.
Syntax ;GetCo;;;
This rule gets the company code (Key1 field) from the extract data using the GetRecord
search criteria specified in the data field. This rule also sets the company—stored in
the master transaction set—to the value defined in the INI file. In the INI file, this value
is stored in the Key1Table control group under the option name which equals the value
returned by GetRecord.
101
Chapter 3
Job and Form Set Rules Reference
GetLOB
Use this form set level rule (level 2) to get the line of business (from the Key2 field)
code from the extract data, and to get its equivalent value from the INI file for use by
the system.
Syntax ;GetLOB;;;
This rule gets the line of business (Key2 field) code from the extract data using the
GetRecord search criteria specified in the data field. This rule also sets the line of
business—stored in the master transaction set—to the value defined in the INI file. In
the INI file, this value is stored in the Key2Table control group under the option name
which equals the value returned by GetRecord.
102
GetRCBRec
GetRCBRec
Use this form set (level 2) level rule to set the current recipient batch file. This rule
initializes the current recipient batch file, if necessary.
This rule also sets the first printer for the current batch to be the current printer and
retrieves the next record from the current recipient batch file.
Syntax ;GetRCBRec;;;
Example ;GetRCBRec;;;
103
Chapter 3
Job and Form Set Rules Reference
GetRunDate
Use this form set level (level 2) rule when there is no value in the transaction extract
lines that can be used as the run date. This rule gets the current date and treats it as
the run date. It then reformats the date based on the format you specify in the format
mask.
The rule assumes the GVM variable RunDate is the name of the variable where the date
is stored. The RunDate variable is created if it does not exist. GVM variables are
automatically created from the fields defined in your TRNDFDFL.DFD file, or by using
the rule that explicitly creates GVM variables. If you omit the variable from being
created in one of these methods, this rule creates it for you.
Syntax ;GetRunDate;;;
The parameters you can include are the various date formats supported by FmtDate
rule. The default format is D4 (YYYYMMDD).
NOTE: There are two types of format masks, pre-defined types 1-9 and A-Q and user-
defined format arguments. If the pre-defined formats meet your needs, use
them, otherwise, create a user-defined format. For information on using pre-
defined format types, see Using Pre-defined Date Formats on page 278.
If the system date is 20090217, the date format returned will be 17 February, 2009.
;GetRunDate;;;
If the system date is 20090217, the date format returned will be 20090217.
;GetRunDate;;;
If the system date is 2-17-2009, the date format returned will be 20090217.
;GetRunDate;;J;
If the system date is 2-17-2009, the date format returned will be 17 February, 2009.
104
GVM2GVM
GVM2GVM
Use this form set level (level 2) rule to copy the data from one GVM variable to another
GVM variable. You specify the two variables using INI options, as shown in this
example:
Syntax ;GVM2GVM;;ControlGroup;
Parameter Description
ControlGroup Specify the name of the control group in the INI file that defines the
variables.
NOTE: Although this rule was created for use with GenData WIP Transaction
Processing, you can also use it to map a group of GVM variables from one name
to another name.
For GenData WIP Transaction Processing, this rule copies GVM data from the WIP.DBF
file into GVM variables for GenData execution. You define the GVM variables in the
Trigger2WIP control group.
Assume the FSISYS.INI or FSIUSER.INI file has these options:
< Trigger2WIP >
Company = Key1
LOB = Key2
This example copies the contents of the Key1 and Key2 GVM variables found in the
WIP.DBF file into the GenData Company and LOB GVM variables.
105
Chapter 3
Job and Form Set Rules Reference
IfRecipUsed
Use this form set level rule (level 2) to place a form set in a recipient batch if the
recipient name matches the one you specify with this rule. For instance, if the form is
triggered and the recipients are set to receive a copy of those images, a copy of the
images that make up the form are copied to the specified batches.
Syntax ;IfRecipUsed;;;
Example ;IfRecipUsed;;BATCH1=INSURED;
If the recipient name placed in the data area (such as INSURED) is used in this form set,
the system assigns this form set to the recipient batch named in the data area (such as
BATCH1).
You can place multiple AssignToBatch rules in the AFGJOB.JDT file. All that return true
will be placed in the appropriate recipient batch. You can assign several recipients to a
single batch. This is useful if the recipients receive very few forms or you only want to
manage a small number of batch files.
You must place this rule in the AFGJOB.JDT file before the BuildFormList rule.
106
ImageMapImportData
ImageMapImportData
Use this form set level (level 2) rule with the ImportFile or ImportExtract rule to map the
data you are importing. You can also use this rule with any other rule, such as a custom
rule, that fills in field dictionary values (like the standard V2 import methods).
Normally, when you use this type of import, you would replace the NoOpFunc rule to
do mapping via the DDT files, or you would use the MapFromImportData rule on each
field in the DDT file.
If, however, you have two environments — one that does imports and one that does
regular batch processing — you may not want to maintain two sets of DDT files.
Therefore, you could use this rule if you do not plan to execute any field level rules.
Syntax ;ImageMapImportData;;;
This rule loads the image and tries to get the data dictionary value of each field created
during the import. If you do not want the field level rules to execute in the DDT file, use
the JDT rule that skips field processing. Here is an example:
<Base Image Rules>
;StandardImageProc;3;;
;ImageMapImportData;3;;
<Base Field Rules>
;WIPFieldProc;4;No field processing;
NOTE: While the assumption is that you use this rule when you want to skip normal
field processing within the DDT files, there is no requirement that you do so. If
you omit the WIPFieldProc rule, the DDT field level rules will execute.
Depending on the rules you have assigned to your fields, this may cause
errors, or may override the data that was actually imported.
Standard data importing can supply field data at various levels, such as: form set
global, form global, and image local.
Each occurrence of a field with the same name and declared using the form set global
scope will normally have the same value. Form global scope applies to similarly
defined fields only within a given form. Image local scope means the field is specific to
that image.
Import files sometimes specify all field data at the image level and do not separate out
form set or form global data. This rule first tries to get each field's data at the dictionary
scope level defined in the FAP file. If a form set or form global value cannot be found for
a field, a second search is done at the image level.
NOTE: This approach supports both types of import files — those that specify all data
at the image level and those that separate out data at the appropriately
defined scope levels.
107
Chapter 3
Job and Form Set Rules Reference
108
ImportExtract
ImportExtract
Use this form set level rule (level 2) to import an extract file into GenData that is
comprised of:
Transaction 1
<record1, field1>, <field 2>, <field 3>, <field4>, <field5>
<record2, field1>, <field 2>, <field 3>, <field4>, <field5>
Transaction 1 (continued
<record3, field1>, <field 2>, <field 3>, <field4>, <field5>
<record4, field1>, <field 2>, <field 3>, <field4>, <field5>
Transaction 2
<record1, field1>, <field 2>, <field 3>, <field4>, <field5>
<record2, field1>, <field 2>, <field 3>, <field4>, <field5>
Transaction 2 (continued
<record3, field1>, <field 2>, <field 3>, <field4>, <field5>
<record4, field1>, <field 2>, <field 3>, <field4>, <field5>
Export file 1.
Export file 2.
Export file 3.
Export file 4.
Export file 5.
Syntax ;ImportExtract;;;
Although there are no parameters for this rule. Keep in mind:
• Specify the extract file name to be imported via the Data control group using the
ExtrFile option.
• In the Trn_File control group, set MaxExtRecLen option to the length of the longest
record in extract file.
• Only use the SearchMask option in the ExtractKeyField control group; do not use
the Key option.
109
Chapter 3
Job and Form Set Rules Reference
• To create minimum information, such as Key1, Key2, Key ID, and so on, in the
TRNFILE.DAT file for each transaction, you must define for each information item,
the field name, offset, and length in the Trn_Fields control group. This definition
associates the option fields in the Trn_Fields control group to the corresponding
entries in the transaction DFD file (TRNDFDFL.DFD).
• For each field that comprises an image (whose data comes from the export data),
you must create or have a DDT record whose field rule is set to one of the following
field rules
MapFromImportData
NoOpFunc
If you use the NoOpFunc rule for any field rule associated with the export data, you
must insert the ReplaceNoOpFunc rule in the <Base Rules> section of the
AFGJOB.JDT file.
• You must place the ImportExtract rule in the <Base Form Set Rules> section of the
AFGJOB.JDT file after the BuildFormList rule or any custom rule that creates a form
set.
• If the import extract file consists of only Documaker Workstation export files; do
not include the LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules in your
AFGJOB.JDT file.
• If the import extract file is comprised of normal transaction data records plus one
or more embedded Documaker Workstation export files; you must include the
LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules in your AFGJOB.JDT file.
Example Here are some examples which show how this rule works:
Extract file made up of In this example, the extract file is made up of normal transactions with embedded
transactions with export files. This example imports information from an extract file named IMPORT.DAT
embedded export files which is comprised of typical transactions and embedded export files. Using this
information, the system creates GenData files which are input to GenPrint. The
GenPrint program then creates the print output files. Keep in mind:
• The ReplaceNoOpFunc rule is not required in the AFGJOB.JDT file because no fields
in the sample DDT file use the NoOpFunc rule
• The options in the Trn_Fields control group are based on items in the transaction
data
• The LoadRcpTbl and RunSetRcpTbl rules are required to load and run the recipient
table
110
ImportExtract
111
Chapter 3
Job and Form Set Rules Reference
Extract file made up of In this example, the extract file is made up of one or more appended export files. This
appended export files example imports information from an extract file named IMPORT.DAT which is
comprised of one or more appended export files. Using that information, the system
then creates GenData files which are input to GenPrint. The GenPrint program then
creates the print output files. Keep in mind:
• The ReplaceNoOpFunc rule is required in the AFGJOB.JDT file because one of the
fields in the sample DDT uses the NoOpFunc rule
• The options in the Trn_Fields control group are based on items in the export data
• The LoadRcpTbl and RunSetRcpTbl rules not required
Here is a sample extract file:
;CWNG;CIS;1;NB;Export File # 1 ;;
\NA=\;CWNG;CIS;CWFBILL;
\NA=QAIBANCD\
BANNER CODE\001
BANNER CODE TXT\CWNG Company A
\NA=QAIGRAPH\
ACTUAL GJ 1\Nov
\NA=\;CWNG;CIS;CWFCRD3;
\NA=CWFCRD3\
…
;CWNG;CIS;1;NB;Export File # 2 ;;
\NA=\;CWNG;CIS;CWFBILL;
\NA=QAIBANCD\
BANNER CODE\002
BANNER CODE TXT\CWNG Company B
\NA=QAIGRAPH\
ACTUAL GJ 1\Nov
\NA=\;CWNG;CIS;CWFCRD3;
\NA=CWFCRD3\
…
112
ImportExtract
113
Chapter 3
Job and Form Set Rules Reference
ImportFile
Use this form set level rule (level 2) to import transactions (via a standard export file)
from Documaker Workstation into GenData. This rule outputs the transaction to an
NAFILE.DAT file which can then be used by the GenData program.
NOTE: You can import multiple export files if you use the SCH option.
Syntax ImportFile;;option;
There are several ways to specify the import file in the option parameter:
Option Description
FILE = file name Enter the name and path of the import file.
INI = INI control group, option Enter the INI control group and option in which the
import file is defined.
The INI and FILE options normally import the same file for each transaction. The SCH
and GVM options let you import a different file for each transaction.
Keep in mind:
• For each field that comprises an image (whose data comes from the combined
standard export file), you must create or have a DDT record with the field rule set
to one of these field rules:
MapFromImportData
NoOpFunc
If you use the NoOpFunc rule for any field rule associated with the standard export
file, you must insert the ReplaceNoOpFunc rule in the <Base Rules> section of the
AFGJOB.JDT file.
• Place the ImportFile rule in the <Base Form Set Rules> section of the AFGJOB.JDT
file after the BuildFormList rule or any custom rule that creates a form set.
• Do not include the LoadRcpTbl, RunSetRcpTbl, GetCo, or GetLOB rules in your
AFGJOB.JDT file.
114
ImportFile
Assume you have the following items defined in your master resource library. Keep in
mind:
• The ReplaceNoOpFunc rule is required in the AFGJOB.JDT file because one of the
fields in the sample DDT uses the NoOpFunc rule.
• Trn_Fields control group options are based on items in the first record of the
combined WIP/NA/POL Export data file.
• The LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules are not required if
this information was assigned from the imported file. It may, however, be
necessary to use other rules, such as the Field2GVM rule, to move data from the
imported form set fields to relevant GVM variables.
Here is a sample import file named IMPORT.DAT file:
;SAMPCO;LB1;EXPORT FILE # 1;NB;P ;;
\NA=\;SAMPCO;LB1;LETTER2;
\NA=q1snam\
\NA=q1fl2a\
DATE\October 12, 2000
LESSEE_NAME\Morris Sander
LESSEE_addr\3200 Windy Hill Road
LESSEE_city\Atlanta, GA 30339
\NA=q1b302\
\NA=q1ba36\
\NA=q1ba32\
\NA=q1sal1\
115
Chapter 3
Job and Form Set Rules Reference
Example The following examples illustrate the different ways you can define the import file
when you use this rule.
Using the File option This example imports information from a file named IMPORT.DAT in the \import
directory and uses that information to create the GenData files which the GenPrint
program uses to create the print output files.
Here is an excerpt from a sample AFGJOB.JDT file:
<Base Rules>
…
;ReplaceNoOpFunc;;;
Using the INI option This example imports information based on the Import_File option in the Import_Data
control group. Using this information, the GenData program creates the files the
GenPrint program uses to create the print output files.
Here are the sample INI settings:
< Import_Data >
Import_File = .\Import\Import.dat\
116
ImportFile
Using the SCH option This example imports multiple Documaker Workstation export files based on the
content of a line in the extract file. Using this information, the GenData program creates
the files the GenPrint program uses to create the print output files.
Here is an excerpt from a sample extract file named EXTRFILE.DAT:
;CWNG;CIS;1;NB;W ;; TXT .\Import\impt1file.dat
;CWNG;CIS;1;NB;W ;; TXT .\Import\impt2file.dat
…
117
Chapter 3
Job and Form Set Rules Reference
Using the GVM option This example imports data from an import file based on a GVM variable called
Import_File. Using this information, the GenData program creates the files the GenPrint
program uses to create the print output files. Any valid GVM variable can be used no
matter how it is created or assigned.
Here is an excerpt from a sample AFGJOB.JDT file:
<Base Rules>
....
;ReplaceNoOpFunc;;;
118
ImportNAPOLExtract
ImportNAPOLExtract
Use this form set level rule (level 2) to import an extract file into the GenData program
that is made up of:
• Typical transactions with one or more combined WIP/NA/POL export files from
Documaker Workstation embedded into each transaction This illustration shows
transactions with embedded WIP/NA/POL export files:
Transaction 1
<record1, field1>, <field 2>, <field 3>, <field4>, <field5>
<record2, field1>, <field 2>, <field 3>, <field4>, <field5>
Transaction 1 (continued
<record3, field1>, <field 2>, <field 3>, <field4>, <field5>
<record4, field1>, <field 2>, <field 3>, <field4>, <field5>
Transaction 2
<record1, field1>, <field 2>, <field 3>, <field4>, <field5>
<record2, field1>, <field 2>, <field 3>, <field4>, <field5>
Transaction 2 (continued
<record3, field1>, <field 2>, <field 3>, <field4>, <field5>
<record4, field1>, <field 2>, <field 3>, <field4>, <field5>
One or more appended WIP/NA/POL export data files from Documaker Workstation.
This illustration shows an extract file comprised of WIP/NA/POL files appended to one
another:
Syntax ;ImportNAPOLExtract;;;
Although there are no parameters for this rule. Keep in mind:
• Specify the extract file name, which contains the import information for each
transaction, in the ExtrFile option of the Data control group. This is the normal way
to define the name of the extract file.
• Only use the SearchMask option in the ExtractKeyField control group; do not use
the Key option.
119
Chapter 3
Job and Form Set Rules Reference
• For each field that comprises an image (whose data comes from the combined
WIP/NA/POL export data), you must create or have a DDT record whose field rule
is set to one of the following field rules
MapFromImportData
NoOpFunc
If you use the NoOpFunc rule for any field rule associated with the WIP/NA/POL
export data, you must insert the ReplaceNoOpFunc rule in the <Base Rules>
section of the AFGJOB.JDT file.
• You must place the ImportNAPOLExtract rule in the <Base Form Set Rules> section
of the AFGJOB.JDT file after the BuildFormList rule or any custom rule that creates
a form set.
• If the import extract file is comprised of normal transaction data records plus one
or more embedded Documaker Workstation combined WIP/NA/POL export files;
you can include the LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules in
your AFGJOB.JDT file. You may need to use other rules, like Field2GVM, to move
data from the imported form set fields to relevant GVM variables.
• To process without using DDT files, substitute the ForceNoImages rule for the
RULStandardImageProc rule.
Example Here are some examples which show how this rule works:
Extract file made up of In this example, the extract file is made up of normal transactions with embedded WIP/
transactions with NA/POL export files. This example imports information from an extract file named
embedded WIP/NA/POL IMPORT.DAT which is comprised of transactions with embedded WIP/NA/POL export
files files. Using this information, the system creates standard GenData files which are input
to the GenPrint program. The GenPrint program then creates the print output files.
Keep in mind:
• The ReplaceNoOpFunc rule is not required in the AFGJOB.JDT file because no fields
in the sample DDT file use the NoOpFunc rule
• The options in the Trn_Fields control group are based on items in the first record
of the typical transaction data
• The LoadRcpTbl and RunSetRcpTbl rules are required to load and run the recipient
table
Here is a sample extract file:
SCO1234567HEADERREC00000030198 SCOM1FP WAT1I1B119990223 804-
345-87…
SCO1234567FRMLSTREC0000010110 SCO FP T1 89999987
041598… SCO1234567PRODNMREC00000David Miller
000666666600000444...
SCO1234567PRODADREC00000100 Main Street, Suite 1200 Miami,
FL 30202…
…
WIP="SAMPCO ""LB1 ""NAPOL FILE # 1 ""NB ""P" associated w
Transaction # 1"
;SAMPCO;LB1;LETTER2;Second Letter;RD;;q1snam|D3<Insured>/
q1fl2a|D3S<Insured>/q1b302|D3S<Insured>/q1ba36…;
\ENDDOCSET\
\NA=q1snam,LN=1,DUP=OFF,SIZE=C,TRAY=U,X=0,Y=0,PA=1,OPT=D3\
\ENDIMAGE\
120
ImportNAPOLExtract
\NA=q1fl2a,LN=1,DUP=OFF,SIZE=C,TRAY=U,X=0,Y=3360,PA=1,OPT=D3S\
FDate;235;3913;12012;;;\January 1, 2000
FLessee_NAME;235;4806;12012;G;;\Morris Sander
FLessee_addr;235;5212;12012;G;;\3200 Windy Hill Road
FLessee_city;235;5636;12012;G;;\Atlanta, GA 30339
\ENDIMAGE\
…
\ENDFORM\
\ENDDOCSET\
SCO1234567COVERGREC00000SPC 25000 250 Coverage Item 2…
SCO1234567GENRALREC000001 1 3 1 0
Liability1Liability2Liability3Libility4 …
…
WIP="SAMPCO ""LB1 ""NAPOL FILE # 2 ""NB ""P" associated w
Transaction # 1"
;SAMPCO;LB1;CHARTS;Form q1cht;RD;;q1cht|D5<Insured>;
\ENDDOCSET\
\NA=q1cht,LN=1,DUP=OFF,SIZE=L,TRAY=U,X=0,Y=0,PA=1,OPT=D5\
FFORMSET PAGE NUM;17656;25740;16008;PF;;\
FFORMSET PAGE NUM OF;18408;25740;16008;PF;;\
\ENDFORM\
\ENDDOCSET\
…
SCO999567HEADERREC00000030198 SCOM1FP WAT1I1B119990223 804-
345-87…
SCO9994567FRMLSTREC0000010110 SCO FP T1 89999987
041598…
…
121
Chapter 3
Job and Form Set Rules Reference
Key2 = 40,2,N
KeyID = 4,7,N
< Trn_File >
BinaryExt = N
MaxExtRecLen= 120
Extract file made up of In this example, the extract file is made up of one or more appended WIP/NA/POL
appended WIP/NA/POL export files. This example imports information from an extract file named IMPORT.DAT
files which is comprised of one or more appended WIP/NA/POL export data files. Using that
information, the system then creates GenData files which are input to GenPrint. The
GenPrint program then creates the print output files. Keep in mind:
• The ReplaceNoOpFunc rule is required in the AFGJOB.JDT file because one of the
fields in the sample DDT file uses the NoOpFunc rule
• The options in the Trn_Fields control group are based on items in the first record
of the WIP/NA/POL export file
• The LoadRcpTbl and RunSetRcpTbl rules not required
Here is a sample extract file:
WIP="SAMPCO ""LB1 ""NAPOL FILE # 1 ""NB ""P"
;SAMPCO;LB1;LETTER2;Second Letter;RD;;q1snam|D3<Insured>/
q1fl2a|D3S<Insured>/q1b302|D3S<Insured>/q1ba36…;
\ENDDOCSET\
\NA=q1snam,LN=1,DUP=OFF,SIZE=C,TRAY=U,X=0,Y=0,PA=1,OPT=D3\
\ENDIMAGE\
\NA=q1fl2a,LN=1,DUP=OFF,SIZE=C,TRAY=U,X=0,Y=3360,PA=1,OPT=D3S\
FDate;235;3913;12012;;;\January 1, 2000
FLessee_NAME;235;4806;12012;G;;\Morris Sander
FLessee_addr;235;5212;12012;G;;\3200 Windy Hill Road
FLessee_city;235;5636;12012;G;;\Atlanta, GA 30339
\ENDIMAGE\
…
\ENDFORM\
\ENDDOCSET\
WIP="SAMPCO ""LB1 ""NAPOL FILE # 2 ""NB ""P"
;SAMPCO;LB1;CHARTS;Form q1cht;RD;;q1cht|D5<Insured>;
\ENDDOCSET\
\NA=q1cht,LN=1,DUP=OFF,SIZE=L,TRAY=U,X=0,Y=0,PA=1,OPT=D5\
FFORMSET PAGE NUM;17656;25740;16008;PF;;\
FFORMSET PAGE NUM OF;18408;25740;16008;PF;;\
\ENDFORM\
\ENDDOCSET\
122
ImportNAPOLExtract
123
Chapter 3
Job and Form Set Rules Reference
ImportNAPOLFile
Use this form set level rule (level 2) to import a single transaction, stored in a WIP/NA/
POL export file, from Documaker Workstation into the GenData program.
NOTE: If you use the SCH option, you can import multiple Documaker Workstation
WIP/NA/POL export files.
Syntax ;ImportNAPOLFile;;option;
There are several ways to specify the import file in the option parameter:
Option Description
FILE = file name Enter the name and path of the import file.
INI = INI control group, option Enter the INI control group and option in which the
import file is defined.
The INI and FILE options normally import the same file for each transaction. The SCH
and GVM options let you import a different file for each transaction.
Keep in mind:
• For each field that comprises an image (whose data comes from the combined
WIP/NA/POL export data), you must create or have a DDT record with the field rule
set to one of these field rules:
MapFromImportData
NoOpFunc
If you use the NoOpFunc rule for any field rule associated with the combined WIP/
NA/POL export data, you must insert the ReplaceNoOpFunc rule in the <Base
Rules> section of the AFGJOB.JDT file.
• Place the ImportNAPOLFile rule in the <Base Form Set Rules> section of the
AFGJOB.JDT after the BuildFormList rule or any custom rule that creates a form set.
• The LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules are not required
unless you use the SCH option.
Assume you have the following items defined in your master resource library. Keep in
mind:
• The ReplaceNoOpFunc rule is required in the AFGJOB.JDT file because one of the
fields in the sample DDT uses the NoOpFunc rule.
124
ImportNAPOLFile
• Trn_Fields control group options are based on items in the first record of the
combined WIP/NA/POL Export data file.
Here is a sample combined WIP/NA/POL import file named IMPORT.DAT:
WIP="SAMPCO ""LB1 ""NAPOL FILE # 1 ""NB ""P"
;SAMPCO;LB1;LETTER2;Second Letter;RD;;q1snam|D3<Insured>/
q1fl2a|D3S<Insured>/q1b302|D3S<Insured>/q1ba36…;
\ENDDOCSET\
\NA=q1snam,LN=1,DUP=OFF,SIZE=C,TRAY=U,X=0,Y=0,PA=1,OPT=D3\
\ENDIMAGE\
\NA=q1fl2a,LN=1,DUP=OFF,SIZE=C,TRAY=U,X=0,Y=3360,PA=1,OPT=D3S\
FDate;235;3913;12012;;;\January 1, 2000
FLessee_NAME;235;4806;12012;G;;\Morris Sander
FLessee_addr;235;5212;12012;G;;\3200 Windy Hill Road
FLessee_city;235;5636;12012;G;;\Atlanta, GA 30339
\ENDIMAGE\
…
\ENDFORM\
\ENDDOCSET\
125
Chapter 3
Job and Form Set Rules Reference
Example The following examples illustrate the different ways you can define the import file
when you use this rule.
Using the File option This example imports information from the IMPORT1.DAT file in the \import directory
and uses that information to create the GenData files which the GenPrint program uses
to create the print output files.
Here is an excerpt from a sample AFGJOB.JDT file:
<Base Rules>
…
;ReplaceNoOpFunc;;;
Using the INI option This example imports information based on the Import_File option in the Import_Data
control group. Using this information, the GenData program creates the files the
GenPrint program uses to create the print output files.
Here are the sample INI settings:
< Import_Data >
Import_File = .\Import\Import1.dat\
126
ImportNAPOLFile
Using the SCH option This example imports multiple WIP/NA/POL export files based on the content of a line
in the extract file. Using this information, the GenData program creates the files the
GenPrint program uses to create the print output files.
Here is an excerpt from a sample extract file named EXTRFILE.DAT:
;CWNG;CIS;1;NB;W ;; TXT .\Import\impt1file.dat
;CWNG;CIS;1;NB;W ;; TXT .\Import\impt2file.dat
…
Using the GVM option This example imports data from an import file based on a GVM variable called
Import_File. Using this information, the GenData program creates the files the GenPrint
program uses to create the print output files. Any valid GVM variable can be used no
matter how it is created or assigned.
Here is an excerpt from a sample AFGJOB.JDT file:
<Base Rules>
…
;ReplaceNoOpFunc;;;
127
Chapter 3
Job and Form Set Rules Reference
ImportXMLExtract
Use this form set rule (level 2) to import a file which consists of one or more XML
transactions into the GenData program for processing. Using this file, the GenData
program creates the recipient batch, NAFile, POLFile, and NewTrn files that you can
print, archive, or both using the GenPrint and GenArc programs.
NOTE: If you are running Documaker from IDS, use the ImportXMLExtract rule to bring
in XML in standard Documaker XML format, such as from Documaker
workstation or iDocumaker. Use the UseXMLExtract rule to convert a loaded
extract file into an XML tree, which you can then use to query data.
You append multiple export files to create the import XML file. The export files are
created using the Documaker Workstation XML Export option. This illustration shows
an example file comprised of export files appended to one another:
128
ImportXMLExtract
Transaction 1
<?xml version="1.0"?>
<Document Type="Oracle Universal" Version="5.0">
<DocSet>
<ArcEffectiveDate></ArcEffectiveDate>
<Library Name="Oracle Insurance"></Library>
<Key1 Name=”Company”>SkyInsur</Key1>
<KeyY2 Name=”Lob”>Package Policy</Key2>
<TransactionID Name="PolicyNum">1010j</TransactionID>
…
…
Transaction 2
<?xml version="1.0"?>
<Document Type="Oracle Universal" Version="5.0">
<DocSet>
<ArcEffectiveDate></ArcEffectiveDate>
<Library Name="Oracle Insurance"></Library>
<Key1 Name=”Company”>SkyInsur</Key1>
<KeyY2 Name=”Lob”>Package Policy</Key2>
<TransactionID Name="PolicyNum">1110j</TransactionID>
…
…
Transaction 3
<?xml version="1.0"?>
<Document Type="Oracle Universal" Version="5.0">
<DocSet>
<ArcEffectiveDate></ArcEffectiveDate>
<Library Name="Oracle Insurance"></Library>
<Key1 Name=”Company”>SkyInsur</Key1>
<KeyY2 Name=”Lob”>Package Policy</Key2>
<TransactionID Name="PolicyNum">1210j</TransactionID>
…
…
129
Chapter 3
Job and Form Set Rules Reference
Syntax ImportXMLExtract;;option;
Option Description
SP Include the SP option to suppress the pagination portion of the import. This
lets you run rules and other form set manipulations before calling a rule to
paginate the form set, such as the PaginateAndPropogate rule.
NOTE: You can only use this rule for single-step processing.
Keep in mind:
• Create a simplified AFGJOB.JDT file when you use this rule and omit these rules:
LoadRcpTbl
LoadExtractData
RunSetRcpTbl
CreateGlbVar
LoadDDTDefs
InitOvFlw
SetOvFlwSym
ResetOvFlw
• Use the NoGenTrnTransactionProc rule because the XML file has no transaction
information on the first line.
• Place the ImportXMLExtract rule in the <Base Form Set Rules> section of the
AFGJOB.JDT file after the BuildFormList rule or any rule that creates a form set.
• In the TRN_File control group, set MaxExtRecLen option to the length of the
longest record in the import file.
• In the TRN_Fields control group, include only the Key1, Key2, and KeyID options.
Set these options to dummy data, because the GVM variables are set to the data
values in the XMLTags2GVM control group during processing.
• If you load an XML or a V2 import file as the extract file, it must conform to the
extract file rules. This means that you must set the MaxExtRecLen and BinaryExt
INI options appropriately.
• Define the XMLTags2GVM control group in your FSISYS.INI file as shown here:
< XMLTags2GVM >
GVM = XMLTag, (Req/Opt)
Where GVM is the name of the GVM variable and XMLTag is the tag name in the
XML file. Include Req or Opt to specify whether it is required or optional. If it is
required and is omitted from the XML file, processing stops. Here is an example:
< XMLTags2GVM >
Key1 = Key1, Req
Key2 = Key2, Req
130
ImportXMLExtract
Example Assume you have the following items defined in your master resource library. See XML
File Format on page 137 for an example of an import file in the standard XML file format.
Here is an example of the INI options you need in your FSISYS.INI file:
< Data >
AFGJOBFile = .\deflib\afgjob.jdt
ExtrFile = .\extract\extrfile.xml
< ExtractKeyField >
SearchMask = 1,<?xml
< Key1Table >
XML = XML
< Key2Table >
XML = XML
< KeyIDTable >
XML = XML
< Trigger2Archive >
Key1 = Key1
Key2 = Key2
KeyID = KeyID
RunDate = RunDate
< TRN_Fields >
Key1 = 3,3,N
Key2 = 3,3,N
KeyID = 3,3,N
< TRN_File >
BinaryExt = N
MaxExtRecLen= 175
< XMLTags2GVM >
Key1 = Key1,Req
Key2 = Key2,Req
KeyID = TransactionID,Opt
131
Chapter 3
Job and Form Set Rules Reference
ImportXMLFile
Use this form set rule (level 2) to import an XML file into GenData for processing. Using
this file, the GenData program creates recipient batch, NAFile, POLFile, and NewTrn
files that you can print, archive, or both using the GenPrint and GenArc programs.
The export file to be used as import was created using the Documaker Workstation XML
Export function that produces a file in the Documaker Standard XML format.
Syntax ;ImportXMLFile;;option;
Option Description
SP Include the SP option to suppress the pagination portion of the import. This
lets you run rules and other form set manipulations before calling a rule to
paginate the form set, such as the PaginateAndPropogate rule.
You must place this option before the FILE option. Here is an example:
;ImportXMLFile;;SP,SCH=11,FILENAME 20,20;
This example suppresses the pagination of the import of the file designated by
this search mask.
TF Enter TF to truncate fields to the field length defined by the FAP file. Make sure
you specify this parameter before FILE option.
INI Enter the INI control group and option in which the import file is defined.
Separate the control group and option with a comma.
SCH Enter the search criteria and the file name data, separated by a space.
The name of the file, including its path, that you want to import should be
contained in the record in the file indicated by the ExtrFile option in the Data
control group.
The search criteria are one or more comma delimited data pairs, offsets and
character string, used as the search mask for finding the record in the
specified file.
The file name data is a comma delimited data pair that defines the offset and
length of the file name in the record defined by the search criteria parameter.
GVM Enter the global variable name (GVM) that contains the file name and path
information.
Keep in mind:
• Create a simplified AFGJOB.JDT file when you use this rule. For instance, omit these
rules:
LoadRcpTbl
LoadExtractData
RunSetRcpTbl
CreateGlbVar
LoadDDTDefs
132
ImportXMLFile
InitOvFlw
SetOvFlwSym
ResetOvFlw
• Use the NoGenTrnTransactionProc rule because the XML file has no transaction
information on the first line.
• Place the ImportXMLExtract rule in the <Base Form Set Rules> section of the
AFGJOB.JDT file after the BuildFormList rule or any custom rule that creates a form
set.
• In the TRN_File control group, set MaxExtRecLen option to the length of the
longest record in the import file.
• In the TRN_Fields control group, include only the Key1, Key2, and KeyID options.
Set these options to dummy data, because the GVM variables are set to the data
values in the XMLTags2GVM control group during processing.
• If you load an XML or a V2 import file as the extract file, it must conform to the
extract file rules. This means that you must set the MaxExtRecLen and BinaryExt
INI options appropriately.
• Define the XMLTags2GVM control group in your FSISYS.INI file as shown here:
< XMLTags2GVM >
GVM = XMLTag, (Req/Opt)
Where GVM is the name of the GVM variable and XMLTag is the tag name in the
XML file. Include Req or Opt to specify whether it is required or optional. If it is
required and is not present in the XML file, processing will terminate. Here is an
example:
< XMLTags2GVM >
Key1 = Key1, Req
Key2 = Key2, Req
KeyID = TransactionID, Opt
Example These examples show the different ways you can define the import file when you use
this rule. Assume you have the following items defined in your master resource library.
For an example of the standard XML file format, see XML File Format on page 137.
Here are sample INI settings in your FSISYS.INI file:
< Data >
AFGJOBFile = .\deflib\afgjob.jdt
ExtrFile = .\extract\dummy.dat
< ExtractKeyField >
SearchMask = 1,XML_FILE_NAME
< Key1Table >
XML = xml
< Key2Table >
XML = xml
< KeyIDTable >
XML = xml
< Trigger2Archive >
Key1 = Key1
Key2 = Key2
KeyID = KeyID
133
Chapter 3
Job and Form Set Rules Reference
RunDate = RunDate
< TRN_Fields >
Key1 = 1,3,N
Key2 = 5,5,N
KeyID = 10,4,N
< TRN_File >
BinaryExt = N
MaxExtRecLen = 175
< XMLTags2GVM >
Key1 = Key1,Req
Key2 = Key2,Req
KeyID = TransactionID,Opt
Here is a sample of the DUMMY.DAT file, pointed to by the ExtrFile option in the Data
control group in your FSISYS.INI file.
0 1
1 5
XML_FILE_NAME This is a dummy extract file.
NOTE: No formatting is allowed on the multi-line text field when you include the TF
option.
134
ImportXMLFile
NOTE: This option lets you import and process multiple XML files because of the way
the file name and path are specified—one file per entry in the file specified in
the ExtrFile option in the Data control group.
135
Chapter 3
Job and Form Set Rules Reference
136
ImportXMLFile
137
Chapter 3
Job and Form Set Rules Reference
<PAGE>
<SECTION NAME="let~tbl">
<DAPINSTANCE VALUE="2"/>
Indicates a
<DAPOPTIONS VALUE="M"/>
second page
</SECTION>
</PAGE>
</SHEET>
</FORM>
</GROUP>
</DOCSET>
</DOCUMENT>
Keep in mind...
• DAPOPTIONS should have a value of M for multi-page FAP images. There are other
FAP image options, but only M is applicable in XML.
Use DAPINSTANCE to provide a page number for multi-page FAP images. If the
image does not span multiple pages, omit the DAPINSTANCE value.
• When you have multiple XML transactions within a single file, separate each
transaction with a line feed. This is a requirement of Documaker software, not the
XML parser.
• Although you do not have to include line feeds inside the XML for a transaction, we
suggest you add a line feed after each element tag. This makes it easier to read the
file and helps in debugging your XML. A message like
Line 255, column 8, syntax is incorrect
138
InitArchive
InitArchive
Use this job level rule (level 1), along with the Archive rule, to run the GenArc program
as part of single-step processing.
The InitArchive rule checks the INI options in the Trigger2Archive control group,
initializes the database, opens the APPIDX.DFD and CAR files, and perform other steps
to initialize archive.
The Archive rule then unloads the current form set and converts field data for archive
using the INI options in the Trigger2Archive control group.
Syntax ;InitArchive;2;;
139
Chapter 3
Job and Form Set Rules Reference
InitConvertWIP
Use this job level (level 1) rule to perform the initialization necessary for the
ConvertWIP rule. You use this rule when you want to include the GenWIP process in
single-step mode.
Syntax ;InitConvertWIP;;;;
Example ;InitConvertWIP;1;;
140
InitMerge
InitMerge
Use this job level (level 1) rule to create a list of printers, batches, and buffers for the
RCB comment records. This rule also creates a list to hold AFP records and AFP fonts.
After the system finishes running the rule, it deletes everything the rule created.
Syntax ;InitMerge;;;
NOTE: The recipient batch files are not used at this stage. The batch list must be
created beforehand so the system will know which print files belong together.
The skipping batch message is an artifact of the batch file loading process.
Example ;InitMerge;;;
141
Chapter 3
Job and Form Set Rules Reference
InitOvFlw
Use this job level rule (level 1) to initialize the overflow feature. Overflow symbols are
created to keep track of the number of records processed. The overflow symbol is one
of the parameters that would be initialized.
Syntax ;InitOvFlw;;;
When processing an overflow form, the overflow count must be reset back to zero, if
not the processing will start with the second record in the extract.
When finished, this rule turns off the system’s overflow feature which frees resources
used when using the overflow feature and overflow variables.
Example ;InitOvFlw;;;
142
InitPageBatchedJob
InitPageBatchedJob
Use this job level (level 1) rule to open NA and POL files. This rule installs the image
level callback function for inserting recipient batch records into the AFP print stream as
AFP comment records.
When finished, this rule restores the original callback function and closes the
NAFILE.DAT and POLFILE.DAT files.
Syntax ;InitPageBatchedJob;;;
Example ;InitPageBatchedJob;;;
143
Chapter 3
Job and Form Set Rules Reference
InitPrint
Use this job level (level 1) rule to load printer and recipient batch information. This rule
sets up PRTLIB data, initializes print options, and loads a table which contains page
totals for recipient batch files.
This rule also places a structure containing all of the above information into the GVM
variable RULPRT.
Syntax ;InitPrint;;;
When finished, this rule closes any open print files.
Example ;InitPrint;;;
144
InitSetRecipCache
InitSetRecipCache
Use this job level rule (level 1) to set the cache the system will use to store recipient
information in memory. With this rule you can tell the system the amount of memory to
set aside and use for storing information in the Key1 and Key2 fields, often used to
store the company and line of business.
You can use this rule to improve processing performance for complex forms. This rule
has no affect on the processing speed for static forms.
This rule is also used in multi-step processing to enhance performance.
NOTE: If you omit this rule, the system does not set aside memory for the Key1 and
Key2 fields. If this rule causes any problems with your implementation, you
can remove it from the AFGJOB.JDT file.
Syntax ;InitSetRecipCache;;Key1,Key2;
Parameter Description
Key1 For Key1 and Key2, enter the amount of memory you want to set aside for
Key2 storing the information contained in those fields. These fields are typically
used to store information such as the company name and line of business.
You can enter any number from one (1) to 500. The default is five (5).
If you enter a zero (0), a negative number, or a number greater than 500, the
system ignores your entry and defaults to five.
Example ;InitSetRecipCache;;10,15;
This example sets the cache for the Key1 field to 10 and sets the cache for the Key2 field
to 15.
145
Chapter 3
Job and Form Set Rules Reference
InlineImagesAndBitmaps
Use this form set level (level 2) rule if you do not want to use Library Manager to
maintain forms and logos but still need to retrieve the exact data that was printed. This
rule lets you inline all FAP files and embed logos into the NA file.
NOTE: Keep in mind the size of the NA file and archive will grow significantly if you use
this rule. Furthermore, the performance of the GenData, GenPrint, and GenArc
programs will degrade significantly if you use this rule.
Syntax ;InlineImagesAndBitmaps;;;
Use this rule only when necessary and when performance and the size of the output are
not issues.
This rule loads all images and logos and ignores the LoadFAPBitmap and LoadCordFAP
INI options. There are no parameters for this rule.
The return values are: msgSUCCESS or msgFAIL.
146
InsNaHdr
InsNaHdr
The InsNAHdr rule is a legacy rule that few installations would ever need to use. This
rule has no affect unless you also include this INI option:
< RunMode >
NAUnload = No
NOTE: Do not set the NAUnload option to No unless you are specifically directed to do
so by Oracle Insurance services or support personnel.
The InsNaHdr rule and this option tells the system the NAFILE.DAT file will not be
unloaded in a single process. Instead, it will be unloaded a piece at a time. Specifically,
the system unloads the image header into the NAFILE.DAT file before the remainder of
the image is processed.
Using this rule implies that you will create the NAFILE.DAT file as the form set is being
processed, instead of waiting until after the process has completed and creating the
NAFILE.DAT file in one step.
Syntax InsNaHdr( )
There are no parameters for this rule. This rule builds the NA header and appends it to
NAFILE.DAT file.
Example ;InsNaHdr;3;;
147
Chapter 3
Job and Form Set Rules Reference
InstallCommentLineCallback
Use this job level (level 1) rule during the AFP printing process to write transactional
information into each page of the print stream. The information is written using AFP
comment records and contains the recipient batch record information — the same
information written into recipient batch files for each transaction.
Before adding the recipient batch record information as a comment record on each
page, this rule also calculates and updates several GVM variables and structures that
can be used by other rules which are executed during the print process. The values
updated include the number of pages in each batch and the current page within the
print stream.
The CurPage and TotPage GVM variables must be declared within the recipient batch
record definition. Here is an example:
< FIELD:CurPage >
INT_TYPE = LONG
EXT_TYPE = CHAR_ARRAY_NO_NULL_TERM
EXT_LENGTH = 10
< FIELD:TotPage >
INT_TYPE = LONG
EXT_TYPE = CHAR_ARRAY_NO_NULL_TERM
EXT_LENGTH = 10
Normally, the CurPage variable reflects the current page number within the print
stream. This is not necessarily the same as the page number that might actually print
on the document. The TotPage variable reflects the total number of pages within a
given transaction. Depending the other rules in use during the process, the value or
meaning of these GVM variables can vary.
The comment information written into the print stream can serve multiple purposes,
such as to later facilitate 2-up printing. During a 2-up printing process, you sometimes
need to know whether the page on the left and the page on the right are from the same
or different transactions. By having the recipient batch record information written into
each page, it is possible to query that information and make the appropriate
determination. You can use the ParseComment rule during the 2-up printing process to
reconstruct the associated GVM variables in memory from the recipient batch record
information stored in these comment records.
Syntax ; InstallCommentLineCallback;1; ;
This rule has no parameters.
Example ; InstallCommentLineCallback;1; ;
148
JobInit1
JobInit1
Use this job level rule (level 1) to initialize resources such as input files, output files,
and tables.
Syntax ;JobInit1;;;
This rule opens the log file, opens the extract file, creates the NA and POL files, opens
forms set file, and opens and initializes recipient batch files. When finished, this rule
closes the files it opened during the pre-processing stage.
Example ;JobInit1;;;
149
Chapter 3
Job and Form Set Rules Reference
LoadDDTDefs
Use this job level rule (level 1) to load the field rules from the MASTER.DDT file into an
internal linked list. You must include this rule in the AFGJDT.JDT file if your field level
rules are defined in the MASTER.DDT file.
This rule is used with the Master field level rule.
Syntax ;LoadDDTDefs;;;
If you have variable fields that you use on most of your forms, such as Name and
Address fields, you can use the MASTER.DDT file to store these variable field
mappings.
If you use the MASTER.DDT file, add the Master rule to all variable fields on the image.
The Master rule tells the system to look in the MASTER.DDT file for mapping
information for those variable fields.
Using the MASTER.DDT file is helpful if you need to make a change to the variable field
mapping because you only have to make changes once in the MASTER.DDT file. It’s
also helpful when you are setting up complicated rules since you only have to map the
fields once. Test your mappings in the MASTER.DDT file before you copy them to other
variable field mappings.
Example ;LoadDDTDefs;;;
150
LoadExtractData
LoadExtractData
Use this form set level (level 2) rule to load extract data into memory for each
transaction. You must include this rule if any subsequent rules will search for or use
extract data.
You must include this rule if:
• You are executing the GenTrn, GenData, and GenPrint programs as separate
processes (multi-step processing), and
• Subsequent rules will search for or use extract data
If you omit this rule from the AFGJOB.JDT for multi-step processing, you will receive
these error messages:
DM10702: Warning in BuildFormList(): No extract records.
VMMCountList(pRPS->ExtractListH) = 0. Processing will continue.
DM12018: Error in RPDoBaseFormsetRulesForward(): Unable to
<BUILDFORMLIST>().
NOTE: Do not include this rule if you are using the NoGenTrnTransactionProc rule.
Doing so will cause the GenData program to go into a processing loop.
Syntax ;LoadExtractData;;;
151
Chapter 3
Job and Form Set Rules Reference
LoadFormsetFromArchive
Use this form set level (level 2) rule to extract a form set from a DAP archive based on
archive keys stored in a standard extract file.
NOTE: You can use the LoadFormsetFromArchive rule to replace the BuildFormList,
LoadRcpTbl, and RunSetRcpTbl rules in the AFGJOB.JDT file.
Because the LoadFormsetFromArchive rule loads a complete form set, it is usually not
necessary to execute the image and field level rules. To skip image and field rule
processing it is necessary to specify the appropriate rules in the AFGJOB. See the
example below. If required, the loaded form set can be modified using other
transaction level rules or DAL scripts.
Syntax ;LoadFormsetFromArchive;;;
There are no parameters for this rule, but you can use these INI options:
< LoadFormsetFromArchive >
Key =
DisplayFields =
TempFile =
Debug =
Option Description
Key Use this option to build the search request for the APPIDX. You can
specify multiple Key options if necessary. The first transaction that
matches the values for the fields is extracted from archive.
You can specify the Key search value as an XML or standard flat file
search mask, such as (1, HEADER). Here is another example:
Field(UNIQUEID) Search(!/Form/UNIQUEID) OFFSET(1)
Length(40)
If the keys are not unique, the extracted matching transaction can be
arbitrary.
DisplayFields (Optional) Use this option to specify a list of archive index fields you want
printed to the log file and console as the system processes the
transaction.
TempFile (Optional) Use this option for debugging purposes. If you include this
option, the system writes the NA and POL files to the temp file model
name you specify.
For example, if you specify TEMP.TXT, the NA and POL files are written to
TEMPNA.TXT and TEMPPOL.TXT, respectively.
Debug (Optional) Enter Yes to have the system write debug information into the
log file.
152
LoadFormsetFromArchive
153
Chapter 3
Job and Form Set Rules Reference
LoadListFromTable
Use this job level rule (level 1) to load a table specified in your FSISYS.INI file’s Data
control group into a link list and place the handle of the list into the GVM variable you
specify.
Syntax ;LoadListFromTable;;;
This rule has these parameters:
Parameter Description
GVM_LISTNAME The name of the GVM variable in which the handle of the list
should be stored.
INI_TABLE_OPTION The name of the option in the Data control group in the INI file
you want the system to load. This option should specify the
name of the table.
The LoadListFromTable rule loads the POLTYPE.TBL file into a list whose handle is
stored in a GVM variable named POLTYPES. Any line in the file that starts with an
asterisk (*) is omitted from the list.
154
LoadRcpTbl
LoadRcpTbl
Use this form set level (level 2) rule to load entries from the SETRCPTB.DAT file based
upon the current Key1 field (such as company), Key2 field (such as line of business),
and the transaction type.
NOTE: You can use the LoadFormsetFromArchive rule to replace the BuildFormList,
LoadRcpTbl, and RunSetRcpTbl rules in the AFGJOB.JDT file.
Only those entries in the SETRECPTB.DAT file that match the Key1, Key2, and
transaction type will be loaded and processed. By loading only those that match, the
processing becomes more efficient.
Syntax ;LoadRcpTbl;;;
Example ;LoadRcpTbl;;;
155
Chapter 3
Job and Form Set Rules Reference
LoadTblFiles
Use this job level rule (level 1) to load one or more text tables listed in the tables list
file, which is defined in the FSISYS.INI file’s Data control group, in the TblFile option.
This rule lets you make available many table files for use by Documaker Server. These
table files can contain lists of codes, abbreviations, and addresses which might be hard
to maintain in a large extract file.
Syntax ;LoadTblFiles;;;
This rule frees memory resources used to store the tables. Here is an example of the
TblFile option:
< Data >
TblFile = .\deflib\TblFile.Dat
Example ;LoadTblFiles;;;
This example loads all the tables listed in the tables list file defined in the INI file. The
table data can then be accessed using the MovTbl rule.
156
LoadTextTbl
LoadTextTbl
Use this job level rule (level 1) to load all specified text tables into the text table list for
use by field level rules. All text tables should be listed in the text table listing file, which
is defined in the FSISYS.INI file’s Data control group, in the TextTbl option.
This rule loads all defined tables and makes them available for use by Documaker
Server. These text files can contain paragraphs and messages which might be hard to
maintain in a large extract file.
Syntax ;LoadTextTbl;;;
When finished, this rule erases the text table list. Here is an example of the TextTbl
option:
< Data >
TextTbl = TextTbl.Dat
Example ;LoadTextTbl;;;
157
Chapter 3
Job and Form Set Rules Reference
MergeAFP
Use this form set level (level 2) rule to initialize input files. This rule populates the AFP
record list, retrieves RCB comment records, and terminates the input files.
This rule also initializes output files, and writes out the AFP record list, adding end
page and end document records as necessary. The rule then terminates these output
files.
Syntax ;MergeAFP;;;
Example ;MergeAFP;;;
158
MergeRecipsFromForm
MergeRecipsFromForm
Use this form set level (level 2) rule to assign the recipients from a specific form to the
other forms in a form set. This lets you reduce the number of recipient triggers when all
recipients receive the majority of the forms in the form set.
Parameter Description
FormName The name of the form from which the recipient names are copied. The
other forms in that form set are assigned these recipients, if they're not
already there.
The form name you specify can occur multiple times in the form set and
the unique recipient names from all copies are assigned to the
remaining forms in the form set.
Z flag If you want the system to copy recipients with a zero copy count, enter
the character Z (or z). The default is blank.
NOTE: If you want the system to copy recipients with a zero copy count, use the Z flag
(it’s not case sensitive). Here is an example:
;MergeRecipsFromForm;2;FormName,Z;.
The system ignores that recipient and does not copy it to the other forms in the
form set if the copy count is set to zero for a recipient and the Z flag is omitted.
159
Chapter 3
Job and Form Set Rules Reference
MergeWIP
Use this job level (level 2) rule to initialize GenData WIP Transaction Processing. This
rule creates a transaction memory list to which it adds transactions from the WIP file
that have status codes which match those in the rule’s parameters.
The status codes identified by this rule do not have to be identified by the
WIPTransactions rule. You can include status codes for transactions that you want to
delete from the WIP file. Transactions with status codes not including in this rule’s
parameters remain in the WIP file when processing finishes.
These other rules are also used when you run WIP Transaction Processing:
NOTE: If you are using the MergeWIP rule with the BatchingByRecipINI rule, be sure
to use the =DAL and =GVM operators. For more information, see Formatting
Data with the = Operator on page 287. The MergeWIP rule gets all of its data
from WIP, not an extract file.
Syntax ;MergeWIP;;StatusCode1,StatusCode2,...;
Parameter Description
StatusCode Use the StatusCode parameters to define the status codes of the
transactions in the WIP file you want to add to the memory list. Identify
the status codes you want to included in the Status_CD control group.
Here is an example:
< Status_CD >
Accepted = AC
Approved = AP
BatchPrint = BP
Rejected = RJ
160
MergeWIP
WIP selection The system automatically limits the result sets queried from DBMS systems by the
performance during batch MergeWIP rule to the rule's parameters for the STATUSCODEs to significantly improve
processing query speeds when this rule is run against large WIP index tables.
When the WIP index table is in a DBMS, the appropriate WHERE clause for the
STATUSCODE is added to the query automatically. A separate query for each
STATUSCODE provided to the MergeWIP rule is used to retrieve the WIP list.
To improve performance on very large WIP tables, add an index on the DBMS WIP index
table on the STATUSCODE column to avoid full table scans. An index on the WIP index
table on the CURRUSER and STATUSCODE columns can also improve the performance
of other queries to the WIP index table when the query to build a WIP list for a specific
user is performed.
Using dates to select The MergeWIP rule can check a date field in the WIP index to determine whether to
transactions insert the WIP record into the batch. By default the field name is ScheduleDate. You can
use this INI option to change the name of the field that is used:
< MergeWIP >
ScheduleDateFieldName = ScheduleDate
If the data in the field is eight bytes, the system assumes the date is in YYYYMMDDD
format. If the data in the field is 14 bytes, the system assumes a YYYYMMDDhhmmss
format. You can change the format the MergeWIP rule expects for the date using this
INI option:
< MergeWIP >
ScheduleDateFieldFormat = D4%1
You can combine date and time formats into one string separated by percent signs (%).
This table shows the date formats:
2 DD/MM/YY 99/99/99
3 YY/MM/DD 99/99/99
5 MM/DD/YY ZZ/ZZ/ZZ
6 DD/MM/YY ZZ/ZZ/ZZ
7 YY/MM/DD ZZ/ZZ/ZZ
8 MM/DD/YY LZ/LZ/LZ
9 DD/MM/YY LZ/LZ/LZ
A YY/MM/DD LZ/LZ/LZ
B MMDDYY ZZZZZZ
C DDMMYY ZZZZZZ
161
Chapter 3
Job and Form Set Rules Reference
D YYMMDD ZZZZZZ
E MonDDYY MonZZZZ
F DDMonYY ZZMonZZ
G YYMonDD ZZMonZZ
H DOY/YY ZZZ/ZZ
I YY/DOY ZZ/ZZZ
L Mon-DD-YY Mon-ZZ-ZZ
M DD-Mon-YY ZZ-Mon-ZZ
N YY-Mon-DD ZZ-Mon-ZZ
R Month Month
Returning a warning Instead of returning an error if it comes across an empty WIP list when merging WIP,
message the system can issue a warning. To have the system issue a warning instead of an error,
set the WIPWarnOnEmpty option to Yes, as shown here:
< RunMode >
WIPWarnOnEmpty = Yes
162
MergeWIP
Changing the WIP Status You can tell the system not to delete WIP records and files during the MergeWIP/
WIPTransactions process if an error occurs, but instead change the WIP status to
something you define.
This way, if an error occurs during batch processing, the WIP will still exist in its normal
place. But since its status has changed, the system will not include it in the next batch
run. You can then examine the transaction to determine what caused the error.
Use the following INI option to set up the transaction error code you want to use:
< Status_CD >
TransErrCode = E
Option Description
TransErrCode You can enter up to two characters, numbers or both for the transaction
error code.
163
Chapter 3
Job and Form Set Rules Reference
MultipleDataDictionaryFiles
Use this form set level (level 2) rule to specify multiple data dictionaries (XDBs) to use
across multiple Key1/Key2 combinations. You can specify which item (Key1, Key2) or
combination of items determines the switch. If the database is not found in the list of
possibilities, the system loads the default XDB, as specified by the original INI option.
Syntax ;MultipleDataDictionaryFiles;2;parameters;
You specify the parameters based on which key tells the system when to switch from
one data dictionary to another. You can use the keys individually or in any combination.
You specify XDB files using the MultiDataDict control group. For each XDB file, use an
INI option similar to the one shown here:
< MultiDataDict >
File = FileName;IDFormat
Option Description
File For FileName, include the full file name and path followed by a semicolon. The
IDFormat is based on the parameters you supplied to the rule.
Note: In the first example below, the IDFormat would be Key2Value, for the
second example, it would be Key1Value;Key2Value.
Based on the first example, assume Key2 has these possible values:
CAR, BOAT, and MISC
with corresponding XDBs of:
CARXDB.DBF, BOATXDB.DBF, and MISCXDB.DBF
The AFGJOB.DAT file would contain:
;MultipleDataDictionaryFiles;2;Key2;
Thus whenever the Key2 ID changed to one of these values, the appropriate XDB would
be loaded.
Based on the second example, assume Key1 has these possible values:
LIFE and VEHICLE
164
MultipleDataDictionaryFiles
Whenever the Key1 and Key2 combination changed to one of these values, the system
would load the appropriate XDB.
165
Chapter 3
Job and Form Set Rules Reference
NoGenTrnTransactionProc
Use this form set level (level 2) rule when you use the GenData program by itself to
execute the GenTrn and GenData steps. In that processing environment, this rule,
processes the extract file and creates the information normally created in both the
GenTrn and GenData steps.
When combined with the InitPrint and PrintFormset rules, it creates the output files
created during the GenPrint step.
NOTE: Do not use this rule if you are running the GenTrn, GenData, and GenPrint
programs as separate processes. Do not use this rule with the LoadExtractData
rule. Doing so will cause the GenData program to go into a processing loop.
This rule replaces the RULStandardTransactionProc rule in the performance mode JDT.
Syntax ;NoGenTrnTransactionProc;;;
This rule loads extract file records for the current transaction into memory. To use this
rule, you must add the following options in your FSISYS.INI or FSIUSER.INI file:
< Data >
TrnFile = <CONFIG:~Platform > TrnFile
< CONFIG:PC >
TrnFile = NUL
...or else include a TRNFILE.DAT file, which you can leave empty.
Example ;NoGenTrnTransactionProc;;;
166
OMRMarks
OMRMarks
Use this job level (level 1) rule to generate OMR marks on 1-up documents printed on
any supported base system printer or on 2-up documents printed on any AFP printer
that supports 2-up printing.
OMR marks are used to indicate ZIP code change, demand feed, inserts and so on. OMR
marks are solid boxes placed on a page.
The rule loops through the pages of the form set and creates special images for each
page with the required OMR marks. The OMR marks are based on special settings in
your FSISYS.INI or FSIUSER.INI file. The INI file settings use special global variable
names, rule names, and conditions to trigger specific OMR marks.
Syntax ;OMRMarks;;Cond(LetterOMR);
Parameter Description
Cond (Optional) Indicates special conditions exist for printing OMR marks.
LetterOMR (Optional) Refers to the data in the Condition table (CONDTBL). The true
or false for this condition triggers the printing of the set of OMR marks for
particular transaction.
Place this rule after the WriteNAFile rule in the AFGJOB.JDT file.
NOTE: Keep in mind the OMRMarks rule is a post process rule. This means that
pagination and propagation takes place before the rule is called. So, this rule
goes back through the form set after the forms have been created and places
a mark on each page.
You must include the PaginateAndPropagate rule after the OMRMarks rule
because, during post processing, the system executes the rules in the JDT file
from bottom to top.
LetterCode is a global variable with the name, CD-LTR-TYPE. This variable has a type of
Char (character) and a length of four. In this example, any time the condition is true, the
system prints OMR marks on the page created for the transaction it is processing.
You must update your FSISYS.INI or FSIUSER INI files as follows.
167
Chapter 3
Job and Form Set Rules Reference
Enter the path for your table files in the MasterResource control group. Use the
TablePath option to define the table file’s path.
< MasterResource >
TablePath = \deflib\
Enter the file name of your Condition table in the Tables control group. Use the
Conditions option to define the Condition table’s file name.
< Tables >
Conditions = CondTbl
Create the OMR_Params control group with all necessary options in your FSISYS.INI or
FSIUSER INI file.
Here is an example of INI settings for 1-up printing:
< OMR_Params >
Mark = Cord(2100, 2140, 300, 1000), RuleParms(INSERT2),
Rule(FlagFromGVM), When(All)
Mark = Cord(4200, 4240, 300, 1000), Rule(Always), When(All)
Mark = Cord(2100, 2140, 700, 1300), Rule(Always), When(All)
Mark = Cord(6300, 6340, 700, 1300), RuleParms(A-AND-C),
Rule(Always), When(All), Cond(ac)
Parameter Description
Mark Definition for each OMR mark. You need a definition for each OMR
mark that can be generated on a page. For instance if eight is the
maximum number of OMR marks per page, you need eight mark
definitions in this control group.
Cord(t,b,l,r) Top, bottom, left, and right coordinates for the page in FAP units (1
inch = 2400 FAP units) for 1-up printing.
Cord(Left(t,b,l,r), Top, bottom, left, and right coordinates for the page in FAP units (1
Right(t,b,l,r)) inch = 2400 FAP units) for 2-up printing. Left is for the left side and
right is for the right side of the 2-up paper.
Page() Indicates which sides to print: Both or B = both left and right; Left or
L = left side only; Right or R = right side only.
RuleParms() The Input parameter to the rule, as specified in the Rule() parameter.
168
OMRMarks
Parameter Description
Rule Description
Cond() You can use condition logic for one OMR mark or for the whole set.
Here is an example: Cond(ac)
DivertPage Generates the OMR mark only for a special divert page. This only
applies to 2-up printing. If you use this rule, you must also define the
DivertOpt and DivertOMR options in the TwoUp control group.
FlagFromGVM Generates the OMR mark if the GVM variable defined in the
RuleParms is set to zero (0) or one (1).
You control generation based on data in an extract record (using the
Ext2GVM or Field2GVM rules) or based on a DAL script which uses
the SetGVM function.
The GVM variable must be in the RCBDFDFL and TRNDDFDFL files.
ZipCodeChange Generates the OMR mark only when the ZIP code has changed. You
must define the parameter associated with this rule as a global
variable or else define it in the RCBDFDFL.DAT file.
• In 1-up printing when you have multiple copies of the same form
• In 2-up printing when you are printing duplex
169
Chapter 3
Job and Form Set Rules Reference
170
PageBatchStage1InitTerm
PageBatchStage1InitTerm
Use this job level rule (level 1) to create and populate a list of records which contain
page ranges and total page counts for each recipient batch file.
This rule is typically used for handling 2-up printing for AFP and compatible printers.
This rule is also used with multi-mail processing.
This rule creates a list (populated in another rule) to contain the recipient batch records
for a multi-mail transaction set. The rule then writes out the recipient records for the
final multi-mail transaction set and writes out the total page counts for each recipient
batch.
• Fields must be added to the RCBDFDFL.DFD file for the file containing the total
page counts for the recipient batches. Do not remove or change the BatchName
and RecordCount fields.
• The name of the file containing page counts should be specified in the CounterTbl
option of the TwoUp control group.
• Because the end of a multi-mail set is not signaled until the following transaction,
you must write out the recipient records for the final transaction set at the job
level.
Syntax ;PageBatchStage1InitTerm;;(MMField);
Parameter Description
MMField (Optional) Name of the INI option in the Trn_Fields control group which
defines where the multi-mail code will be found in each transaction.
NOTE: If you use this rule, you must also use the BatchByPageCount and
WriteRCBWithPageCount rules.
Example If you omit the MMField parameter, the system uses standard batching by page count,
as shown below:
;PageBatchStage1InitTerm;;;
If you include the MMField parameter, the system uses batching by multi-mail
processing, as shown below:
;PageBatchStage1InitTerm;;MMField=MM_Field
171
Chapter 3
Job and Form Set Rules Reference
PaginateAndPropagate
Use this form set level (level 2) rule to paginate the form set and merge in or propagate
field data.
Parameter Description
Debug If you include this parameter, the system writes debug information
about pagination to the log file.
For performance reasons, you would not typically use this option unless
directed by support.
FooterMode This parameter controls how the footers are treated in regards to
pagination. You can enter 0, 1, or 2. The default is zero (0) which is the
standard way the rule handles footers.
Normally this rule is placed in the Base Form Set Rules section of the AFGJOB.JDT file
at or near the end of the rule list. This location is important because you want the rule
to execute as one of the first steps of transaction post-processing. Place this rule after
the PrintFormset rule in the Base Form Set Rules section of the AFGJOB.JDT file when
running in single-step mode.
This rule is a post-process rule, meaning that initial pagination and propagation takes
place before the rule is called. This rule then goes back through the form set.
Footer modes 1 and 2 search the logical page for footers marked as copy-on-overflow
and then determine the upper limit of those footers. That point becomes the lower limit
of the body images.
As the system checks the body images to determine if they exceed the lower limit, it
raises the lower limit if there is another footer with a higher limit. This prevents the a
large footer at the bottom of a long logical page from affecting pages on which it does
not appear.
Modes 1 and 2 differ in how they handle an overlap when a footer is encountered that
raises the lower limit above a body image that is already determined to fit on the page.
With mode 1, the system increases the limit and reevaluates the image on that page. It
also lets the second from the last page have a large area reserved with nothing printed.
With mode 2, the system moves the footer to the next page so the footer can appear on
a page by itself.
172
PaginateAndPropagate
With mode zero (0), the default, the system searches the logical page for all footers and
determines the upper limits of the footers. That becomes the lower limit of the body
images. When a body image exceeds this lower limit, the system splits the logical page
into two pages.
The image that exceeds the limit and all following images are moved up and to the
second page. Images on the first page marked as copy-on-overflow are copied to the
second page. Images on the second page marked as copy-on-overflow are copied back
to the first page. The system then searches the second page for all footers, determines
the upper limit of that footer, and continues the process.
NOTE: Previously, this rule was known as the PaginateAndPropogate rule. You can
use either spelling.
173
Chapter 3
Job and Form Set Rules Reference
ParseComment
Use this form set level (level 2) rule when merging two AFP print streams in a 2-up
printing process. This rule parses the recipient batch record information written as an
AFP comment into each printed page back into the GVM variables associated with the
recipient batch DFD. You would do this, for example, if you need to know whether the
page on the left and right side (as accomplished through 2-up printing) are from the
same transaction.
For this rule to be useful, the appropriate comment records, matching the recipient
batch record DFD, must have been added to the print streams that are being merged in
the 2-up printing process. A rule such as InstallCommentLineCallback is used during
the original print step is an example.
Parameter Description
Example This example shows how to use this rule to access the specific occurrences of RCB
comment records retrieved from AFP files.
;ParseComment;;Left;
;PreTransDal;;MyScript;
;ParseComment;;Right;
;PreTransDAL;;MyScript;
If you include the Side parameter, be sure to finish using the values from one record
before parsing the other record, because this method replaces the primary instance of
the GVM variable data. This example also shows that you can use a DAL script to
manipulate the parsed GVM variables.
If you want to use a DAL script and get data from both sides (omitting the Side
parameter), you would specify two (2) as the optional second parameter to the GVM
function to access the second (right side) set of data.
LeftData = GVM( name )
RightData = GVM( name, 2 )
174
PostTransDAL
PostTransDAL
Use this form set level rule (level 2) in the AFGJOB.JDT file to execute a DAL script on
the POST_PROC_A message. The PostTransDAL rule executes after other form set rules
and image level rules stored in the form set’s DDT files.
You can use this rule to handle follow up tasks after form set rules and image rules
stored in the form set’s DDT file are executed. For example, you can use this rule to
clear or change GVM and internal DAL variables.
Syntax ;PostTransDAL;;string;
Parameter Description
Although you can use DAL to access almost any form set or image field, keep in mind
those fields may not exist, depending on where you place this rule in the transaction
job rule list. And, unlike the DAL or IF rules, there is no return value from the execution
of a transaction level DAL script.
Use this form to get extract data if the script is contained in the rule data. You cannot
use this form in external script files.
A = {1,MIS257 138,1}
Where A is a DAL variable you wish to assign. The bracketed {} item can be almost any
standard search mask supported by the Get Record infrastructure. In this case,
1,MIS257 is the search criteria. If the record is found, the system takes the data from
position 138, length 1 as indicated by 138,1.
This method also lets you specify an occurrence of the record by including a hyphen
with a numeric value, such as -n, after the data length. Here is an example:
A = {1,MIS257 138,1-5}
Here the function searches for the 5th occurrence of the 1,MIS257 record. If you omit
the occurrence, the system returns the first one found. If it cannot find the requested
record, the system assigns the variable an empty “” value.
NOTE: To specify multiple DAL statements in the rule data area, separate the DAL
statements using two colons (::). Normally, semicolons separate DAL
statements, but this character is illegal in the rule data area.
Example ;PostTransDAL;;Call("posttran.dal");
This example executes the Call DAL function which executes the DAL script contained
in the POSTTRAN.DAL file in the DefLib directory specified in your MRL.
;PostTransDAL;;If HaveGVM("main_address") Then
SetGVM("main_address", "25 Brown St.", , “C”, 20)::End;
In this example, the system checks to see if the GVM variable (main_address) exists. If
not, it creates a character array GVM variable (main_address) 20 characters is length
and stores the character string (25 Brown Street) in the array.
175
Chapter 3
Job and Form Set Rules Reference
176
PreTransDAL
PreTransDAL
Use this form set level rule (level 2) in the AFGJOB.JDT file to execute a DAL script on
the PRE_PROC_A message. The PreTransDAL rule executes before other form set rules
and before image rules stored in the form set’s DDT files.
You can use this rule to handle setup tasks which should occur before form set rules
and image rules stored in the form set’s DDT file are executed. For example, you can
use this rule to initialize GVM and internal DAL variables.
Syntax ;PreTransDAL;;string;
Parameter Description
Although you can use DAL to access almost any form set or image field, keep in mind
those fields may not exist, depending on where you place this rule in the transaction
job rule list. And, unlike the DAL or IF rules, there is no return value from the execution
of a transaction level DAL script.
Use this form to get extract data if the script is contained in the rule data. You cannot
use this form in external script files.
A = {1,MIS257 138,1}
Where A is a DAL variable you wish to assign. The bracketed {} item can be almost any
standard search mask supported by the Get Record infrastructure. In this case,
1,MIS257 is the search criteria. If the record is found, the system takes the data from
position 138, length 1 as indicated by 138,1.
This method also lets you specify an occurrence of the record by including a hyphen
with a numeric value, such as -n, after the data length. Here is an example:
A = {1,MIS257 138,1-5}
Here the function searches for the 5th occurrence of the 1,MIS257 record. If you omit
the occurrence, the system returns the first one found. If it cannot find the requested
record, the system assigns the variable an empty “” value.
NOTE: To specify multiple DAL statements in the rule data area, separate the DAL
statements using two colons (::). Normally, semicolons separate DAL
statements, but this character is illegal in the rule data area.
177
Chapter 3
Job and Form Set Rules Reference
In this example, DAL checks to see if the GVM variable (main_address) exists. If not, it
creates a character array GVM variable (main_address) 20 characters in length and
stores the character string (25 Brown Street) in the array.
178
PrintData
PrintData
Use this form set level (level 2) rule to print the form set. This rule is used for handling
2-up printing on AFP and compatible printers.
Syntax ;PrintData;;;
NOTE: The image handler installed by the InitPageBatchedJob rule is called during
the printing stage. If you want to make any modifications to the recipient batch
record, you must do so before this point.
Example ;PrintData;;;
179
Chapter 3
Job and Form Set Rules Reference
PrintFormset
Use this form set level (level 2) rule when you use the GenData program by itself to
execute GenTrn and GenPrint processes (single-step processing). In that processing
environment, this rule, when combined with the InitPrint rule, prints form sets.
NOTE: Do not use this rule if you are running the GenTrn, GenData, and GenPrint
programs as separate processes.
Syntax ;PrintFormset;;;
This rule checks the recipients for the form set and then identifies the print batch in
which this form set should be included. It then prints the form set.
This rule has no parameters.
When you use this rule, you must also include a BatchByPageCount or
BatchingByRecipINI rule to produce print batches and the final print stream. If you omit
either of these rules, you’ll get the following error message:
Unable to <PRINTFORMSET>()
NOTE: You must define the BatchingByRecip control group to pass parameters to this
rule. Use this control group to specify the batch names and search criteria
(conditions) for the batches. If you receive this error message, also check the
condition.
Option Description
LogFileType Specifies the type of the log file. Enter XML for an XML file. Any other
entry results in a text file.
180
PrintFormset
Option Description
LogFile Specifies the name of the log file. Include the full path. If you omit the
path, the system uses DATAPATH. If you omit this option, the system
creates a file named TMP.LOG.
If you enter XML in the LogFileType option and a different extension
here, the system uses XML.
NOTE: You must place this rule before the PaginateAndPropagate rule in the Base
Form Set Rules section of the AFGJOB.JDT file when running in single-step
mode. When running in multi-step mode, use the MultFilePrint callback
functionality.
The log file that is created is either a semicolon-delimited text file, formatted like the
file created by the MultiFilePrint callback function or an XML file. Here is an example of
the layout of the XML file:
<?xml version="1.0" encoding="UTF-8" ?>
- <LOGFILE>
- <TRANSACTION INSTANCE="1">
<BATCH NAME="Logical Batch Name">.\data\BATCH1.BCH</BATCH>
<GROUP1 NAME="Company">SAMPCO</GROUP1>
<GROUP2 NAME="Lob">LB1</GROUP2>
<TRANSACTIONID NAME="PolicyNum">1234567</TRANSACTIONID>
<TRANSACTIONTYPE NAME="TransactionType">T1</TRANSACTIONTYPE>
<RECIPIENT NAME="INSURED">INSUREDS COPY</RECIPIENT>
<FILE>DATA\0rDcP7WxytE8ECp5jexhWXVqkV840Vw_F-GykT_VMfd.PDF</FILE>
</TRANSACTION>
- <TRANSACTION INSTANCE="2">
<BATCH NAME="Logical Batch Name">.\data\BATCH2.BCH</BATCH>
<GROUP1 NAME="Company">SAMPCO</GROUP1>
<GROUP2 NAME="Lob">LB1</GROUP2>
<TRANSACTIONID NAME="PolicyNum">1234567</TRANSACTIONID>
<TRANSACTIONTYPE NAME="TransactionType">T1</TRANSACTIONTYPE>
<RECIPIENT NAME="COMPANY">COMPANY COPY</RECIPIENT>
<FILE>DATA\0v3l7pBdVqHceoRL5hf2xqjJ7WMxiRVO9U70iFiIcne.PDF</FILE>
</TRANSACTION>
</LOGFILE>
Use the options in the DocSetNames control group to determine which XML elements
are created. The values in this control group are the same as those written to a recipient
batch or TRN file.
181
Chapter 3
Job and Form Set Rules Reference
ProcessQueue
Use this job level (level 1) rule to process the queue you specify.
Syntax ;ProcessQueue;;(Queue);
Parameter Description
This rule loops through the list of functions for the queue you specify and then frees
the queue when finished.
Example ;ProcessQueue;;PostPaginationQueue;
This example tells the system to process the PostPaginationQueue.
182
ProcessRecord
ProcessRecord
Use this form set (level 2) rule to switch between print files as necessary when printing
2-up forms on an AFP printer. This rule updates the page count for current print file and
loads and merges the form set.
Syntax ;ProcessRecord;;;
Example ;ProcessRecord;;;
183
Chapter 3
Job and Form Set Rules Reference
ProcessTriggers
Use this form set level (level 2) rule to process the groups (Key1, Key2 combinations)
that exist in the form set, as opposed to only a single set of keys specified in the
TRNFILE.DAT file.
NOTE: This rule replaces the LoadRcpTbl and RunSetRcpTbl rules. You can replace
those two rules with this one even if you are not using multiple lines of
business (Key2s) in your document.
Syntax ;ProcessTriggers;;;
NOTE: The ProcessTriggers rule was added to support multiple lines of business
during the triggering process. Normally, the RunSetRcpTbl file only supports
the main (Key1+Key2) setting identified with the transaction. The
ProcessTriggers rule, however, will process all defined lines of business (each
Key1+Key2 combination) at trigger time. This means if you use an import rule
to create the transaction, you can have multiple lines of business in batch
processing and trigger additional forms and images. You can use the
ProcessTriggers rule with both Documaker Studio and the legacy tools.
If you are only using the Studio implementation model, you may want to use
the RunTriggers rule.
184
PXCandidateList
PXCandidateList
Use this transaction-level rule (level 2) to build the form candidate list, based on the
Form Candidate List DAL Trigger, and determine if the requested DAL script in the
AFGJOB.JDT file should be evaluated.
The PXCandidateList rule acts as a functional equivalent for the PreTransDAL rule. The
PXCandidateList rule executes the DAL script specified in the calling AFGJOB entry.
The DAL script then builds the State Loc table and returns control to the
PXCandidateList rule. This rule next processes each of the State Loc table records
against the FED table to build a Form Candidate list and a Consolidated Form State Loc
table.
NOTE: The PXCandidateList and PXTrigger rules support Policy Xpress FED
processing. These rules act as replacements for the PreTransDAL and
DALTrigger rules when you are doing Policy Xpress FED-specific processing.
Syntax PXCandidateList
Example In this example, the rule calls a DAL script named Xpress_create():
;PXCandidateList;;Xpress_create();
The called DAL script then builds the State Loc and Form tables. Using these tables, the
rule then builds a list of all possible forms for a given transaction. This form list is used
by the PXTrigger rule to determine if the requested DAL trigger should be executed.
INI Options
You can use these INI options with this rule:
Option Description
StateLocTable (optional) Enter the name of the state location table. The default is
T_St_Loc.
FormLocTable (optional) Enter the name of the form location table. The default is
T_FM_Loc.
FedTable (optional) Enter the name of the FED table. The default is T_F_List.
FedTable (optional) Enter the name of the FED table. The default is pxfed.
StatLocTableDFD (optional) Enter the name of the state location table DFD file. If you
omit the path, the file is written to the deflib directory. The default
is T_St_Loc.dfd.
FormTableDFD (optional) Enter the name of the form table DFD file. If you omit the
path, the file is written to the deflib directory. The default is
T_F_List.
185
Chapter 3
Job and Form Set Rules Reference
Option Description
FedTableDFD (optional) Enter the name of the FED table DFD file. If you omit the
path, the file is written to the deflib directory. The default is
pxfed.dfd.
CLDebugFile (optional) Enter the name of the debug file. If you omit the path, the
file is written to the data directory. The default is cldebug.dat.
DumpCandList (optional) Enter Yes to have the system write the form candidate list
details into the debug file. The default is No.
To enable this option, you must also set the CLDebug option to Yes.
DumpFrmStTable (optional) Enter Yes to tell the system to write the Form-State Loc
table records to the debug file. The default is No.
To enable this option, you must also set the CLDebug option to Yes.
DumpFrmStLocEnt (optional) This tells the system to write the unloaded (by the
PXTrigger rule) State Loc entries for the form. The default is No.
To enable this option, set the CLDebug option to Yes.
DBTable:”Table” (optional) Enter the name of the table handler. The default table
handler for all tables is MEM.
Option Description
Form_List (optional) Enter Yes to enable form list processing. The default is No.
XPTranslateLOB The LOB (GROUP NAME 2) determines the type (Commercial Auto, Property Lines,
Personal Lines) of FED processing. If you are using a non-standard LOB, use the
XPTranslateLOB control group to translate the LOB to a standard LOB code. Here are
the standard LOB codes:
186
PXTrigger
PXTrigger
Use this transaction-level (level 2) rule to execute a DAL script if certain conditions are
met. The PXTrigger rule replaces the DALTrigger rule. This rule is executed as part of
RunSetRcpTable processing.
NOTE: The PXCandidateList and PXTrigger rules support Policy Xpress FED
processing. These rules act as replacements for the PreTransDAL and
DALTrigger rules when you are doing Policy Xpress FED-specific processing.
This rule does not call the requested DAL script unless the requested form is in the form
candidate list. The rule performs a look up using the requested SetRecip entry form
name against the Form Candidate List table.
If the form is not found, the requested DAL script is not executed and the rule returns a
trigger count of zero (0).
If the form is found, the rule unloads from the Consolidate Form State Loc table the
StateLoc records into the FormStateLoc memory table based on the SetRecip entry
form name.
Once the records are unloaded, the PXTrigger rule executes the requested DAL script.
If the appropriate debug options are set, the FormStateLoc table and FormsList are
unloaded to flat files.
Syntax ;DOCU;CA;CAINIT;;NBS;INSURED(1);;0;0;0;1;;PXTrigger;CAINIT;
187
Chapter 3
Job and Form Set Rules Reference
Form
RunSetRcpTbl
Candidate List
Consolidated
Form State
Loc Table
PXTrigger
Form State
Loc Table
Request DAL
Script
PXTrigger
188
PXTrigger
Input Tables
State loc table Here are the required fields for the state location table.
Form Char 36
State Char 8
ControllingState Char 2
Location Char 8
SubLocation Char 8
ProgramCd Char 6
FED table Here are the required fields for the FED table.
FormNumber Char 36
FormProcessingType Char 1
189
Chapter 3
Job and Form Set Rules Reference
Rules Processor
AFGJOB
PXCandidateList
Execute DAL
Script
State Loc
Xpress_create()
Table
Return Control
Consolidated
Form
Form State
Candidate List
Loc Table
FED processing For each State Loc Record, a query is executed against the FED table using the LOB,
State, and, if populated, the ProgramCd. Each of the returned FED records are then
evaluated to determine if they are valid for the current State Loc table row.
FED record validation For form list processing, the FED record must have a FormProcessingType of R.
The FED record validation date compares are based on the LOB groups defined above.
If a LOB is not found in the standard groups (and is not translated to a standard LOB)
the Commercial Auto compare is executed by default. The specific date validation/
compares are explained below.
190
PXTrigger
For each FED record that passes validation, its FormNumber is added to the form
candidate list (if the form does not already exist) and a row is inserted into the Form
State Loc table (FormNumber plus the current State Loc Record).
Validation Description
Commercial If the Transaction Type is PCH, the date evaluation is executed using
auto validation the State Loc record's TransactionEffectiveDate.If the Transaction Type
is not equal to PCH, the date evaluation is based on the FED records
EffectiveDateSourceCd value.
If the EffectiveDate SourceCd is PE, the date evaluation is executed
using the State Loc record's PolicyEffectiveDate. Otherwise, the date
evaluation is executed using the State Loc Record's PolicyWrittenDate.
Personal lines If the EffectiveDate SourceCd is PE, the date evaluation is executed
validation using the State Loc record's PolicyEffectiveDate. Otherwise, the date
evaluation is executed using the State Loc Record's PolicyWrittenDate.
Property lines If the Transaction Type is PCH, the date evaluation is executed using
validation the State Loc record's LocationAddrDate. If the transaction type is not
equal to PCH, the date evaluation is based on the FED records
EffectiveDateSourceCd value.
If the EffectiveDate SourceCd is PE, the date evaluation is executed
using the State Loc record's PolicyEffectiveDate. Otherwise, the date
evaluation is executed using the State Loc Record's PolicyWrittenDate.
191
Chapter 3
Job and Form Set Rules Reference
RegionalDateProcess
Use this job-level (level 2) rule to execute regional date processing (RDP) rules on
forms. You create the RDP rules via Documaker Studio.
NOTE: See the Documaker Studio User Guide for more information on creating RDP
rules.
In the U.S. insurance industry, certain forms must comply with a regional authority
(usually a state) to be approved for use within that area. The process of getting
approval to use forms in each location is often referred to as submitting for state
compliance.
Because of the various jurisdictions involved, you may have a form which is accepted
by some states, but not by others. Alternatively, the form might be accepted by
multiple states, but as of different dates. And to add another layer of complexity, states
specify which document date must be used when activating this form.
To understand this last point, consider that almost all insurance policies have a date
when coverage becomes effective – typically referred to as the policy effective date.
Likewise, a policy usually has a written date that identifies when the document was
actually drawn up. It is not unusual for the written date to be different from the policy
effective date. For instance, you might buy your hurricane insurance today (the written
date), but the policy does not become effective for 30 (or more) days. Each regional
authority specifies which date determines the compliance of a given form.
This necessity to only activate the use of a form in a given region after a specific date
complicates the creation of trigger conditions. Not only do you have to consider the
typical transaction information that would cause you to include the form, you also have
to calculate the various details to comply with the regional authorities described
above.
To help you more easily manage this process, Studio lets you define regional date
processing (RDP) rules that you can assign to each form. Part of the support is
accomplished in Studio by defining the appropriate regional tests for each form. The
remaining part occurs during the batch transactional process via the
RegionalDateProcess rule.
Syntax RegionalDateProcess;;;
There are no parameters for this rule.
Place this rule before any rule that calls the base triggering functionality, such as the
RunSetRcpTbl rule. RDP rules operate as a filter that aids the normal triggering process
by eliminating forms which do not meet the necessary criteria.
RDP rules are defined in group form files and assigned to individual forms. RDP rules
are optional and only those forms containing one or more such rules are subject to this
filtering process.
192
RegionalDateProcess
If a form has one or more RDP rules defined, these are evaluated during execution of
this rule. The execution proceeds like this:
First, the system locates and evaluates the date search token associated with the
rule. The resulting date value obtained from the transaction data is compared
against the date range provided in the rule. If the date value is out of range, the
form is flagged for possible elimination and execution moves to the next RDP rule.
If the date value is within the valid range, the next step is to iterate through the
region search tokens associated with the rule and evaluate each. Each region
search token might yield multiple hits. The system cross-references this list of
values against the inclusion and exclusion list provided in the rule. If there is an
intersection between the two lists, the rule is considered satisfied and the system
moves to the next RPD rule. If the search token results in no matches for the list,
then the system continues with the next search token until all search tokens are
exhausted.
If the rule completes execution of the regional search tokens without finding any
matches for the defined set, the form is flagged for possible elimination.
Each RDP rule executes in this manner which means that at the point where one rule
considers the form eligible, no further RDP rules are execute on that form. Instead, RDP
processing will immediately move to the next form.
If all RDP rules for a given form consider the form ineligible, then the form remains
flagged with this state and is skipped during the subsequent triggering job rule
process.
INI options You can enter Yes for the RegionalDateProcess option to turn on debugging if you run
into problems. Here is an example:
< Debug_Switches >
RegionalDateProcess = Yes
193
Chapter 3
Job and Form Set Rules Reference
194
ReplaceNoOpFunc
ReplaceNoOpFunc
Use this job level rule (level 1) to register the MapFromImportData rule which the
system will then use in place of the NoOpFunc rule.
Syntax ;ReplaceNoOpFunc;;;
There are no parameters for this rule. You typically use this rule with the following
import rules:
• ImportFile
• ImportExtract
• ImportNAPOLFile
• ImportNAPOLExtract
NOTE: Use this rule if any of the DDT files for your images are set to use the NoOpFunc
rule. If you use the MapFromImportData rule instead of the NoOpFunc rule, you
do not have to use this rule.
195
Chapter 3
Job and Form Set Rules Reference
ResetDocSetNames
Use this form set level (level 2) rule to reset the pRPS structure after the GVM variables
have been remapped.
Syntax ;ResetDocSetNames;;;
Normally, after it loads the transaction, the system uses the options in the
DocSetNames and Trn_Fields control groups to map GVM variables into the pRPS
structure for GroupName1, GroupName2, and TransactionID. There are other fields, but
GroupName1, GroupName2, and TransactionID are the primary ones.
When you use the MergeWIP rule, or an rule that imports the document field
information normally mapped by the transaction rule, you may need to use the
GVM2GVM rule to map the options in the Trigger2WIP control group back to GVM
variables. Because the names of the Key1 and Group1 fields sometimes differ, this
means the mapping occurs too late to also be mapped to the pRPS structure member.
Therefore, you must use the ResetDocSetNames rule to reset the pRPS structure after
the GVM variables have been remapped.
When you use the EXT2GVM rule to get the values for GroupName1, GroupName2, and
GroupName3, especially in an XML implementation, be sure to include the
MapBeforeReset parameter to re-map the RPS structures. With the parameter, this rule
gets the GroupName values from global memory and converts them into the long
values using the Key1Table andKey2Table control groups. This is typically used to
convert company codes to company names and so on.
Here is an example:
;UseXMLExtract;;;
;Ext2GVM;;!/Forms/Key1 1,10,Company;
;Ext2GVM;;!/Forms/Key2 1,15,LOB;
;ResetDocSetNames;;ConvertBeforeReset;
To avoid using this rule, make sure the primary keys are defined the same way in these
DFD files:
• TRNDFDFL.DFD
• RCBDFDFL.DFD
• WIP.DFD
196
ResetOvFlw
ResetOvFlw
Use this form set level rule (level 2) to reset the overflow feature.
Syntax ;ResetOvFlw;;;
This rule resets or reinitializes all of the overflow variables. In general, the overflow
symbol will keep track of record counts as the extract is processed. When an overflow
variable is defined, the system adds it to an overflow symbols list. This list contains
several attributes for each symbol. This rule resets those attributes to the default
values assigned when you initially defined the overflow symbol.
Example ;ResetOvFlw;;;
197
Chapter 3
Job and Form Set Rules Reference
RestartJob rule
Use this job level (level 1) rule to open the restart file (RSTFILE) and reset the EXTRFILE,
TRNFILE, NEWTRN, NAFILE, POLFILE, and batch files at the broken transaction. The
RestartJob should be first base rule.
NOTE: If the restart file does not exist, the system skips this rule.
Syntax ;RestartJob;;;
You can set up the GenData program to restart itself at a particular transaction if it
encounters a failure. To accomplish this, the system uses a restart file. You use INI
options to set up the restart file.
NOTE: This rule does not apply if you are using single-step processing.
198
RULCheckTransaction
RULCheckTransaction
Use this form set level (level 2) rule to save the files necessary for restarting the
GenData program. This rule should be the first base form set rule.
Syntax ;RULCheckTransaction;;;
The rule saves the EXTRFILE offset, TRNFILE offset, NEWTRN offset, NAFILE offset,
POLFILE offset, and batch file offsets into a restart (RSTFILE) file. You can set up the
GenData program to restart at a particular transaction if it encounters a failure. To
accomplish this, the system uses a restart file. Use INI options to set up the restart file.
NOTE: This rule does not apply if you are using single-step processing.
INI options These offsets are updated in the post process after a specific number of transactions.
You specify the number of transactions using the CheckCount option. You define the
Restart file and the and check count in the Restart control group:
< Restart >
RstFile =
CheckCount =
Option Description
RstFile Enter the name of the restart file. If you omit this option, the system uses
RSTFILE.RST (DD:RSTFILE for z/OS) as the file name.
The system uses the DataPath option in the Data control group to
determine where to create the restart file. The default location is the
current working directory.
199
Chapter 3
Job and Form Set Rules Reference
RULNestedOverFlowProc
Use this form level rule (level 2) to nest overflow within overflow. The nested overflow
can occur on as many levels as necessary. This lets you use the system as a reporting
tool. The only requirement is that the data occur in order.
This rule lets you create groups that contain group headers (lead images), subordinate
images (list images), and group footers (following images).
Syntax ;RULNestedOverFlowProc;;;
Insert this rule in the AFGJOB.JDT file just after the RunSetRcpTbl rule.
To specify how the nesting occurs, you must create a file named OVERFLOW.DAT. You
can create this file using any ASCII editor. By default, the system looks for this file in
the DefLib directory, however, you can specify a different path and file name as the
second parameter. Here is an example:
;RULNestedOverFlowProc;;c:\fap\dll\newfile.dat;
OVERFLOW.DAT file The file format for the OVERFLOW.DAT file is as follows:
format
;LeadIMG;LeadMask;ListIMGInfo;ListMask;FollIMGInfo;
Parameter Description
LeadIMG The group header inserted by normal triggering rules or by a previous call
to the NestedOverflowProc rule. The group header is the image name
without the extension of the lead image.
LeadMask The search mask that originally triggered the lead image, in this syntax:
Offset,Record
Offset is the offset into the extract file. Record is the specific search key.
ListIMGInfo Information about the subordinate image that overflows beneath the
group header image. The format is the same as is in the FORM.DAT file:
ImageName|ImageAtts<Recip1(CpyCnt),Recip2(CpyCnt),…>
ImageName is the name of the image without the extension.
ImageAtts are the attributes of the image (using the flags used in the
FORM.DAT file such as D=data entry and print, S=same page, W=can
grow, and so on.
RECIP1 is the recipient name.
CPYCNT is the recipient copy count.
Normally, you should set the attributes to DS. (D=data entry and print and
S=same page). This information should not exceed 255 characters.
ListMask (Optional) The search mask which triggers occurrences of the subordinate
image beneath the group header image. Use this syntax:
Offset, Record
Where...
Offset is the offset into the extract file.
Record is the specific search key.
If you omit this parameter, only one image is inserted.
200
RULNestedOverFlowProc
Parameter Description
FollIMGInfo (Optional) Information about the group footer image which, if specified, is
inserted after the last subordinate image for the current group. The format
is the same as is in the FORM.DAT file:
ImageName|ImageAtts<Recip1(CpyCnt),Recip2(CpyCnt),…>
ImageName is the name of the image without the extension.
ImageAtts are the attributes of the image (using the flags used in the
FORM.DAT file such as D=data entry and print, S=same page, W=can
grow, and so on.
RECIP1 is the recipient name.
CPYCNT is the recipient copy count.
Normally, you should set the attributes to DS. (D=data entry and print and
S=same page). This information should not exceed 255 characters.
Before this rule is called, the lead image should already be in the form set—either
through normal image triggering or by placing another call to this rule on a previous
line.
The system begins by reading the OVERFLOW.DAT file line by line. The system finds the
first occurrence of the lead image in the form set and then finds the first occurrence of
the lead mask in the extract file.
It then counts the number of list masks between the first and second lead mask. Next,
the system inserts the number of list images after the first lead image and then inserts
the follow image.
The system continues going through the form set inserting the number of list images
in between the nth and (n+1)th lead images, according to the number of list masks in
the extract file in between the (n)th and (n+1)th lead masks.
When it reaches the last lead image, the system counts the remaining list image masks
after the last lead mask and inserts the appropriate number of list images. Lastly, it
inserts the following image, if specified.
NOTE: The following image and the list masks are optional. If there is no list mask,
only one list image will be inserted.
Example This example shows how to generate list images subordinate to lead images. In this
example Record1 is the lead mask, and Record2 is the list mask.
LeadImage is the lead image and ListImage is the list image. The rule would count
three Record2s between the two Record1s. If Record1 is actually the fifth Record1 in the
extract file for the current transaction, the system would find the fifth LeadImage in the
form set and insert three ListImages after this LeadImage.
Also, there is only one recipient, Recip1.
.
.
.
000000001RECORD1 data1
000000001RECORD2 data2
000000001RECORD2 data3
201
Chapter 3
Job and Form Set Rules Reference
000000001RECORD3 data4
000000001RECORD4 data5
000000001RECORD4 data6
000000001RECORD2 data7
000000001RECORD1 data8
. . . .
. . . .
. . . .
The example below shows the line in the overflow file. In the first example, the
corresponding line in the overflow file for the previous example would appear as
shown here:
;LEADIMAGE;10,RECORD1;LISTIMAGE|DS<RECIP1(1)>;10,RECORD2;;
The next example shows how to add a following image. If a following image was
needed, the line from the file would look as shown here. Assume the following image
is named FOLLOWIMAGE:
;LEADIMAGE;10,RECORD1;LISTIMAGE|DS<RECIP1(1)>;10,RECORD2;FOLLOWIMAG
E|DS<RECIP1(1)>;
This following example shows how to add another recipient. If a second recipient (with
copy count of 3) was specified for the list image but not for the following image, the line
would appear as shown here. Assume the second recipient is Recip2:
;LEADIMAGE;10,RECORD1;LISTIMAGE|DS<RECIP1(1),RECIP2(3)>;10,RECORD2;
FOLLOWIMAGE|DS<RECIP1(1)>;
This example shows how to change the image attributes. So far the image attributes
were set as DS—data entry and print and same page. If the list image was dynamic, you
must add the W (can grow) attribute. The line would now look as shown here:
;LEADIMAGE;10,RECORD1;LISTIMAGE|DSW<RECIP1(1),RECIP(2)>;10,RECORD2;
FOLLOWIMAGE|DS<RECIP1(1)>;
The example also shows nested/recursive functionality by iteration because this rule
builds upon previous lines. This lets you have unlimited amounts of overflow within
overflow.
Here are some points to consider concerning insertion logic:
• Reverse insertion logic when inserting different list images after the same lead
image.
Because of the nature of insertions, if two lines in the overflow file use the same
lead image, the list image in the second line is inserted before the list image on the
first line. This requires a sort of reverse logic when creating the overflow.
202
RULNestedOverFlowProc
This excerpt demonstrates that the images are not inserted in the order of list
search masks in the extract file but in the reverse order of the occurrence of list
images in the overflow file.
NOTE: If while processing the rule the system encounters invalid lines in the overflow
file, it ignores those lines and adds log entries into the log file. The system then
continues processing.
203
Chapter 3
Job and Form Set Rules Reference
RULStandardFieldProc
You must include this form set level rule (level 2) in the AFGJOB.JDT file as the first field
rule. This rule tells the system to process each field on all of the images triggered by
the SETRCPTB.DAT file.
NOTE: This rule is used in multi-step processing. The StandardFieldProc rule is used
in single-step processing.
Syntax ;RULStandardFieldProc;;;
There are no parameters for this rule.
Example ;RULStandardFieldProc;;;
204
RULStandardImageProc
RULStandardImageProc
You must include this form set level rule (level 2) in the AFGJOB.JDT file as the first
image rule. This rule tells the system to process each image triggered by the
SETRCPTB.DAT file.
NOTE: This rule is used in multi-step processing. The StandardImageProc rule is used
in single-step processing.
Syntax ;RULStandardImageProc;;;
There are no parameters for this rule.
Example ;RULStandardImageProc;;;
205
Chapter 3
Job and Form Set Rules Reference
RULStandardJobProc
You must include this rule as the first job level rule (level 1) in the AFGJOB.JDT file.
Syntax ;RULStandardJobProc;;;
There are no parameters for this rule.
Example ;RULStandardJobProc;;;
206
RULStandardTransactionProc
RULStandardTransactionProc
You must include this form set level rule (level 2) in the AFGJOB.JDT file as the first
transaction level rule. This rule tells the system to process each transaction listed in
the extract file.
NOTE: Do not use this rule if you are using single-step processing. You only use this
rule if you are not using the NoGenTrnTransactionProc rule.
Syntax ;RULStandardTransactionProc;;;
There are no parameters for this rule.
Example ;RULStandardTransactionProc;;;
207
Chapter 3
Job and Form Set Rules Reference
RULTestTransaction
Use this form set debugging rule (level 2) before the RULStandardTransactionProc rule
to have the system look for an INI group like the one shown below and execute only the
transactions specified there.
Syntax ;RULTestTransaction;;;
The numbers shown below are sequence numbers, not transaction IDs. If you define
the Test control group, the system will skip any transaction number not specified in the
control group.
< Test >
TransactionRecordNumber = 1 ; do transaction 1
TransactionRecordNumber = 5 ; and transaction 5
Example ;RULTestTransaction;;;
208
RunSetRcpTbl
RunSetRcpTbl
Use this form set level rule (level 2) to run all entries in the set recipient table which
pertain to the current GroupName1, GroupName2, and TransactionType to generate
the form set for the current transaction.
NOTE: You can use the LoadFormsetFromArchive rule to replace the BuildFormList,
LoadRcpTbl, and RunSetRcpTbl rules in the AFGJOB.JDT file.
For more information on setting recipients and copy counts, see the Documaker Server
System Reference.
Syntax ;RunSetRcpTbl;;;
Place this rule in the AFGJOB.JDT file, after the BuildFormList rule.
Example ;BuildFormList;;;
;RunSetRcpTbl;;;
This example tells the system to process the SETRCPTB.DAT file to determine which
forms and images it should include in the POLFILE.DAT file for each recipient.
209
Chapter 3
Job and Form Set Rules Reference
RunTriggers
Use this form set level (level 2) rule to replace the LoadRcpTbl and RunSetRcpTbl rules
in implementations created by Documaker Studio.
Syntax ;RunTriggers;;;
There are no parameters for this rule.
NOTE: This rule is only available if you are running Documaker Studio. If you do not
use Documaker Studio, see the discussion of the ProcessTriggers rule.
The RunTriggers rule represents an improved triggering process tailored for the file
structure implemented with Documaker Studio. This process removes some of the
complexity and improves performance.
For instance, in the old triggering process, if your form trigger asked for three copies of
a form and then you processed the image triggers, only the last copy of the form was
affected by the image triggers. The first two copies, would have been static based upon
the default image configuration in the FORM.DAT file. Using the RunTriggers rule, each
copy of the form will process image triggers. This means each form can differ from the
prior one — assuming your image triggers check unique information to achieve that
goal.
210
RunUser
RunUser
Use this job level (level 1) rule to execute a user function. You can use this rule to run a
user function such as GetRecsUsed, IncRecsUsed, or ResetRecsUsed, to manipulate an
overflow variable. This rule lets you manipulate an overflow variable without
immediately making use of it in a field mapping.
Syntax ;RunUser;;;
Example Overflow variables are variables you can use when a DDT rule is searching an extract
record using a search mask. You can use the overflow variable to vary the occurrence
of the record you are searching for.
Typically, the AFGJOB.JDT file contains the rule…
;ResetOvFlw;;;
…which resets all overflow variables to zero at the beginning of each transaction. The
RunUser rule lets you reset to zero at any time during field processing by running the
ResetRecsUsed user function via the RunUser rule.
211
Chapter 3
Job and Form Set Rules Reference
ServerFilterFormRecipient
Use this form set (level 2) rule with the DPSPrint object in IDS to generate a print file
that contains a set of forms which will be filtered by
• Form name
• Form description
• Recipient name
Syntax ;ServerFilterFormRecipient;;;
The following attachment variables are created if these properties of the DPSPrint
object are not null, in other words...
Once job ticket is created, Documaker processes the job. Documaker reads the job
ticket and creates a GVM variable with this name:
DPRFORMNAME, DPRFORMDESCRIPTION, and DPRRECIPIENTNAME.
The ServerFilterFormRecipient rule looks for the GVM name DPRFORMNAME,
DPRFORMDESCRIPTION, and DPRRECIPIENTNAME and filters out the mismatch
condition.
Here is an example in Visual Basic:
Private Sub CmdPrint_Click()
Dim oDPSVar As New DPSPrint
Dim oDPSIDS As New DPSIDS
oDPSVar.inputFile = FldInputFile.Text
212
ServerFilterFormRecipient
oDPSVar.configurationName = FldConfig.Text
oDPSVar.outputFile = FldOutputFile.Text
oDPSVar.outputPath = FldOutputPath.Text
oDPSVar.printerType = FldPrinterType.Text
oDPSVar.Forms = "ABC,DEF*,*XYZ"
oDPSIDS.send oDPSVar
FinalOutput.Text = oDPSVar.outputPath + oDPSVar.outputFile
End Sub
All form names that equal ABC or start with DEF or contain XYZ are included in the final
print file.
If all inputs (DPRFORMNAME, DPRFORMDESCRIPTION and DPRRECIPIENTNAME) exist,
the recipient name is evaluated first and the form name and form description are
evaluated later.
NOTE: Include this rule in the AFGJOB.JDT file after the LoadRcpTbl rule.
Example ;ServerFilterFormRecipient;;;
213
Chapter 3
Job and Form Set Rules Reference
ServerJobProc
Use this job level rule (level 1) when you use the Internet Document Server (IDS) to run
Documaker. This rule replaces the RULStandardJobProc rule.
NOTE: You must have a license to both IDS and Documaker to use this rule. For more
information on setting up IDS and Documaker, see the Internet Document
Server Guide.
Syntax ;ServerJobProc;;;
Insert this rule in the AFGJOB.JDT file as the first rule.
This rule looks for a job ticket file in the current working directory and loads it as an
XML file. All of the values on the XML tree are added to or updated in the INI options.
After Documaker finishes processing, the rule checks the status. If there are errors, it
returns a no more bases return code on the next iteration. This terminates Documaker.
This rule uses a polling technique—sleep a while and check for the file existence—
which you can configure using INI options. The rule loads the job ticket and sets INI
options used when running subsequent rules. On the post message, this rule creates a
job log XML tree and writes it to disk. If any necessary values are missing from the XML
job ticket, these values are generated and changed (or appended) in the INI context.
On RP_PRE_PROC_B, this rule creates a semaphore (gendata), which makes it possible
for the IDS RPDCheckRPRun rule to detect the status of Documaker when the next
processing job starts.
This rule stays in waiting status and checks for the existence of job ticket file
(JOBTICKET.XML) and the rpdrunrp semaphore. As soon as the job ticket file is
detected, this rule loads it onto the XML tree and uses the contents of the XML tree to
update INI options in memory.
If the rule does not detect the rpdrunrp semaphore, the rule terminates Documaker by
returning a msgNO_MORE_BASES return code. It also creates a GVM variable
(DSISERV) so the CUSInitPrint rule can re-initialize printers after the job process is
complete. This GVM variable can be used by any of the Documaker rules to detect if the
Documaker is running under IDS, if different logic is needed.
On RP_POST_PROC_B, the rule writes out the job log file and removes the job ticket
file. If the RULServerJobPRoc option is set to Yes, a copy of the file will be obtained for
debugging purposes.
214
ServerJobProc
Option Description
Port Enter the name of the print batch file for each designated
printer. Note the group name is defined by the printer option in
the PrinterInfo control group.
SleepingTime Enter the amount of time in milliseconds you want the system to
wait before it checks for a job ticket. The default is 1000 (1
second).
215
Chapter 3
Job and Form Set Rules Reference
Option Description
RULServerJobProc Enter Yes to get a copy of the job ticket file before the system
removes it.
MultiFilePrint Enter Yes to generate multiple print files which use 46-byte
unique names.
To identify which recipients are in which print batch, enter No or
omit this option.This causes the PrintFormSet rule to save the
printer for the print batch along with its recipient information.
The ServerJobProc rule then adds three new tags for each print
batch file and adds them to the JOBLOG.XML file.
For example, for the print batch file on PRINTER1, the system
creates these new tags:
<PRINTER1RECIP>Insured</PRINTER1RECIP>
<PRINTER1CODE>001</PRINTER1CODE>
<PRINTER1DESC>Insured Copy</PRINTER1DESC>
The MultiFilePrint option should only be used with the PDF, RTF,
HTML, and XML print drivers.
LogFileType Specify the type of print log file, such as XML or TEXT.
LogFile Enter the name and path of the print log file. If you omit the
extension, the system uses the LogFileType option to determine
the extension.
216
SetErrHdr
SetErrHdr
Use this job level rule (level 1) to define the header information used in the error file if
an error occurs during the processing of a transaction. You can use any global variable
(GVM) in the text defined to the system.
Syntax ;SetErrHdr;;Token:Text;
Parameter Description
Token A string of characters used to denote the beginning and end of a global
variable name. Use a colon (:) to terminate the token string of characters.
To substitute a global variable into the text, surround the name of the
global variable with the token string. Be sure to use a string of unique
characters for the token that are not defined in the text. For example, you
could use '***'. You cannot use a colon (:) in the TOKEN string.
Text A text string. The text string may include embedded tokens and global
variables. Do not start the text string with a colon (:).
NOTE: Use a colon (:) to separate the token from the text. You must use a token even
if there are no embedded global variables in the text string.
This example substitutes the global variables, PolicyNum and Company, into the error
file header information. If the global variable PolicyNum was equal to MVF10002 and
Company was equal to ABC Insurance Company, the text output to the error file would
be:
Transaction: MVF10002
Company Name: ABC Insurance Company
To add lines to the header, use the rule multiple times. Each time you use the rule, the
system adds a line to the header, which you will see in the error file (ERRFILE.DAT).
NOTE: The global variable names must be spelled exactly as they are defined to the
system.
217
Chapter 3
Job and Form Set Rules Reference
SetOutputFromExtrFile
Use this form set level (level 2) rule to extract a print batch name from an extract file for
each transaction. This capability is typically used with the MultiFilePrint callback
function so you can get a print batch name from the extract file for one or more
recipients per transaction.
Parameter Description
PrintBatchName This tells the system to get the print batch name that begins in a
specific location and save it to a global variable.
You must include the BatchingByRecipINI or the IfRecipUsed rule before this rule in the
AFGJOB.JDT file. If you include the BatchingByRecipINI rule, also include these options:
< BatchingByRecip >
Batch_Recip_Name = 39,FILENAME001;"Batch1";INVESTOR
Batch_Recip_Name = 39,FILENAME002;"Batch2";COMPANY
Batch_Recip_Name = 39,FILENAME003;"Batch3";AGENT
The record mask should match the parameters for the SetOutputFromExtrFile rule and
the INI options. The setup for this rule varies, depending on the mode you are running
in.
3-step (GenTran, When processing using the GenTran, GenData, and GenPrint programs, you must set
GenData, and GenPrint) the INI options for the GenPrint program as shown here:
< Print >
RCBDFDField = PDFNAME
CallBackFunc = MultiFilePrint
MultiFileLog = ..\data\MFP.LOG
You can use the CUSMultiFilePrint function instead of the MultiFilePrint function, if you
want to control the file name.
The CUSMultiFilePrint function is a print callback function that creates a new output file
for each recipient and creates a log record of each. This is similar to the MultiFilePrint
callback function in GenPrint except it gives you more control over the name of the file
and supports long file names.
218
SetOutputFromExtrFile
The system assumes you will use a built-in INI function to create a unique file name
each time. This is important because the callback function cannot assign the first file
name. You can use a DAL function to assign the first file name. Here is an example of
the INI options:
< Printer1 >
Port = ~DALRUN Batch1Files.dal
< Print >
CallbackFunc = CUSMultiFilePrint
Please note that this function is used for multi-step processing only.
2-step (Single-step When you use single-step processing but omit the PrintFormset rule and instead use
processing without the the GenPrint program, you must include the Print control group options:
PrinfFormset rule and
< Print >
with GenPrint)
RCBDFDField = PDFNAME
CallBackFunc = MultiFilePrint
MultiFileLog = ..\data\MFP.LOG
219
Chapter 3
Job and Form Set Rules Reference
Single-step (GenData When you use single-step processing, the system does not use a callback function.
only) Instead, it uses the MultiFilePrint INI option in the PrintFormset control group.
In single-step mode, you must have these INI options:
< PrintFormset >
RCBDFDField = PDFNAME
MultiFilePrint = Yes
LogFileType = Text (or XML)
LogFile = mfp.log
NOTE: The MultiFilePrint option should only be used with the PDF, RTF, HTML, and
XML print drivers.
220
SetOverflowPaperTray
SetOverflowPaperTray
Use this form set level rule (level 2), with the required INI option to change the printer
tray selection during transaction processing.
This rule lets you print the first page of a form set on a special paper and the rest on
different stock. For example, the first page of a utility bill is typically printed on
perforated stock while the rest of the bill is printed on non-perforated stock.
Syntax ;SetOverflowPaperTray;;
There are no parameters for this rule.
The FormName option is required:
< OverflowPaperTray >
FormName = Tray#
Option Description
FormName Enter the name of the form on the left and the tray you want used for the
subsequent pages on the right. To specify the tray, you can only enter
trays 1-9. See the example below.
Here is an example:
< OverflowPaperTray >
Gas Bills = Tray4
Water Bills = Tray4
Elec Bills = Tray4
Keep in mind...
• You must include the PaginateAndPropagate rule in your AFGJOB.JDT file for the
SetOverflowPaperTray rule to work correctly.
• When running in single- or two-step mode, place these rules in this order after the
WriteOutput and WriteNAFile rules:.
; SetOverflowPaperTray;;
;PaginateAndPropagate;;
• In duplex printing mode, the first page prints on stock from the original specified
paper tray (for instance, containing perforated paper). If an overflow condition
occurs and additional pages are printed; because you are duplexing, the first
overflow page will print on the backside of the first page (on the perforated paper).
The system redirects any additional overflow pages (pages 3, 4, and so on) to the
paper tray you specify using the OverflowPaperTray control group.
221
Chapter 3
Job and Form Set Rules Reference
• In simplex printing mode, the first page prints on stock from the original specified
paper tray (for instance, pre-printed color letter head). If an overflow condition
occurs, additional pages are printed on stock from the redirected paper tray you
specify using the OverflowPaperTray control group.
• This rule will not work when printing in duplex mode and the first page is set as a
back page.
Example Let’s assume your FORM.DAT file specifies duplex printing, tray 2 for all images, and
this INI option:
< OverflowPaperTray >
UtilBill = tray4
This tells the system to use stock from tray 2 to print the first two pages (duplex) and
stock from tray 4 for the subsequent pages 3 and 4 (duplex). Here are examples of the
FORM.DAT and POLFILE.DAT files:
FORM.DAT file:
;RP10;CIS;UtilBill;Utility;N;;\
billhdrp|FDLONX <Customer(1)>/\
billsum |RDLS <Customer(1)>/\
billftr |RDLS <Customer(1)>/\
billrwtr|RDLS <Customer(1)>/\
billsere|RDLS <Customer(1)>/\
billstbr|RDLS <Customer(1)>/\
billrswr|RDLS <Customer(1)>/\
billcwt3|RDLS <Customer(1)>/\
blchart |RDLS <Customer(1)>;
POLFILE.DAT file:
;RP10;CIS;UtilBill;Utility;R;;\
billhdrp|FDLONX <Customer>/\ page 1 - from Lower/tray 2 (L)
billsum |RDLSN <Customer>/\
billftr |RDLSN <Customer>/\
billhdrp|RDLONX <Customer>/\ page 2 - from Lower/tray 2 (L)
billrwtr|RDLSN <Customer>/\
billsere|RDLS <Customer>/\
billstbr|RDLSN <Customer>/\
billhdrp|RD4ONX <Customer>/\ page 3 - from tray 4 (4)
billrswr|RDLSN <Customer>/\
billcwt3|RDLSN <Customer>/\
billhdrp|RD4ONX <Customer>/\ page 4 - from tray 4 (4)
blchart |RDLS <Customer>;
\ENDDOCSET\ BillHead
This tells the system to use the stock from tray 2 to print the first page and stock in tray
4 for the subsequent pages 2 and 3. Here are examples of the FORM.DAT and
POLFILE.DAT files:
FORM.DAT file:
222
SetOverflowPaperTray
;RP10;CIS;InsurBill;NW Company;N;;\
insuhdr |DLONX <Customer(1)>/\
insuintr|DLS <Customer(1)>/\
insurate|DLOS <Customer(1)>/\
insusign|DLS <Customer(1)>;
POLFILE.DAT file:
;RP10;CIS;InsurBill;NW Company;R;;\
insuhdr |FDLONX <Customer>/\ page 1 - from Lower/tray 2 (L)
insuintr|DLS <Customer>/\
insurate|DLOS <Customer>/\
insuhdr |FD4ONX <Customer>/\ page 2 - from tray 4 (4)
insurate|DLOS <Customer>/\
insuhdr |FD4ONX <Customer>/\ page 3 - from tray 4 (4)
insusign|DLS <Customer>/\
\ENDDOCSET\ InsurHead
223
Chapter 3
Job and Form Set Rules Reference
SetOvFlwSym
Use this job level rule (level 1) to define an overflow variable for the overflow feature
for use by the various DDT field level rules using overflow. This rule adds the specified
overflow variable to the overflow symbols list. You must use the InitOvFlw rule before
you use this rule.
Parameter Description
ImageName Name of the image that contains the fields on which overflow
processing will occur.
Example ;SetOvFlwSym;;Symbol,ImageName,10;
This example tells the system to define an overflow variable named Symbol for use
with the image named ImageName, which has a maximum records per page of 10.
Another example of this rule is:
;SetOvFlwSym;;CGDECBDOVF,Q1GDBD,5;
This example tells the system to define an overflow variable named CGDECBDOVF for
use with the form Q1GDBD, which has the maximum records per image set to five.
224
SetRecipCopyCount
SetRecipCopyCount
Use this form set level rule (level 2) in the AFGJOB.JDT file to set the number of copies
for a particular recipient for all forms except those specified.
Syntax ;SetRecipCopyCount;;;
This rule includes these parameters:
;RULE;LEVEL;RECIPIENT,COPYCOUNT,FORM1,FORM2,...FORMn;
Where FORM1, FORM2, and FORMn are the names of the forms to exclude from the
copy count you specify using this rule.
NOTE: This rule tests to see if the parameter value is a constant number. If not, it
assumes the parameter names a GVM variable. It then uses the GVM variable
to get the copy count.
Example ;SetRecipCopyCount;;IO,,DOC016,DOC018;
;SetRecipCopyCount;;I,3,DOCERR;
225
Chapter 3
Job and Form Set Rules Reference
SetRecipCopyCount2
Use this form set level rule (level 2) in the AFGJOB.JDT file to set the copy count for a
particular recipient for all forms specified.
NOTE: Version 10.1, Patch 109 changes the way the SetRecipCopyCount2 rule handles
copy counts. Before this patch, the rule excluded the forms specified in the
rule's parameters. With this patch and in subsequent versions, this rule
includes those forms and changes the forms' copy counts.
Syntax: ;SetRecipCopyCount2;;(parameters);
Parameter Description
Recipient Enter the name of the recipient for whom the copy count will be set.
Number Enter the number you want to set the copy count to.
Name Enter the name of the forms for which the copy count should be set. If you
have multiple forms, separate each name with a comma.
You must place this rule after the BuildFormList rule in the AFGJOB.JDT file.
NOTE: This rule tests to see if the parameter value is a constant number. If not, it
assumes the parameter names a GVM variable. It then uses the GVM variable
to get the copy count.
Example ;SetRecipCopyCount2;;Customer,2,QADesc1,QADesc2,QADesc3;
The copy count for recipient, Customer, is set to two (2) for forms: QADesc1, QADesc2,
and QADesc3.
< Base Rules >
;RULStandardJobProc;;;
…
…
<Base Form Set Rules>
;RulStandardTransactionProc;;;
…
…
;BuildFormList;;;
;SetRecipCopyCount2;;CUSTOMER,2,Patch399;
…
…
226
SortBatches
SortBatches
Use this job level (level 1) rule to sort RCB batches before they are printed. This rule
provides a way for you to call an external sort program to rearrange the order of the
recipient batch files (RCB files).
Syntax ;SortBatches;;;
The SortBatches rule provides two ways to sort batches:
• Single key
This is the default sort for running under Windows. This sort command uses the
Windows command line sort and builds an RCB file with a prepended sort key. Use
this method if the external sort program uses a single sort field.
• Multiple keys
Use this method when you need to create a sort command with a repeating pattern
for each sort field.
Depending on the size of the recipient batch file, performance can be affected. The
larger the input file, the slower the performance.
The SortBatches rule performs the required initial logic before the main job execution
and executes the external sort program after execution. Place this rule immediately
before the JobInit1 rule in your AFGJOB.JDT file, as shown here:
;RULStandardJobProc;;Always the first job level rule;
;SetErrHdr;;***:------------------------------------------------;
...
;SortBatches;;;
;JobInit1;;;
227
Chapter 3
Job and Form Set Rules Reference
NOTE: The default for the BuildSortKey option is Yes on Windows and No on other
platforms.
This is the default sort for running under Windows. “**SourceFile** /t **WorkPath** /
o **TargetFile**” are replacement strings that are replaced with the appropriate values
when the command line string is created. See Replacement Strings on page 230 for a
complete list of available replacement strings.
These SortBatchOptions would produce the following sort command:
SORT .\data\REGPRT.tmp /t .\data\ /o .\data\REGPRT.wrk
The data between the “*{“ and “}*” (in bold) is replicated for each sort field specified
in the sort batches entry. The data between the “[[“ and “]]” is used as a field
separators.
SortCommand = sort -o **TargetFile** *{[[ ]] -k **FieldOffset**,
**FieldLength** }* **SourceFile**
**FieldOffset** and **FieldLength** are replacement strings you can use inside a
repeating section. See Replacement Strings on page 230 for a complete list of available
replacement strings.
Given the sample INI values defined above and the sample RCB DFD file definition, the
generated sort command would appear as follows:
sort -o .\data\AGENT.wrk -k 1,22 -k 23,4 -k 27,45 .\data\AGENT.tmp
Sorting with an OptTech OTSort by OptTech is a third-party sort utility. Here is an example of how you could set
Sort the SortCommand options to execute OTSort with the SortBatches rule:
228
SortBatches
INI Options
You can use these INI options with this rule:
< SortBatches >
BatchFileName =
SortDefault =
< SortBatchesOptions >
BuildSortKey =
SortCommand =
LogSortCommand =
KeepOrgFile =
ZeroBasedOffsets =
< SortBatchSortTypes >
a =
b =
< SortBatchFieldTypes >
Long =
Char_Array =
Defining the sort Use the options in the SortBatches control group to specify the name of the batch file and
the fields you want to sort by.
Option Description
SortDefault Enter the fields you want to sort by plus A for an ascending sort or
D for a descending sort. The default is:
ACCOUNT_NUMBER(A);COMPANY(A);FEAT_DESCR (A)
Sorting options You specify all processing options for the SortBatches rule in the SortBatchOptions
control group.
< SortBatchOptions >
BuildSortKey =
LogSortCommand =
KeepOrgFile =
ZeroBasedOffsets =
229
Chapter 3
Job and Form Set Rules Reference
Option Description
BuildSortKey Enter Yes to specify single key processing. The default on Windows
is Yes. The default on UNIX is No.
LogSortCommand Enter Yes to send a copy of the sort command and associated sort
options to the trace log file. The default is No.
KeepOrgFile Enter Yes to write the original batch files in an unmodified format.
The sorted batch files are written with an SRT extension. The default
is No.
ZeroBasedOffsets Enter Yes to use zero based offsets. The default is No.
Overriding the sort type By default, the field-level sort type is written as a for ascending and d for descending.
You can override these default values using the SortBatchSortTypes control group:
< SortBatchSortTypes >
a = Replacement_Ascending_Type
d = Replacement_Descending_Type
Overriding the field type Field types are based on the internal field type defined in the RCB DFD (INT_TYPE). By
default their types are set to c for character fields or n for numeric fields, but you can
override these values. In the example below, fields defined as LONG have a field type
of “num” and fields defined as CHAR_ARRAY have a field type of “char”.
< SortBatchFieldTypes >
Long = num
Char_Array = char
Replacement Strings
Here is a list of the non-repeating section replacement strings:
230
SortBatches
RCB file layout Here is the RCB file layout used in these examples:
< FIELDS >
FIELDNAME = ACCOUNT_NUMBER
FIELDNAME = FEAT_DESCR
FIELDNAME = COMPANY
FIELDNAME = APPLICATION
FIELDNAME = CUSTOMER_NAME
FIELDNAME = TRN_Offset
FIELDNAME = X_Offset
FIELDNAME = NA_Offset
FIELDNAME = POL_Offset
...
231
Chapter 3
Job and Form Set Rules Reference
REQUIRED = N
232
StandardFieldProc
StandardFieldProc
You must include this form set level rule (level 2) in the AFGJOB.JDT file if you are using
the performance mode JDT. The StandardFieldProc rule should be the first field level
rule in your AFGJOB.JDT file.
This rule tells the system to process each field on all of the images triggered by the
SETRCPTB.DAT file.
NOTE: If you use StandardFieldProc in your AFGJOB.JDT file, you must also include the
WriteNAFile rule.
Syntax ;StandardFieldProc;;;
There are no parameters for this rule.
If the field has not yet been loaded, this rule loads it and then determines what type of
field it is. If the field is not a text area, this rule sets the field data. If field is not a bar
code or a text area, the rule sets field text.
If the field is a bar code, this rule validates and stores the bar code data. If there is an
error with the data, the system writes a warning message to the error file, sends the
transaction to the manual batch and continues the processing run.
Example ;StandardFieldProc;;;
233
Chapter 3
Job and Form Set Rules Reference
StandardImageProc
This rule is a form set level rule (level 2) which you must include in the AFGJOB.JDT file.
This rule is used when you are using the performance mode JDT and should be the first
image level rule.
This rule tells the system to process each image triggered by the SETRCPTB.DAT file.
Syntax ;StandardImageProc;;;
There are no parameters for this rule.
This rule sets the next image. If there are no more images, the system returns the
message; msgNO_MORE_IMAGES.
If an error occurs, the system writes the following message in the error file and returns
an error code:
Error in StandardImageProc(): Unable to SetNextImage(pRPS).
If it finds another image, the rule checks to see if the image has a corresponding DDT
file and, if so, loads into memory the image and field rules included in that file.
Example ;StandardImageProc;;;
234
TicketJobProc
TicketJobProc
Use this job level (level 1) rule to run Documaker Server from another application by
providing an XML job ticket. The results are returned in an XML job log file. The layout
of these XML files is the same as those used by Docupresentment to run Documaker.
Specify the name of the job ticket to the GenData program on the command line using
this parameter:
/jticket=
The default is JOBTICKET.XML. To prevent the job ticket file from being removed once
the system finishes processing, include this INI option:
< Debug >
TicketJobProc = Yes
Specify the name of the resulting job log file using this command line parameter:
/jlog=
The default is JOBLOG.XML.
Syntax ;TicketJobProc;;;
There are no parameters for this rule. You must include this rule as the first job level
rule in the AFGJOB.JDT file. This rule replaces the RULStandardJobProc rule.
NOTE: Documaker must be set up in single step mode. Only the GenData program is
executed.
For a single-transaction job process, you receive recipient information if you have this
option set:
< PrintFormset >
MultiFilePrint = No
Example ;TicketJobProc;;;
235
Chapter 3
Job and Form Set Rules Reference
TranslateErrors
Use this rule to extract error information from the message file and translate it into an
error file using the message INI file, named TRANSLAT.INI, with group standard as the
translation key. The system reads errors from the MSGFILE.DAT file, translates them,
and places the translated error messages in the ERRFILE.DAT file.
NOTE: Using this rule can slow processing by creating additional tasks for the system
to perform at the end of the processing cycle.
Syntax ;TranslateErrors;;;
Example ;TranslateErrors;;;
236
UpdatePOLFile
UpdatePOLFile
Use this form set level rule (level 2) to write the names of the forms to the POLFILE.DAT
file. This list of forms, and the images that comprise those forms, is sometimes called
the POL set.
NOTE: Do not use this rule when you are doing 2-up printing on AFP printers. In that
situation, you use the PaginateAndPropagate and WriteOutput rules instead.
Do not use this rule when you use the GenData program by itself to execute the
GenTrn, GenData, and GenPrint steps.
Syntax ;UpdatePOLFile;;;
This rule writes the POL set to the POLFILE.DAT file, deletes the duplicate form set,
updates the TRN file, and updates the recipients.
Example ;UpdatePOLFile;;;
237
Chapter 3
Job and Form Set Rules Reference
UseXMLExtract
Use this form set level (level 2) rule when the extract list loaded by the transaction is
also the source of the XML tree.
NOTE: The extract list and the XML tree are separate items. Even if you are only using
an XML file as the source of the transaction, there will be two copies of the
information in memory — one as the extract list and one as the XML tree.
If you are running Documaker from IDS, use the ImportXMLExtract rule to bring
in XML in standard Documaker XML format, such as from Documaker
workstation or iDocumaker. Use the UseXMLExtract rule to convert a loaded
extract file into an XML tree, which you can then use to query data.
Syntax ;UseXMLExtract;;
Each XML transaction must begin with the XML declaration. The system assumes each
transaction is a separate entity and requires that each transaction begin with an XML
declaration.
Keep in mind that you will not be able to load this appended file as one large XML file.
The system does not load the entire file before it processes the first transaction.
Instead, it loads one transaction and then processes that transaction. Make sure there
are line feeds between transactions. The line feed requirement is not an XML issue, but
rather tells the system where one transaction ends and the next begins.
You place the rule in different locations in the AFGJOB.JDT file, depending on the mode
in which you are running. For multi-step mode, place the XMLFileExtract rule after the
LoadExtractData rule, as shown here:
;LoadExtractData;;
;UseXMLExtract;;;
For single or two-step mode, place the XMLFileExtract rule after the
NoGenTrnTransactionProc rule, as shown here:
;NoGenTrnTransactionProc;;
;UseXMLExtract;;;
Remember that the system decides whether to search the extract list or the XML tree
by checking to see if the search mask starts with an exclamation mark (!). The
exclamation mark indicates that this is an XML path string. The system ignores the
exclamation mark when it performs the XML path search.
To preserve the space when mapping data, use two exclamation marks (!!). Otherwise,
the system assumes it should remove the leading white space.
Use these INI options with this rule:
• In the TRN_File control group, set the MaxExRecLen option to the optimal read size
for your system. If you set this too large, it will consume too many resources. If you
set it too small, it will perform too many reads. Check with your system
administrator for guidance on setting this option.
< TRN_File >
MaxExRecLen =
238
UseXMLExtract
• In the Data control group, make sure the ExtrFile option points to the location of
your XML file. Here is an example:
< Data >
ExtrFile = .\extract\Sample.xml
• In the ExtractKeyField control group, set the SearchMask option as shown here:
< ExtractKeyField >
SearchMask = 1,<?xml
• In the RunMode control group, include the XMLExtract option as shown here:
< RunMode >
XMLExtract = Yes
Mapping Fields
You can map TRN_Fields fields using the Ext2GVM rule or by using XPath.
Using Ext2GVM When you use the Ext2GVM rule to get key information, make sure you only include the
Key1, Key2, and KeyID options it the TRN_Fields control group. Set these options to
dummy data, because the GVM variables are set to the data values during GenData
processing.
To re-map these values from the global variables you get using Ext2GVM rule to the
RPS structures (GroupName1, GroupName2, and GroupName3), include this rule in the
AFGJOB.JDT file:
ResetDocsetNames;;ConvertBeforeReset;
The ConvertBeforeReset parameter gets the GroupName values from global memory
and converts them to the long values using the Key1Table and Key2Table control
groups.
Here is an example of the INI options:
< TRN_File >
Company = 3,3,N
LOB = 3,3,N
PolicyNum = 3,3,N
Using XPath When you use XPath to map to the fields in the TRN_Fields control group, be sure to
place an exclamation mark (!) in front of the XPath. Here is example:
< TRN_Fields >
Company = !/Forms/Key1
LOB = !/Forms/Key2
PolicyNum = !/Forms/PolicyNum
RunDate = !/Forms/RunDate;DM-4;D4
239
Chapter 3
Job and Form Set Rules Reference
The format for the options in the TRN_Fields control group is:
(Field in the transaction DFD file) = XPath;Field Format
Although the exclamation mark (!) is not part of the actual search routine, the XML path
search must begin with an exclamation mark. Do not specify whether a field is a key.
The system does not support a multiple (search) keys with the XML implementation.
To selectively exclude transactions, place the XPath with a leading exclamation mark
of what you want to exclude in your exclude file. Here is an example:
!/Forms[PolicyType="OLD"]
Overflow in XML
Here is how overflow works in XML. First, the system scans the search text to see if a
replacement is needed for the overflow value. Here is one approach:
@GETRECSUSED,IMAGE1,STARS/!/Forms/Form/Car[****]/Driver
The system inserts the current overflow value, then performs the actual XML search for
the requested XPath.
With the following approach, you can omit the use of @GETRECSUSED to declare which
overflow variable to use and instead include the overflow name directly into the XPath,
as shown here:
!/Forms/Form/Car[**INDEX**]/Driver
This method lets you support overflow within overflow.
Be aware that with either method, you still have to declare and use the overflow
variables. The difference is that for the second method [**OverFlowSymbol**], the
form name has to be XML, while for the first example [****], the form name is the actual
name of the image for which you created the overflow symbol.
Also, remember to include the IncOvSym rules at the image level in the DDT file to
increment the values to the next index. When doing overflow within overflow, you may
also have to include an additional dummy image to do the IncOvSym for the symbol
that represents the outer-most loop index.
240
WIPFieldProc
WIPFieldProc
Use this form set level rule (level 2) in place of the RULStandardFieldProc or
StandardFieldProc rule in the AFGJOB.JDT file when you are using GenData WIP
Transactions Processing. Using this rule tells the GenData program to bypass normal
field processing.
NOTE: You cannot include in the AFGJOB.JDT file this rule and the
RULStandardFieldProc or StandardFieldProc rule.
These other rules are also used when you run WIP Transaction Processing:
Syntax ;WIPFieldProc;;;
There are no parameters for this rule.
Example ;WIPFieldProc;;;
241
Chapter 3
Job and Form Set Rules Reference
WIPImageProc
Use this form set level rule (level 2) in place of the RULStandardImageProc or
StandardImageProc rule in the AFGJOB.JDT file when you are using GenData WIP
transactions processing. Using this rule tells the GenData program to bypass normal
image processing.
NOTE: You cannot include in the AFGJOB.JDT file this rule and the
RULStandardImageProc or StandardImageProc rule.
These other rules are also used when you run WIP Transaction Processing:
Syntax ;WIPImageProc;;;
There are no parameters for this rule.
Example ;WIPImageProc;;;
242
WIPTransactions
WIPTransactions
Use this form set level (level 2) rule to process WIP transactions (manually approved or
rejected in Documaker Workstation) in place of the RULStandardTransactionProc or
NoGenTrnTransactionProc rules.
This rule processes WIP transactions and places them into batch files for GenPrint and
GenArc processing. To specify which transactions, you use codes which you define in
the Status_CD control group. If a WIP transaction has a status code that is not among
the list of codes to be processed, the system deletes the transaction and WIP file.
The parameters for this rule are the status codes for which the user needs to process
WIP transactions. The codes are located in the Status_CD control group. If you are
using more than one status code, separate the codes with commas, as shown here:
Approved,Accepted
Syntax ;WIPTransactions;;StatusCode1,StatusCode2,...;
Use the StatusCode parameters to define the status codes you want the system to use
as it selects the WIP transactions to process.
After a transaction is processed, the system deletes it from the WIP list.
If you include a slash (/) before the StatusCode parameter, it tells the system not to
delete the transactions with that status after it processes then, but instead assign
them a new status. Here is an example:
;WIPTransactions;;APPROVED,FINAL,/PRINTED;
243
Chapter 3
Job and Form Set Rules Reference
In this example, the slash (/) tells the system to process WIP transactions with an
APPROVED or FINAL status and then change their status to PRINTED. The WIP
transactions are not deleted.
Example ;WIPTransactions;;Approved;
Here is an example of how to define the codes in the Status_CD control group:
< Status_CD >
Approved = AP
Rejected = RJ
If the batch system does not need to process transactions with a certain code, such as
Rejected, omit that code from the parameter list for this rule. When the system
encounters a code not on the list, it deletes that transaction.
244
WriteNAFile
WriteNAFile
Use this form set level rule (level 2) to append the NAFILE.DAT file data records for the
current form set into an existing NAFILE.DAT file.
When you use the NoGenTrnTransactionProc rule, which replaces the
RULStandardProc rule in the performance JDT, you must include the WriteNAFile rule to
write the data (records) to the NAFILE during the GenData step.
In addition, you must also include the WriteOutput rule to write the data (records) to
the POLFILE.DAT and NEWTRN.DAT files during the GenData step.
Syntax ;WriteNAFile;;;
There are no parameters for this rule.
Example ;WriteNAFile;;;
If an error occurs, the system returns this message:
Error in WriteNaFile: Unable to PurgeOutput(pRPS).
245
Chapter 3
Job and Form Set Rules Reference
WriteOutput
Use this form set level (level 2) rule to create the POL file when executing single and
two-step processing.
You also use this rule when you are using the GenData program by itself to execute the
GenTrn, GenData, and GenPrint processing steps.
Syntax ;WriteOutput;;;
NOTE: If you use this rule, do not use the UpdatePOLFile rule.
Example ;WriteOutput;;;
246
WriteRCBFiles
WriteRCBFiles
Use this form set level (level 2) rule to create the recipient batches when running in
two-step mode. This mode is similar to single-step processing but omits the
PrintFormset rule and instead uses the GenPrint program.
Syntax ;WriteRCBFiles;;;
There are no parameters for this rule.
Example ;WriteRCBFiles;;;
247
Chapter 3
Job and Form Set Rules Reference
WriteRCBWithPageCount
Use this form set level rule (level 2) to write the page count for each recipient. This rule
is typically use for handling 2-up printing on AFP and compatible printers. This rule is
also used for multi-mail processing.
Syntax ;WriteRCBWithPageCount;;;
There are no parameters for this rule.
You must include the following data in your RCBDFDFL.DFD file when you use this rule:
< Fields >
....
....
FieldName = CurPage
FieldName = TotPage
FieldName = AccumPage
......
......
< FIELD:CurPage >
INT_Type = LONG
EXT_Type = CHAR_ARRAY_NO_NULL_TERM
EXT_Length = 10
Key = N
Required = N
< FIELD:TotPage >
INT_Type = LONG
EXT_Type = CHAR_ARRAY_NO_NULL_TERM
EXT_Length = 10
Key = N
Required = N
< FIELD:AccumPage >
INT_Type = LONG
EXT_Type = CHAR_ARRAY_NO_NULL_TERM
EXT_Length = 10
Key = N
Required = N
Example ;WriteRCBWithPageCount;;;
This rule gets a pointer to the global variable NA_Offset. If the pointer is NULL, the
system returns this message to the error file:
Error in WriteRCBWithPageCount: RCB field NA_Offset not found.
The rule then assigns the pointer it retrieved to the pRPS->POL_Offset and gets a
handle to the print batch list. It then loops through this list to free the contents of the
corresponding PRINT_BATCH structure if that print batch has been assigned a
recipient.
The rule then checks the handle to the counter list. This handle is a global handle
created by the PageBatchStage1InitTerm rule. If the handle is equal to
VMMNULLHANDLE, the system returns this message to the error file:
Error in WriteRCBWithPageCount: PageBatchStage1InitTerm has not been
called
248
WriteRCBWithPageCount
The rule then checks the handle to the list of transaction records for the current batch.
This handle is a global handle also created by the PageBatchStage1InitTerm rule. If this
handle is equal to VMMNULLHANDLE, the system returns this message to the error file:
Error in WriteRCBWithPageCount: PageBatchStage1InitTerm has not been
called
The rule then sets recipient page counts. If an error occurs, the system returns this
message to the error file:
Error in WriteRCBWithPageCount:Failed to set recipient page counts
Next, the rule gets the handle of the global recipient list for the current form set and
loops through the recipient list to add page counts to the GVM. The rule also gets the
pointer to global variable TotPage. If this pointer is NULL, the system returns this
message to the error file:
Error in WriteRCBWithPageCount: RCB field TotPage not found
Then rule then gets the handle to the print batch and recipient lists and loops through
these lists. Finally, the rule loops through the list of page counts. If it cannot get the
handle to the given page count, the system returns this message to the error file:
Error in WriteRCBWithPageCount: Cannot locate batch <Batch Name>.
249
Chapter 3
Job and Form Set Rules Reference
XMLFileExtract
Use this form set level (level 2) rule when the extract list loaded by the transaction
contains the name of an external file source for the XML tree.
NOTE: The extract list and the XML tree are separate items. Even if you are only using
an XML file as the source of the transaction, there will be two copies of the
information in memory — one as the extract list and one as the XML tree.
Syntax ;XMLFileExtract;;parameter;
For the parameter, you can use one of the following:
• FILE=<filename>
Where filename is the name of the XML file, including path information.
• INI=group,option
Where group and option are defined in the INI files
• SCH=offsetofmask,<searchmask> offsetofdata,lengthofdata
Parameter Description
offsetofdata the offset where the path and the file name start
• GVM=<globalvariablename>
Where globalvariablename is the name of a GVM that contains the file name.
Here are examples of how you can use this rule:
;XMLFileExtract;2;FILE=SAMPCO.XML;
;XMLFileExtract;2;INI=Group,Option;
;XMLFileExtract;2;SCH=11,FILENAME 20,20;
;XMLFileExtract;2;GVM=FileNameVar;
Keep in mind...
• You place the rule in different locations in the AFGJOB.JDT file, depending on the
mode in which you are running. For multi-step mode, place the XMLFileExtract rule
after the LoadExtractData rule, as shown here:
;LoadExtractData;;
;XMLFileExtract;2;FILE=SAMPCO.XML;
250
XMLFileExtract
For single or two-step mode, place the XMLFileExtract rule after the
NoGenTrnTransactionProc rule, as shown here:
;NoGenTrnTransactionProc;;
;XMLFileExtract;2;FILE=SAMPCO.XML;
• Remember that the system decides whether to search the extract list or the XML
tree by checking to see if the search mask starts with an exclamation mark (!). The
exclamation mark indicates that this is an XML path string. The system ignores the
exclamation mark when it performs the XML path search.
To preserve the space when mapping data, use two exclamation marks (!!).
Otherwise, the system assumes it should remove the leading white space.
Mapping Fields
You can map the fields listed in the TRN_Fields control group using either offset/
length, XPath, or a combination of both methods. In the RunMode control group, be
sure to set these INI options:
Option Description
XMLExtract Enter Yes to tell the system you are using the XML file.
XMLFileExtract Enter Yes to tell the system your extract file contains a list of
pointers pointing to the XML file to be processed.
XMLFileExtractName Use this option to tell the system how to find your XML file. Enter
the method you use to point to your XML file. This should be
exactly the same as how you would set up the rule parameter for
the XMLFileExtract rule in your AFGJOB.JDTfile.
Here is an example:
< RunMode >
XMLExtract = Yes
XMLFileExtract = Yes
XMLFileExtractName = SCH=1,XML 20,60
The format for the options IN the TRN_Fields control group is:
(Field in the transaction DFD file) = XPath;Field Format
(Field in the transaction DFD file) = offset, length, Key;Field Format
251
Chapter 3
Job and Form Set Rules Reference
An XML path search must begin with an exclamation mark (!). The exclamation mark is
not part of the actual search routine. Do not specify whether a field is a key. The system
does not support a multiple (search) keys with the XML implementation.
To selectively exclude transactions, use either an offset/SearchMask, the XPath, or a
combination of the two in your exclude file. Here is an example:
!/Forms[PolicyType="OLD"]
20,ABC
Overflow in XML
Here is how overflow works in XML. First, the system scans the search text to see if a
replacement is needed for the overflow value. Here is one approach:
@GETRECSUSED,IMAGE1,STARS/!/Forms/Form/Car[****]/Driver
The system inserts the current overflow value, then performs the actual XML search for
the requested XPath.
With the following approach, you can omit the use of @GETRECSUSED to declare which
overflow variable to use and instead include the overflow name directly into the XPath,
as shown here:
!/Forms/Form/Car[**INDEX**]/Driver
252
Chapter 4
Adding Image and Field
Rules
This chapter discusses adding image and field level
rules. These rules link the image's variable fields to
external data.
253
Chapter 4
Adding Image and Field Rules
STORING RULE Documaker Studio stores you image in a FAP file, along with the image and field rule
assignments you assign to it. This differs from the way rule information was stored in
INFORMATION the older document creation tool, Image Editor.
The Image Editor stores your image in a FAP file. FAP files created with Image Editor
only contain the image's objects and object attributes. The Image Editor stores image
and field rule assignments in a separate file, called a data definition table (DDT) file.
xxxxxxxxx Image 1
xxxxxxxxx
xxxxxxxxx contains image objects
FAP File and attributes
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxx xxxx
contains rule
DDT File assignments
Remember, as you assign rules with the Image Editor you affect the DDT file, not the
FAP file.
While DDT files were created to achieve a higher degree of performance in simpler
implementations, advanced formatting capabilities made it necessary for the FAP files
to be available at runtime to handle dynamic composition and the DDT file approach
became less of an advantage, and even a stumbling block within some
implementations.
With the release of version 11.0 and the introduction of Documaker Studio’s FOR file,
image and field-level DDT rules previously stored in the DDT file are, in Studio
implementations, either unnecessary or are stored in the FAP file. Having image level
rules (such as SetOrigin) in the FOR file makes it easier to do visual form design. Having
field level rules in the FAP file eliminates synchronization worries.
254
Using the Data Definition Table
USING THE DATA The system stores your image and field level rule assignments in a separate, semi-
colon delimited file called a data definition table (DDT). This file contains all the rule
DEFINITION TABLE assignments that apply to a specific image. The system creates the DDT file and stores
it in the master resource library.
NOTE: The Image Editor stores the image in a FAP file and it stores the image rule
assignments in a DDT file. The file names correspond, but the extensions
differ, for example, IMAGE.FAP and IMAGE.DDT. Storing information
separately makes it easier to apply and modify rules. This also helps the
system process your information faster.
You can set up image and field rules directly in the DDT file using any ASCII text editor
or you can use the Image Editor to make the same assignments. For information on
using the Image Editor, see Assigning Rules with the Image Editor on page 265.
In the DDT file examples below, each semicolon delimited field represents a distinct
piece of variable field formatting, mapping, or data information. There are several
levels of rules:
• Field Rules - Field rules affect individual fields on an image. These rules are stored
in the DDT file, along with the image rules. You run field level rules by including
the rule in an image's DDT file under the <Image Field Rules Override> section.
• Image Rules - Image rules are stored in the DDT file. These rules affect specific
images. Image rules associate the rule name with the data required by the rule.
You run image level rules by including the rule in an image's DDT file under the
<Image Rules> section.
Here is an example of the DDT file format:
<Image Rules>
;IMAGERULE;IMAGERULEDATA;
;IMAGERULE;IMAGERULEDATA;
Where:
In the <Image Rules> section:
IMAGE the Image rule name
IMAGERULEDATA the data required by the Image rule
255
Chapter 4
Adding Image and Field Rules
Line #11 contains the data for the field rule. This data varies, depending on the rule. The
data can consist of the following, in the order shown below:
Search Criteria, Extract Field Descriptors, Additional Parameters
For some rules, the data field (#11) is empty, such as for the Master and KickToWip
rules. For other rules, the data field can consist of only search criteria, such as for the
SetState or Move_It rules (when used without overflow data).
Each item must be separated by a single space—no other spaces are allowed. If the
rule supports overflow, you should place the overflow data before the search criteria.
NOTE: For details about overflow, see Overflow and User Functions on page 291. For
more information about search criteria, see Search Criteria on page 290.
The way the delimiters are used in rules is almost the same. There are four types of
delimiters, as shown here:
Delimiter Description
colon (:) A colon separates conditions in rules such as PrintIf and PrtIfNum. It is
also used to separate two dates in the rule, such as in the DateDiff rule.
comma (,) A comma is used in search criteria to delimit offset and data. It is also
used to separate extract field descriptors, such as offset and length.
256
Setting Up the MASTER.DDT File
SETTING UP THE The MASTER.DDT file helps you save time by letting you set up common fields used on
many forms. For instance, if you have a field called Name which appears on many
MASTER.DDT forms, you can use the MASTER.DDT file to set it up once and then use that information
FILE as necessary.
For instance, suppose you have an image named MYIMAGE.FAP, which has a
corresponding DDT file named MYIMAGE.DDT.
In MYIMAGE.DDT you have a field called Name. For the Name field, you select the rule,
Master. This tells the system to look in the MASTER.DDT file for a field called Name and
use the settings for length, rule, mask, data, and so on, stored there.
To use this capability, follow these steps:
1 Select the Edit, Master DDT option in Docucreate to open the MASTER.DDT file and
map the extract data to the variable fields in the MASTER.DDT file.
2 In the individual DDT files, enter either blank or master in the Rule field. The
variable name must be the same in the master and subordinate DDT files.
3 In the AFGJOB.JDT file, add this rule:
;LoadDDTDefs;;;
Taking precedence If a field in the FAP file is specified in the master DDT, the system uses the information
in the master DDT.
When using the master DDT during rules processing, every field defined in a DDT file
will fill in any blank item (or zero in the case of numeric items) from the matching
master template for that field. So any field rule component that you leave blank, or
zero, will be filled in from the master DDT if that field is declared within the master DDT.
Image DDT lines that specify Master as the rule or have no rule specified also accept
the rule from the master DDT. But like all other DDT rules, if a rule name other than
Master is specified in the DDT, it will be used. Here are some examples.
Suppose the master DDT contains these lines:
;0;0;NAME;25;50;NAME;0;50;;move_it;11,INSNAMREC;N;N;N;N;0;0;15412
;0;0;PRICE;15;10;FINAL
;0;0;NAME;0;0;;0;0;;master;;;;;;12400;2340;0
;0;0;PRICE;0;0;PRICE;0;10;;movenum;;N;N;N;N;13330;1900;12310
;0;0;LOCATION;75;50;LOCATION;0;50;;move_it;;N;N;N;N;14100;2100;0
;0;0;STATE;0;0;;0;0;;;;;;;;0;0;0
After the master template is applied, the image DDT rules would look like this:
;0;0;NAME;25;50;NAME;0;50;;move_it;11,INSNAMREC;N;N;N;N;12400;2340;15
412
;0;0;PRICE;15;10;PRICE;0;10;C,10.2;movenum;11,INSNAMREC;N;N;N;N;13330
;1900;12310
257
Chapter 4
Adding Image and Field Rules
The rule line for field NAME was basically blank in the DDT and specified Master as the
rule. Therefore, any item left blank, or zero, was filled in from the matching NAME field
in the master DDT. In addition, the rule name of Master was replaced with the rule
name from the template.
The rule line for field PRICE does not specify the Master rule. Note, however, that the
zero and blank items were still filled in from the master template. In this example, that
included the source offset and length, the field rule flags, and the search mask data.
Also look at the required flags. In the master DDT for this field, these items are
specified as ;N;Y;N;N; but because the image DDT was not left blank for those items
(;N;N;N;N;), they did not get copied and were left intact. Also note that the Source Field
name FINAL PRICE was not copied into the image DDT line, because data PRICE already
occupied that space on the image DDT line.
For the field LOCATION, nothing about the Image DDT line changed because the field
does not occur in the master DDT.
For the field STATE, nothing on the DDT line changes because it does not appear in the
master DDT. But unlike the field LOCATION, because the rule name was specifically
declared as Master, it was expected to be found in the Master. This will cause an error
indicating that the field was missing in the master DDT.
258
Setting Up the MASTER.DDT File
Saving your work The system saves your work as you move through the rows displayed on screen. You
can also use the Save option to save all of the additions, changes and deletions you
make to rule assignments in the Master DDT file.
To save rule assignments, choose File, Save.
Viewing the Rules Report The View Rules Report option shows you a listing of all fields in the DDT file and
pertinent information about each field. The listing shows the information in a tabular
fashion. The variable fields' offsets, lengths, assigned rules, and data requirements
appear.
259
Chapter 4
Adding Image and Field Rules
The system creates this report from data stored in memory when you open the Master
DDT Editor. To view the Rules Report, choose File, View Rules Report. The Rules Report
appears.
Image name
To close the
report, click
here.
Variable fields
After you finish viewing the rules report information, you can close the report by double
clicking on the icon in the top left corner of the window.
Exiting the Master DDT To exit the Master DDT Editor, choose File, Exit.
Editor
260
Setting Up the MASTER.DDT File
Changing rule Use the Edit, Change option to display the Change window. From this window you can
assignment settings quickly change all of the information for a rule.
You can also access the Change window by double clicking on the row number to the
left of the destination name. This window contains the same fields you see on the
editor window—it's just another way to make changes to an existing rule.
From this window, you can use the Next and Prev buttons to move from row to row.
261
Chapter 4
Adding Image and Field Rules
You can also click Reset to return the various properties back to the original settings.
This however does not revert back to changes made before the file was saved. The
Cancel button also resets the properties, but exits the window too.
Click Ok to save your changes and exit the window.
Inserting a row The Insert Row option lets you insert a blank rule assignment record at the end of the
list. Use Insert Row if you have deleted a rule assignment and you want to add it back
to the rule assignment list or if you want to add more rule assignments.
In very unique situations you can use this option to execute a variable field level rule
without attaching the rule to a field in the image. If you need to execute a rule without
attaching it to an image field, consult your system administrator.
To insert a rule assignment, choose Edit, Insert Row. The Master DDT Editor adds a
blank rule assignment record to the end of the list. The record appears in red. For each
assignment, you must make entries in the Destination Name and Rule fields.
Coping a row The Copy Row option lets you copy an existing rule assignment record to the end of the
list. Use Copy Row if you want to base a new rule assignment on an existing rule
assignment.
To copy a rule assignment, click the variable field row that you want to copy. Choose
Edit, Copy Row. The Master DDT Editor copies the highlighted row and adds it to the
end of the list.
Deleting a row The Delete Row option lets you remove a rule assigned to a field. You remove the field
and its assigned rule from the DDT file not from the FAP file.
1 To delete a rule assignment, click the variable field for which you want to delete a
rule. Choose Edit, Delete Row. The Confirm Delete message appears.
2 Click Yes or No to confirm or cancel the delete.
Retrieving information The Retrieve option lets you retrieve a record from the data dictionary for use in a rule
from the data dictionary assignment. When you choose this option the system creates a list of all the source
name entries in the data dictionary.
After selecting the Retrieve option, you can copy source information from the data
dictionary into your rule assignment. The Master DDT Editor places the information
from the Source Name, Source Offset, Source Length, Record, Required, Rule, Mask,
and Data fields into the current row. The destination name, destination length, and
destination offset information are not copied.
262
Setting Up the MASTER.DDT File
1 To retrieve source information, click within the row assignment where you want to
place source information. Choose Edit, Retrieve. The Retrieve from Dictionary
window appears.
2 Click the source record that you want to retrieve as a rule assignment.
3 Click Ok. The Master DDT Editor places the information from the source record into
the rule assignment.
263
Chapter 4
Adding Image and Field Rules
Using the Up option The Up option lets you move a rule assignment up one sequence number at a time. Use
Up when you want to alter the order in which a rule is executed during processing.
To move a rule assignment up, click the variable field rule assignment you want to
move up. Choose Move, Up. The rule assignment moves up one sequence number.
Using the Down option The Down option lets you move a rule assignment down one sequence number at a
time. Use Down when you want to alter the order in which a rule is executed during
processing.
To move a rule assignment down, click the variable field rule assignment you want to
move down. Choose Move, Down. The rule assignment moves down one sequence
number.
264
Assigning Rules with the Image Editor
ASSIGNING RULES Although you can enter rules directly into the DDT file, you will probably find it easier
to set up your image and field level rules as you create the image.
WITH THE IMAGE
You set up image level rules using the Image Properties window. Similarly, you set up
EDITOR field level rules using the field’s Properties window.
If you have no rules for the image and the option to automatically update the DDT
file is turned off, the system shows the Load DDT button. This lets you create a DDT
file for the image, into which you can add rules.
Also, if you have rules for the image and the option to automatically update the
DDT files is turned off, the system shows the Load DDT button.
NOTE: To turn on or off the option to automatically update the DDT file, choose
Options, Editor Properties while in the Image Editor. Then select the Save tab.
265
Chapter 4
Adding Image and Field Rules
If you have already created and opened a DDT file for the image or the option to
automatically update the DDT file is turned on, the Load DDT button is unavailable
and you see an additional tab named Image Rules, as shown on the following
window.
2 Either click the Load DDT button to create or load a DDT file or click the Image
Rules tab. The Image Rules tab appears.
3 On the Image Rules tab, the system automatically assigns the next available
sequence number for you. You can change the sequence number if necessary. Use
the following fields to set up the rule’s parameters.
Field Description
Sequence The number you enter in this field determines where the rule is placed
in the DDT file and the order in which it is processed.
Rule Use this field to select the image rule you want to insert.
Data Enter data necessary to process the rule. Refer to the rule descriptions
for more information about the data necessary for individual rules.
4 Once you set up the information for the rule, click Insert to add the rule to the DDT
file.
266
Assigning Rules with the Image Editor
To change the sequence of the rule, enter a new number in the Sequence field.
To assign a different rule, select a rule in the Rule field.
To change the data for a rule, click in the Data field and enter the new data.
3 Click Change to record your changes. Click Reset to cancel your changes. Click
Cancel to cancel your changes and return to the Image Editor.
NOTE: Once you click Delete, you cannot click Reset to cancel the deletion.
267
Chapter 4
Adding Image and Field Rules
NOTE: As with any object. you can also click on the variable field to select it and then
right click to choose the Object Properties option from a pop-up menu.
If you have no rules for the image and the option to automatically update the DDT
file is turned off, the system shows the Load DDT button. This lets you create a DDT
file for the image, into which you can add rules.
NOTE: To turn on or off the option to automatically update the DDT file, choose
Options, Editor Properties while in the Image Editor. Then select the Save tab.
268
Assigning Rules with the Image Editor
If you have already created a DDT file for the image or the option to automatically
update the DDT file is turned on, the Load DDT button is unavailable and you see
an additional tab named Edit DDT, as shown on the following window.
2 Either click the Load DDT button to create or load a DDT file or click the Edit DDT
tab. The Edit DDT tab appears.
3 On the Edit DDT tab, use the following fields to supply information about the
destination field.
Field Description
Offset Indicates the position in which the data begins in the destination field.
This field is not a required field.
4 On the Edit DDT tab, use the following fields to define the source field.
269
Chapter 4
Adding Image and Field Rules
Field Description
Name Name of the source field. You can enter the source name by entering
the name or by clicking the Name button. This button lets you retrieve
and insert source names and associated source information from the
data dictionary file. Assigning a source name to specific source
information gives you a shortcut retrieval method and eliminates
having to re-enter source information.
Use the Same Field Name button to make the name you enter here
apply to the destination field. If you changed the name on the Edit DDT
window, you can click this button to tell the system to change that
name to the one you entered on this tab.
This is not a required field.
Offset Required. Indicates the position in which the source field data begins.
File Number of the source file. Specify the number of the table file in the
TBLFILE.DAT file you want to use as the data source.
Record Number of the source record. This number tells the system which
record to retrieve from the source file.
Required Select one of the following options. These options control whether
data must merge in the image's variable field during the merge
procedure.
Not required at processing time. Missing data does not result in an
error message.
Host Required from a source data file during a batch run. Missing data
results in an error message and the system places the form set in the
error batch. Print the error batch to review and correct any errors.
Operator Required as a manual entry in the WIP. Missing data results
in a warning message and the document is kicked to WIP.
Either Required as a manual entry in WIP. Missing data results in a
warning message and the document is kicked to WIP.
Rule Select the name of the rule to execute. This is a required field. See
Image and Field Rules Reference on page 294 for a list and brief
description of the rules from which you can choose.
Data Enter the data required to execute the rule. Click Edit Data to enter the
data in the Edit DDT Data window. This gives you a larger window in
which to make your entries.
5 When you finish entering the information for the field, click Update FDB to update
the field database with any applicable information. Click Ok to finish and close the
Properties window. Click Reset to cancel your entries. The system saves your
entries when you save the image.
270
Assigning Rules with the Image Editor
Understanding the System The Field Database Editor lets you store and retrieve variable field information to make
setting up and creating images faster and more consistent. The field database contains
a record for each unique variable field. Each record contains information such as the
field name, font, type, and so on. No DDT information is stored in the field database.
• You can double click one of the fields, select the Edit DDT tab, make your changes,
and then use the Next and Prev(ious) buttons to move to the next variable field
which requires changes.
• You can click the Edit DDT button on the Edit DDT tab and make all of your changes
from the Edit DDT window.
NOTE: If you are making changes to several fields and using the Next and Prev
buttons to move from field to field, be aware that Next and Prev save your
changes to a field. If you click Reset, the system only cancels your changes for
the current field.
271
Chapter 4
Adding Image and Field Rules
Click the row you want to delete and then click Delete. The system removes the rule
assignment from the DDT file and the field from the FAP file to make sure both files are
in sync.
NOTE: The Automatically Update DDT option does not affect deletions.
NOTE: The columns on this window were resized to show all of the fields. You can
resize any column in the window.
The first column lists the fields that exist on the image, or FAP file. This column always
remains visible on the window. Use the scroll bar at the bottom of the window to scroll
left or right and display other columns.
272
Assigning Rules with the Image Editor
ASSIGNING A RULE
The Edit DDT window lets you quickly and easily assign rules to the variable fields. You
simply move from column to column and row to row to make your rule assignments.
You can also change destination names.
When you select a new row, any changes you made to a previous row are saved in
memory but not written to the DDT file. The information is saved when you save the
image.
1 To assign a rule, highlight the variable field you want to assign a rule to by clicking
on it. The field name automatically defaults for you in the Destination Name field.
This is the image field that receives data during processing. Do not change this
name.
2 Enter the offset for the destination field in the Offset field. This field indicates the
beginning position of a piece of data in a variable field. For example, if you need
the data to be indented or offset in the variable field once processing has occurred,
you would enter that offset in this field.
3 Enter the length for the destination field in the Length field. The system defaults
to the variable field’s length.
4 Enter the name of the source field in the Source Name field or click the drop down
arrow to retrieve source field information from the data dictionary. Assigning a
source name to specific source information eliminates having to re-enter source
information.
5 Enter the offset for the source field in the Offset field. This indicates the first
position of the data in the extract file.
6 Enter the length for the source field in the Length field. This indicates the length of
the data in the extract file.
7 If you are using the TblLkUp rule, specify the number of the table file in the File
field. Table file information is stored in the TBLFILE.DAT file. This file tells the
system where to find individual table (TBL) files. Here is an example:
.\DEFLIB\AGENCY.TBL
.\DEFLIB\COMPCODE.TBL
This information is used by the TblLkUp rule. The system looks at the number in
the File field to determine which TBL file to use. Based on the search mask
information, the system then looks in that TBL file for the text.
NOTE: If you are not using the TblLkUp rule, no entry is required in this field.
8 Enter the record number in the Record field. The record number tells the system
which record to retrieve from the source file—a one (1) means the first record
found, a two (2) means the second record, and so on.
9 Select one of these options in the Required field. Data requirements control
whether data must merge into the field during the merge procedure.
273
Chapter 4
Adding Image and Field Rules
Option Description
Not Not required at print time. Missing data does not result in an error
message.
Host Required from a source data file during a batch run. Missing data results
in an error message and the document kicks to the error batch.
Operator Required as a manual entry in the WIP module. Missing data results in a
warning message and the document is kicked to WIP.
Either Required as manual entry in the WIP module. The system first tries to fill
the field with data from the extract file. If the data is missing, the system
kicks the document to WIP and creates a warning message.
NOTE: By customizing your INI file settings, you can have the system send all
transactions it could not process to a specific file, commonly called the error
batch (ERROR.BAT). You can print the error batch after Documaker Server
finishes. Transactions listed in this file are not sent to WIP or archived. These
transactions must first be corrected before they can be sent to WIP or archive.
For information about error batches, refer to the Documaker Server System
Reference.
10 Select a rule from the list in the Rule field. See Image and Field Rules Reference on
page 294 for a list and brief description of the rules from which you can choose.
11 If a mask is required during the processing of the rule, enter the mask in the Mask
field.
12 Enter the data in the Data field. The data string is the information that points to the
record location that identifies the record in the extract file.
After you make all the rule assignments, click OK to return to the Properties window.
Click Reset to undo your changes and display the Properties window. Click Cancel to
undo your changes and close the Properties window.
274
Assigning Rules with the Image Editor
NOTE: These reports are only available if the DDT file has been loaded. If the image
has no DDT file or if the DDT file has not been loaded, these reports are
unavailable.
Image Report
The Image Report option lets you view a listing of fonts used, image dimensions,
variable field information, and so on. This report does not include information about
rules.
275
Chapter 4
Adding Image and Field Rules
Variable fields
After you finish viewing the rules report information, you can use Notepad to save,
print, edit, or perform other tasks. For instance, you can...
276
Assigning Rules with the Image Editor
You can use this report to locate fields that need to be mapped or to make sure variable
field lengths are long enough to contain the data described by the destination length
in the DDT file.
After you finish viewing the compare report information, you can use Notepad to save,
print, edit, or perform other tasks. For instance, you can...
277
Chapter 4
Adding Image and Field Rules
FORMATTING The system provides several ways to format dates and numbers using the FmtDate,
RunDate, SysDate, DateFmt, and FmtNum rules. The system includes several pre-
DATA defined formats from which you can choose and you can set up format arguments to
handle any special needs.
The following topics explain your options.
NOTE: The DateFmt rule accepts a mask which includes an input and an output
format. See DateFmt on page 342, for more information.
In cases where you do not need a separator, such as format 4 or B, you can specify the
date as “4/2” for format 4 with a two-digit year. The system ignores the slash (/).
NOTE: This example shows the date format as it looks in the FAP file. The easiest way
to enter date formats is through the Image Editor, on the Attributes tab of the
variable field’s Properties window. The Image Editor will then create the date
format in the FAP file for you. The following discussion is based on using the
Image Editor to select the date format.
278
Formatting Data
When you choose Date Format as the type, you can choose from this list of date formats
in the Image Editor on the Attributes tab of the field’s Properties window. The table also
shows the corresponding date format code the Image Editor creates in the FAP file:
In the Format field, To see this code To get dates formatted as shown below
select this format in the FAP file (all examples are for January 2, 2013)
DD/MM/YY 2 02/01/13
YY/MM/DD 3 13/01/02
M/D/YY 5 1/2/13
D/M/YY 6 2/1/13
YY/M/D 7 13/1/2
YY/bM/bD A 13/ 1/ 2
MMDDYY B 010213
DDMMYY C 020113
YYMMDD D 130102
MonDDYY E Jan0213
DDMonYY F 02Jan13
YYMonDD G 13Jan02
DAY/YY H 002/13
YY/DAY I 13/002
Mon-DD-YYYY L Jan-02-2013
DD-Mon-YYYY M 02-Jan-2013
YYYY-Mon-DD N 2013-Jan-02
279
Chapter 4
Adding Image and Field Rules
In the Format field, To see this code To get dates formatted as shown below
select this format in the FAP file (all examples are for January 2, 2013)
Here is a list of the separators you can choose from in the Separators field on the
Attributes tab of the variable field’s Properties window.
In the Year Size field on the Attributes tab of the variable field’s Properties window, you
can choose from these options...
To use... Select...
only a two-digit year such as 01/ 3 (a “3” appears in the FAP file)
01/13 (if you enter anything other
than a two-digit year, you will
receive an error)
280
Formatting Data
only a four-digit year such as 01/ 5 (a “5” appears in the FAP file)
01/2013 (if you enter anything
other than a four-digit year, you
will receive an error)
The year as entered without Default (a blank space appears in the FAP file)
changing it
NOTE: You can force 2-digit years when you use the FmtDate rule, even if doing so
means the date may not be interpreted correctly when it is compared to the
century cut-off date. To force a 2-digit year, you must specify the output format
as “1/3” instead of “1/2”. Here is an example:
;0;0;DRVR-BIRTH-DT;1022;8;DRVR-BIRTH-DT;0;8;d,"B4",d,"1/3";
FmtDate;5,DRVRREC01,;N;N;N;N;3367;3600;11011;
The 3 is a format mask (normally used for input) which means 2-digits and only
2-digits.
Understanding the System The century cut-off date is used to determine the century for 2-digit years. This date
defaults to 50, but you can change it using this INI option:
< Control >
DateFMT2To4Year =
Anything less than or equal to the cut-off year is considered to fall in the current
century. For instance using the default of 50, 13 would be interpreted as 2013. Anything
greater than the cut-off year is considered to fall in the previous century. For instance,
again using the default of 50, 88 would be interpreted as 1988.
This is important when you have to determine the years or days between two dates.
There is a scenario where the system overrides a 2-digit year output. This only happens
when the input has 4-digits and the output has 2-digits and the resulting 2-digit output
does not yield the same results when read in again.
For instance, suppose your input is 01/01/1927 and the cutoff year is 50. Normally any
2-digit year with a value less than 50 is considered part of the current century. So if the
system outputs the data as 01/01/27 and then tries to read this date back in, you would
get 01/01/2025 and not 01/01/1927.
The system changes its normal behavior because it is designed to be able to read its
own output and come up with the result originally provided in the original input.
If, however, you specifically tell the system you only want two digits, you will get that
output, but the system may not be able to read it back in and get the same results.
281
Chapter 4
Adding Image and Field Rules
To... Use...
You determine whether the minus (-) or plus (+) signs appear before or after the
amount when you choose the field's format on the Attributes tab of the Properties
window in the Image Editor.
When you choose the format in the Image Editor, the system lets you choose from a list
of examples, such as:
+$ZZZZZZZZZ9.99
$$ZZ,ZZZ,ZZZ,ZZZ
$ZZZZZZZZZ9.99CR
$*ZZZZZZZZZZZ.ZZ
Suppressing Decimals The FmtNum rule can use a pre-defined numeric format to suppress decimals. The
with the FmtNum Rule format is 0 (zero). You can only use this format after the decimal and at the end of the
value. You cannot place format code 9 or Z after you specify the zero (0) format code.
Here are some examples of how the Z format and the zero (0) format work together.
282
Formatting Data
If you have decimals and you want to see two decimal places, you should use the first
format style shown (ZZZ.0Z). With this format style, an input value of 1.1 will yield 1.10.
If you use ZZZ.00 and input 1.1, you will get 1.1. In most cases, the values using format
Z will be displayed. However, if you are using Z,ZZZ.0Z format, Z will be suppressed if
the Z value contains zero and if the value next to the decimal is suppressed.
The values using the zero (0) format will be displayed unless it is zero. However, the
zero will be displayed if it is followed by another decimal position with a format of Z. If
there is another decimal position that follows and it has a format of zero (0) and the
value is also zero, both zeros will be suppressed along with the decimal. Lastly, if the
input value contains more decimal places than the output value, the number will be
truncated.
Using the ZeroText Use the ZeroText option to insert text you define instead of the zero value, if the result
Option with the FmtNum is zero. Here is an excerpt from a DDT file:
Rule
;0;0;FmtNum Field;10;12;FmtNum
Field;1;20;n,n,"$zz,zzz,zzz,zzz,zz9.99";fmtnum;1,ABC
ZeroText("INCL");N;N;N;N;7399;2675;11010;
Add the ZeroText option after the search mask. It should be preceded by a space. Place
the text you want to print inside quotation marks and parentheses, as shown in the
excerpt.
Code Description
283
Chapter 4
Adding Image and Field Rules
Code Description
%@xxx xxx identifies the locale. For example, %@CAD%A might produce mardi,
the Canadian French word for Tuesday. The default locale is USD, which is
US English. Once it finds a local format, the system uses that locale until
it finds another locale indicator.
# Suppress leading zeros for the following format codes. The system
recognizes this flag only with these formats:
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#w
> Uppercase the resulting text. The system recognizes this flag only with
these formats:
%>p, %>A, %>b, %>B
< Lowercase the resulting text. The system recognizes this flag only with
these formats:
%<p, %<A, %<b, %<B
<> Capitalize the first letter of the resulting text. The system recognizes this
flag only with these formats:
%<>p, %<>A, %<>b, %<>B
* - This flag only affects the format code that specifies it. Any subsequent codes that have
text are not affected unless they also include the flag.
Understanding the System Keep in mind the system can only work with the information it receives as input.
The formats for week, hour, minute, AM, and PM (%A,%w,%H,%I,%M,%S, %p) are
useful with the SysDate rule, but do not make sense for RunDate and FmtDate rules
since those rules seldom see week or time information as an input.
Furthermore, you would not want to use the zero suppress format option (#) on input—
especially if there are no separators in the data. For instance, the date indicated by
010109 or 1/1/09 is clear, but 1109 could indicate several things.
284
Formatting Data
For example, assume the date is 03-01-2009, which was a Monday, and the time is
11:57 am. This table shows you results using various formats.
Example Output
%m-%d-%Y 03-01-2009
%d 01
%#d 1
%A Monday
%>A MONDAY
%b Mar
%<b mar
%p AM
%<>p Am
NOTE: In Image Editor, you can display the Properties window for a variable field and
then click the Attributes tab to enter this information in the Locale field. For the
Locale field, you pick from a list of countries/languages, instead of entering
one of the codes shown in the following table. The Locale field only appears if
you chose Date Format, Numeric, or (Y)es or (N)o format in the Type field.
The first character of an fetype defines the field format type. There are several types
defined in the system such as a d for dates and an n for numbers. You can add three
additional characters to override the default locale, which is the United States
(English). Here is a list of the currently supported localities:
285
Chapter 4
Adding Image and Field Rules
For this country And this language Use this code in the FAP file:
286
Formatting Data
For this country And this language Use this code in the FAP file:
NOTE: The system lets you use the = operator to reference GVM and DAL expressions
before it rebuilds XPath search masks.The format is as follows:
=XXX(expression)
where XXX is one of the supported ways of finding data from a symbol, such as
DAL or GVM.
287
Chapter 4
Adding Image and Field Rules
=() Return the contents of the DAL variable named the same as the
root name of the current source name of the current DDT field-level
rule.
=("constant") Return the value of the DAL variable that is named by the string
constant.
=GVM(variable) Return the value of the DAL variable whose name is stored in the
specified DAL variable.
=(expression) Resolve the DAL expression and use the result as the name of a
DAL variable to access and return the value
=GVM() Return the value of the GVM variable named the same as the root
name of the current source name of the current DDT field-level rule.
=GVM("constant") Return the value of the DAL variable that is named by the string
constant.
=(variable) Return the value of the GVM variable specified by the contents of
the named DAL variable.
=GVM(expression) Resolve the DAL expression and then use the result as the name of
a GVM variable to access and return the value.
=DAL() Execute a DAL script named the same as the root name of the
current source name of the current DDT field-level rule and return
the results.
=DAL("constant") Execute the DAL script named by the string constant and return the
results.
=DAL(variable) Execute the DAL script named by the contents of the specified DAL
variable and then return the results.
=DAL(expression) Resolve the DAL expression and use the results as the name of a
DAL script to execute, and then return the results in XPATH.
Returns the contents of some other DAL variable that is specified by the contents of the
DAL variable ABC.
=("A" & "B" & "C")
Returns the same result as the ABC example — the contents of the DAL variable ABC.
=()
288
Formatting Data
This retrieves the contents of a DAL variable that is, by default, the root name of the
source name of the current DDT field. For example, assume, the current DDT field has
destination name MYFIELD #003 and the source name MYFIELD #003, then...
=()
Means to return the contents of the DAL variable MYFIELD. This is useful because it lets
you write general purpose XDB rules.
=DAL(...)
Returns the results returned by DAL script named by the expression. For example,
assume a DAL script named ABC.DAL contains:
MYVARIABLE = 100
RETURN(MYVARIABLE)
Formatting imported data The system lets you load data from a standard import file in XML, V2, or DS format.
During this process, the system creates a form set and loads the imported data onto
the fields on the appropriate forms.
To be able to use the various formatting rules when you have no extract file, include the
following rule mask symbolic lookup operators. These operators, which begin with an
equals sign (=), provide a way to access the contents of a variable field as if it were
found in an extract file. For instance...
=@() Return the contents of the variable field that is the same as the
current source field name.
=@(expression) Evaluate the DAL expression to get the name of the variable field
and then get its contents.
NOTE: For more information, see also information about the @ function in the DAL
Reference.
289
Chapter 4
Adding Image and Field Rules
SEARCH CRITERIA The GetRecord function lets the system get data records from an extract list. It searches
the extract list for particular records based on search criteria formatted as shown here:
offset,data offset,data (and so on)
The search criteria is defined by one or more pairs of offsets and data. The number of
pairs is limited by the size of the data field in a MEM_DDT_REC. All offsets are based
on the first character in a record being character 1 (base 1)—not character zero (0).
It is not necessary for offsets to increase from left to right, but it makes for better
readability. It is necessary, however, to specify your search string in the correct case.
Searches are performed in a case-sensitive manner.
Because many of the image and field rules use calls to GetRecord, search criteria is
often needed wholly or as part of the data field in the DDT file.
Here are some examples:
11,~ABC 25,Header that has a string starting at offset 11 which is not equal (~) to ABC
and is equal to Header at offset 25
290
Overflow and User Functions
OVERFLOW AND Many of the rules support the use of overflow symbols and user functions which work
together. An overflow symbol can be thought of as a block of memory that holds a
USER FUNCTIONS counter. This counter, or overflow variable, tracks the number of records processed
which helps the system determine which record to start with after it handles an
overflow situation.
To use overflow, you must include specific data in the DDT file. This overflow data
consists of the…
• @GetRecsUsed function
• Name of the form
• Overflow symbol
The @GetRecsUsed function is a function the rule runs to access information about a
pre-defined overflow symbol. The overflow symbol is stored in the DDT file with the
field level rules. You must define all overflow symbols using the SetOvFlwSym rule,
which is a job level rule (level 1) stored in the AFGJOB.JDT file.
The second part is the name of a form, which is retrieved from the form definition file
(FORM.DAT) specified in the INI file.
The third part is the overflow symbol itself.
The format of these data items in the DDT data field are as follows:
;@GETRECSUSED,FORMNAME,SYMBOL/ADDITIONAL_DATA;
NOTE: The first three data items are separated by commas. These items are separated
from the rest of the data that the rule requires by a forward slash (/).
Example @GETRECSUSED,DETAILS,Symbolnm/11,DETAILREC;N;N;N;
291
Chapter 4
Adding Image and Field Rules
292
Chapter 5
Image and Field Rules
Reference
Image and field rules help you control how data is
processed and generated to fill a field on a form.
293
Chapter 5
Image and Field Rules Reference
IMAGE AND FIELD The following pages list and explain the various image and field rules you can use. The
rules are discussed in alphabetical order on the pages following this table.
RULES REFERENCE
NOTE: You can also see information about the image and field rules while using
Studio when you select the rule on the Rule Properties window.
If you are using Image Editor, select the Help, Explain Rule option.
294
Image and Field Rules Reference
The following table lists the rules discussed in this chapter by type (job, image, or field
level rule) and purpose.
The Level column indicates whether the rule is an image level rule (3) or a field level
rule (4). The Overflow column indicates the rules which support the overflow feature.
The overflow features allow extract data to flow onto an additional page if needed.
295
Chapter 5
Image and Field Rules Reference
296
Image and Field Rules Reference
copy data from an SAP Raw Data 4 SAPMove_It on page 459 yes
Interface (RDI) extract file
297
Chapter 5
Image and Field Rules Reference
298
Image and Field Rules Reference
299
Chapter 5
Image and Field Rules Reference
tell the system the field has been 4 Master on page 397 na
mapped to the master DDT file
300
AccumulateVariableTotal
AccumulateVariableTotal
Use this field level rule (level 4) when you need to sum a variable from more than one
occurrence of a particular record type. This rule only works with the Record Dictionary.
Parameter Description
Record Name of the record pointer defined in the Records group of the Record
Dictionary file (entitled DataDict). This record pointer defines the column
to search, the text to look for in the starting column, and option flags.
Variable Name of the variable pointer defined in the Variables group of the Record
Dictionary. This variable pointer defines offset into the record where the
data to be accumulated is located, the length and type of the data, and
formatting flags.
Cond (Optional) Name of the condition defined in the Conditions group of the
Condition table. The condition consist of combinations of comparisons,
parenthesis, ANDs, and ORs to verify the correct results.
To format the output, you can also include any of the following format options in the
Mask field on the Field Options window in Studio or in the Mask field on the Edit DDT
tab of the field’s Properties window in Image Editor. Separate each option with a
comma.
Option Description
- (one If the number is negative, this option places a minus sign (-) in the left most
dash) position. For example, if the format mask is (9.2,12.2,C,$,-), the result is: “-
$2,100.00”.
-- (two If the number is negative, this option places a minus sign (-) immediately
dashes) before the amount. For example, if the format equal is (9.2,12.2,C,$,--), the
result is “ -$2,100.00”, with a full length of 12.
$ Adds a dollar sign. Cannot be the first character in the format mask. This
limitation arises from the Move_It format option, where a dollar sign ($) in
the first character of the mask means to perform a sprintf.
C Adds commas.
301
Chapter 5
Image and Field Rules Reference
Option Description
E Stops a calculation if the search condition is false. The Move_It rule may
return a null output buffer if:
- no record was found; a record was found, but the search mask contained a
pairing (offset,data) which extended past the end of the record
- a record was found, but the mapped data was blank.
F Adds a dollar sign ($) and places it in the first position. If the value is
negative, it moves the minus sign (-) to the last position.
-L (or --) Tells the system to use a floating negative sign on negative values.
+L (or++) Tells the system to use a floating sign and to always show that sign.
Lang Selects a language for spelling out the number. This flag is used with the V
flag and mask parameters. Here is an example: US, CFR.
P Print leading zeros. You cannot use this format with $, -, C, and F.
P** Prints leading zeros if used without character or symbol enclosed with single
quote.
T Used with the NegText, Text, and ZeroText data options. Adds text before or
after a number. Use the less than (<) symbol for inserting before, the greater
than (>) symbol for inserting after. Use the comma as a separator. You can
also use this option to place currency symbols before or after amounts. For
instance, T>£ places the British pound sterling symbol (ALT+0163) before an
amount.
Image Editor example Assume the content of the Record Dictionary is as follows:
<Records>
Detail = Search(61,18) Repeating
TotalDtl = Search(61,18,96,~00625,101,(01,02)) Repeating
Usage = Search(61,08) Repeating
302
AccumulateVariableTotal
Each time this rule encounters a record which matches the search criteria (18 starting
in column 61), it accumulates a total for the variable DTAT$ (the data found at offset 163
for a length of 10 formatted to the specification stated in the variable description).
The conditional parameter (Cond(Type)) is an optional parameter defined in the
Condition Table. This parameter is used to limit your search criteria.
303
Chapter 5
Image and Field Rules Reference
AddMultiPageBitmap
Use this image level (level 3) rule to import PDF or TIFF files as bitmap images. If the
file consists of multiple pages, the system inserts the first page on the triggering form
or image. For each subsequent page in the file, the system generates additional pages
and appends them to the form after the triggering image.
See Using the Type Option on page 310 for information on importing specific file types.
NOTE: When you use this rule with TIFF files, it performs the same task and works just
like the AddMultiPageTIFF rule. The first TIFF in the file is inserted on the
triggering form/image. Subsequent TIFF images trigger additional pages
which are appended to the form after the page which contains the first TIFF
image.
Syntax ;AddMultiPageBitmap;Options;;
For the Options parameter, this table describes your choices:
Option Description
Opt (Optional) Enter Yes to indicates this rule is optional and you do not
want error messages generated if the file naming parameters fail to
produce a valid name. The default is No.
This option lets you use multiple named parameters. The first
parameter that provides a usable file name is used.
Make this option the first rule parameter.
Use one of the following options (DAL, File, GVM, or SRCH) to specify the file name.
DAL(script Enter the name of the DAL script you want to execute to return the
name) name of the file you want to import. You must enter the name of a script
file or DAL library routine. Do not include DAL statements.
File(file name) Enter the name and path of the file you want to import.
GVM(variable Enter the GVM variable name that contains the name and path of the
name) file you want to import. The GVM variable data is mapped by some
other means before this rule is executed.
SRCH(search The name and path of the file you want to import is contained in a
criteria name record in the file specified by the ExtrFile option in the Data control
data) group.
The search criteria are one or more comma-delimited data pairs,
offsets, and character strings, used to as the search mask to find the
record in the file you specified.
The name data is a comma-delimited data pair that defines the offset
and length of the file name in the record defined by the search criteria.
Separate the search criteria and name data by a space.
304
AddMultiPageBitmap
Option Description
Embed (Optional) Include Embed to add the image data in the NA file. This is
necessary when the file that contains the scanned images is temporary
and you need to archive the NA/POL information. Upon retrieval, if you
have not embedded the bitmap information directly into the form set,
you will not be able to view or reprint the original images. The default
is No.
Keep in mind that embedding bitmap data can make the resulting NA
file much larger and also affects the size of the archives generated.
Only (Odd or (Optional) By default, all images in the file are included. Only include
Even) this option to specify that you want only the odd or even numbered
images. You can use this option to reduce the size of the output when
you know blank pages are included in the scanned images on every
other page.
Choose Odd when you know that the first image is not blank. This
includes images 1, 3, 5, and so on.
Choose Even to start with the second image. This includes images 2, 4,
6, and so on.
If you include both Only (Odd) and Only (Even), you exclude all images.
IN(top,left) (Optional) Specifies the coordinate for the top-left corner of the
bitmaps, in inches.
The default is position 0,0 within the image.
MM(top,left) (Optional) Specifies the coordinate for the top-left corner of the
bitmaps, in millimeters.
The default is position 0,0 within the image.
Top(top,left) (Optional) Specifies the coordinate for the top-left corner of the
bitmaps, in FAP units (2400 per inch).
The default is position 0,0 within the image.
Type (Optional) Enter T (TIFF) or P (PDF). If you omit this option, the system
first looks for TIFF files. If it cannot find a TIFF file, it looks for a PDF file.
Including this option will speed processing.
You can also include this option if the target directory contains both
TIFF and PDF files. For instance, if the directory contains import1.tif and
import1.pdf, the TIFF file is included by default. If you want to include
the PDF file, use the Type option.
Keep in mind:
• In z/OS environments, you can import TIFF files or import only the bitmap data
contained in PDF files. Under z/OS, this rule imports the bitmaps contained in the
PDF file, puts them at the position you specified with the position options (IN, MM,
or TOP) and scales them to fit the page.
Importing bitmap data from inside PDF files is useful because some fax drivers
take TIFF data and place it inside a PDF file. Therefore, by reading the bitmap data
from the PDF file, you are importing all the valuable information in that file.
• You can specify several AddMultiPageBitmap rules, as shown here, but realize
that each subsequent rule reuses the document pages added by previous rules.
305
Chapter 5
Image and Field Rules Reference
<Image Rules>
…
;AddMultiPageBitmap;DAL(TIF_DAL.dal),Only(ODD);
;AddMultiPageBitmap;DAL(TIF_DAL.dal),Only(ODD);
…
For instance, suppose you have declared two rules. The first has a 4-page file. The
second has a 5-page file.
After executing the two rules, there will be five pages in the form. The first four
pages will have two images each (one from the first rule and one from the second)
and the final page will contain the last image from the 5-page file.
Be aware that the placement of those bitmap images on the page can make them
overlap.
NOTE: This rule supports long file names on 32-bit Windows operating systems.
Type Description
Type 1 uncompressed
Type 2 Huffman
Type 5 LZW
• When importing TIFF or PDF files, keep in mind you can only include one of the
image positioning parameters, Top, In, or MM. The value specified is relative to the
FAP file's origin as specified by a SetOrigin rule. If there are more than one
positioning parameters, subsequent definitions override prior ones.
If you omit the positioning parameters, the default top/left coordinate is taken
from the margin defined for the FAP file. If the FAP file is not loaded and the
margins are unknown, the default is 0,0 (aligned with the top of the image).
• For TIFF and PDF files, if either the LoadFAPBitmap option or the Embed parameter
are set to Yes, the bitmap is loaded into memory. If neither are enabled, the system
opens the file to get the bitmap size, resolution, and number or pages, but the
bitmap data is not loaded. The system then assumes all of the bitmap images are
the same size as the first image in the file.
For single step mode, set LoadFAPBitmap option to Yes.
306
AddMultiPageBitmap
• You can use the PDFImportDPI option to set the resolution at which PDF files are
imported.
< BitmapLoaders >
PDFImportDPI =
Option Description
PDFImportDPI Enter the resolution in dots per inch (DPI) at which you want to
import PDF files. The default is 100 DPI. A higher DPI gives you
better fidelity, but the import process will take longer and the
output files will be larger.
Example These examples show how you can define the file to import when you use this rule.
Assume that your MRL has these sub-directories which contain these PDF files:
PDF_DAL A_DAL.PDF
PDF_File A_FILE.PDF
PDF_GVM A_GVM.PDF
PDF_SRCH A_SRCH.PDF
307
Chapter 5
Image and Field Rules Reference
NOTE: Keep in mind that if the OPT option is set to No, which is the default, the system
expects you to provide a file name, otherwise you get an error.
If you set the OPT option to Yes, this tells the system that if the data for the file
name is not provided it should skip to the next rule without creating an error
message. Setting OPT to Yes simply tells the system that if no file name is
provided, regardless of the mapping method you are using, it should not be
considered an error. Here is an example:
You get no error if the PDF record does not exist in the extract file or if there is
PDF record but as offset 10 for 25 bytes, there is nothing but spaces. If the
OPT(Y) option is omitted, you get one of these messages, depending on your
situation:
;AddMultiPageBitmap;OPT(Y), GVM(PDF_GVM);
If PDF_GVM contains no data and the OPT(Y) option is specified, you get no
error. If the OPT(Y) option is omitted, the system generates an error similar to
this one:
;AddMultiPageBitmap;OPT(Y), DAL(AddPDF.dal);
If processing the AddPDF.dal script results in an empty string and the OPT(Y)
option is specified, you get no error. If the OPT(Y) option is omitted, the system
generates an error similar to this one:
308
AddMultiPageBitmap
;AddMultiPageBitmap;DAL(PDF_DAL.dal),Only(ODD);;
…
NOTE: This option lets you import and process multiple PDF files because of the way
the file name and path are specified — one file per entry in the file pointed to
by the ExtrFile option.
NOTE: Keep in mind you can use any valid GVM variable, no matter how it is created
or assigned.
To create the PDF_File_GVM variable, you would include the following INI option in
your FSISYS.INI file and add its definition in the TRNDFDFL.DFD file.
< GenTrnDummyFields >
PDF_File_GVM = .\PDF_gvm\A_GVM
309
Chapter 5
Image and Field Rules Reference
<Image Rules>
;SetImageDimensions;0,0,26400,20400,0,0,0,0;
;AddMultiPageBitmap;GVM(PDF_File_GVM);;
• Pages imported from a PDF file are placed at coordinates (0,0) in the output by
default. You can use the position options (IN, MM, or TOP) to specify another
position.
• You can specify several AddMultiPageBitmap rules, as shown here, but realize
that each subsequent rule reuses the document pages added by previous rules.
Here is an example:
<Image Rules>
…
;AddMultiPageBitmap;DAL(PDF_DAL.dal),Only(ODD),TYPE(P);
;AddMultiPageBitmap;DAL(PDF_DAL.dal),Only(ODD),TYPE(P);
…
Assume the first PDF file contains four pages and the second PDF file contains five
pages.
After executing the two rules, there will be five pages in the form. The first four
pages will have two images each (one from the first rule and one from the second)
and the final page will contain the last image from the 5-image PDF file.
Be aware that the placement of those bitmap images on the page can make them
overlap.
NOTE: This rule supports long file names on 32-bit Windows operating systems.
310
AddMultiPageTIFF
AddMultiPageTIFF
NOTE: Beginning with version 11.3, the AddMultiPageTIFF rule was replaced by the
AddMultiPageBitmap rule. If the system comes across the AddMultiPageTIFF
rule, it auto ma ti ally runs the AddMultiPageBitmap rule.
Use this image level (level 3) rule to include multiple TIFF images contained in a single
TIFF file in a form set. The first TIFF in the file is inserted on the triggering form/image.
Subsequent TIFF images trigger additional pages which are appended to the form after
the page which contains the first TIFF image.
This rule can also extract TIFF, JPEG, or bitmap images from PDF files. For instance, if
you have a PDF file that includes scanned images, typically in TIFF format, you can use
this rule to extract those images from the PDF file.
NOTE: For more information on using this rule to extract TIFF, JPEG, or bitmaps images
from PDF files, see Using the Type Option on page 316.
Syntax ;AddMultiPageTIFF;Options;;
For the Options parameter, you have these options:
Option Description
Opt (Optional) Enter Yes to indicates this rule is optional and you do not
want error messages generated if the file naming parameters fail to
produce a valid name. The default is No.
This option lets you use multiple named parameters. The first
parameter that provides a TIFF file name is used, but if the name of the
TIFF file returned by the search criteria is blank, the system ignores it
and does not generate an error.
Make this option the first rule parameter.
DAL(script Enter the name of the DAL script you want to execute to return the
name) name of the TIFF file you want to import. You must enter the name of a
script file or DAL library routine. Do not include DAL statements.
File(file name) Enter the name and path of the TIFF file to import.
GVM(variable Enter the GVM variable name that contains the name and path of the
name) TIFF file. The GVM variable data is mapped by some other means
before this rule is executed.
311
Chapter 5
Image and Field Rules Reference
Option Description
SRCH(search The name and path of the TIFF file is contained in a record in the file
criteria name specified by the ExtrFile option in the Data control group.
data) The search criteria are one or more comma-delimited data pairs,
offsets, and character strings, used to as the search mask to find the
record in the file you specified.
The name data is a comma-delimited data pair that defines the offset
and length of the file name in the record defined by the search criteria.
Separate the search criteria and name data by a space.
Embed (Optional) Include Embed to add the image data in the NA file. This is
necessary when the file that contains the scanned images is temporary
and you need to archive the NA/POL information. Upon retrieval, if you
have not embedded the bitmap information directly into the form set,
you will not be able to view or reprint the original images. The default
is No.
Keep in mind that embedding bitmap data can make the resulting NA
file much larger and also affects the size of the archives generated.
Only (Odd or By default, all images in the multi-page TIFF file are included. Only
Even) include this option to specify that you want only the odd or even
numbered images. You can use this option to reduce the size of the
output when you know blank pages are included in the scanned
images on every other page.
Choose Odd when you know that the first image is not blank. This
includes images 1, 3, 5, and so on.
Choose Even to start with the second image. This includes images 2, 4,
6, and so on.
If you include both Only (Odd) and Only (Even), you exclude all images.
IN(top,left) (Optional) Specifies the coordinate for the top-left corner of the
bitmaps, in inches.
MM(top,left) (Optional) Specifies the coordinate for the top-left corner of the
bitmaps, in millimeters.
Top(top,left) (Optional) Specifies the coordinate for the top-left corner of the
bitmaps, in FAP units (2400 per inch).
Type (Optional) Enter T (TIFF) or P (PDF). If you omit this option, the system
first looks for TIFF files. If it cannot find a TIFF file, it looks for a PDF file.
Including this option will speed processing. You can also include this
option if the target directory contains both TIFF and PDF files.
Keep in mind:
Type Description
Type 1 uncompressed
Type 2 Huffman
312
AddMultiPageTIFF
Type Description
Type 5 LZW
• You can only include one of the image positioning parameters, Top, In, or MM. The
value specified is relative to the FAP file's origin as specified by a SetOrigin. If
there are more than one positioning parameters, subsequent definitions override
prior ones.
If you omit the positioning parameters, the default top/left coordinate is taken
from the margin defined for the FAP file. If the FAP file is not loaded and the
margins are unknown, the default is 0,0 (aligned with the top of the image).
• If either the LoadFAPBitmap option or the Embed parameter are set to Yes, the
bitmap is loaded into memory. If neither are enabled, the system opens the TIFF
file to get the bitmap size, resolution, and number or pages, but the bitmap data
is not loaded. The system then assumes all of the bitmap images will be the same
size as the first image in the file.
For single step mode, set LoadFAPBitmap option to Yes.
• If you include several options that serve similar purposes, the last one to provide
a result is used.
• You can specify several AddMultiPageTIFF rules, as shown here, but realize that
each subsequent rule reuses the document pages added by previous rules.
<Image Rules>
…
;AddMultiPageTIFF;DAL(TIF_DAL.dal),Only(ODD);
;AddMultiPageTIFF;DAL(TIF_DAL.dal),Only(ODD);
…
For instance, suppose you have declared two rules. The first has a 4-page TIFF. The
second has a 5-page TIFF.
After executing the two rules, there will be five pages in the form. The first four
pages will have two images each (one from the first rule and one from the second)
and the final page will contain the last image from the 5-page TIFF.
Be aware that the placement of those bitmap images on the page can make them
overlap.
NOTE: This rule supports long file names on 32-bit Windows operating systems.
Image Editor example These examples show how you can define the TIFF file to import when you use this rule.
Assume that your MRL has these sub-directories which contain these TIFF files:
313
Chapter 5
Image and Field Rules Reference
TIF_DAL T_DAL.TIF
TIF_File T_FILE.TIF
TIF_GVM T_GVM.TIF
TIF_SRCH T_SRCH.TIF
NOTE: Keep in mind that if the OPT option is set to No, which is the default, the system
expects you to provide a file name, otherwise you get an error.
If you set the OPT option to Yes, this tells the system that if the data for the file
name is not provided it should skip to the next rule without creating an error
message. Setting OPT to Yes simply tells the system that if no file name is
provided, regardless of the mapping method you are using, it should not be
considered an error. Here is an example:
You get no error if the TIFF record does not exist in the extract file or if there is
TIFF record but as offset 10 for 25 bytes, there is nothing but spaces. If the
OPT(Y) option is omitted, you get one of these messages, depending on your
situation:
314
AddMultiPageTIFF
;AddMultiPageTiff;OPT(Y), GVM(TIFF_GVM);
If TIFF_GVM contains no data and the OPT(Y) option is specified, you get no
error. If the OPT(Y) option is omitted, the system generates an error similar to
this one:
;AddMultiPageTiff;OPT(Y), DAL(AddTiff.dal);
If processing the AddTiff.dal script results in an empty string and the OPT(Y)
option is specified, you get no error. If the OPT(Y) option is omitted, the system
generates an error similar to this one:
315
Chapter 5
Image and Field Rules Reference
TIF_File_Name .\tiff\F_SCH1.tif
…
…
NOTE: This option lets you import and process multiple TIFF files because of the way
the file name and path are specified—one file per entry in the file pointed to by
the ExtrFile option.
NOTE: Keep in mind you can use any valid GVM variable, no matter how it is created
or assigned.
To create the TIFF_File_GVM variable, you would include the following INI option in
your FSISYS.INI and add its definition in the TRNDFDFL.DFD file.
< GenTrnDummyFields >
TIFF_File_GVM = .\tif_gvm\T_GVM
NOTE: If the PDF file contains anything else, such as text, those items will be
discarded. Only TIFF, JPEG, and bitmap images are added.
316
AddMultiPageTIFF
Keep in mind:
• The images in the PDF file are sized to fit the defined page dimensions for the form,
beginning at coordinates 0,0 in the output.
• If you include several options that serve similar purposes, the last one to provide
a result is used.
• You can specify several AddMultiPageTIFF rules, as shown here, but realize that
each subsequent rule reuses the document pages added by previous rules. Here
is an example:
<Image Rules>
…
;AddMultiPageTIFF;DAL(PDF_DAL.dal),Only(ODD),TYPE(P);
;AddMultiPageTIFF;DAL(PDF_DAL.dal),Only(ODD),TYPE(P);
…
Assume the first PDF file contains four TIFF images. The second PDF file contains
five TIFF images.
After executing the two rules, there will be five pages in the form. The first four
pages will have two TIFF images each (one from the first rule and one from the
second) and the final page will contain the last TIFF image from the 5-image PDF
file.
Be aware that the placement of the images on the page can make them overlap.
NOTE: This rule supports long file names on 32-bit Windows operating systems.
Image Editor example These examples show how you can define the PDF file to import when you use this rule.
Assume that your MRL has these sub-directories which contain these PDF files:
PDF_DAL T_DAL.PDF
PDF_File T_FILE.PDF
PDF_GVM T_GVM.PDF
PDF_SRCH T_SRCH.PDF
Using the File option with This example imports the T_FILE.PDF file from the PDF_File directory. Using this file,
the Type option the GenData program adds the images in the PDF file to the form set. Each image in the
PDF file causes a duplicate of the original FAP image to be appended to the form. This
duplicate contains the image from the PDF file. If the T_FILE.PDF file does not exist, no
error messages appear because the OPT option is set to Yes.
Here is an excerpt from a sample DDT file using the File option:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;0,0,26400,20400,0,0,0,0;
;AddMultiPageTIFF;File(.\PDF_File\T_File.PDF),Opt(Y,P),TYPE(P);;
…
317
Chapter 5
Image and Field Rules Reference
Using the DAL option with This example executes the PDF_NAME.DAL DAL script which returns the file name,
the Type option F_DAL.PDF. Using this file name, the GenData program adds the images contained in
the PDF file to the form set. Each image in the PDF file causes a duplicate of the original
FAP image to be appended to the form. This duplicate contains the image from the PDF
file. Only the odd-numbered images in the PDF file are included because the Only
option is set to Odd.
Here is an excerpt from a sample DDT file:
/* This image uses these rules */
Image Rules>
;SetImageDimensions;0,0,26400,20400,0,0,0,0;
;AddMultiPageTIFF;DAL(PDF_DAL.dal),Only(ODD),TYPE(P);;
…
Using the SCH option with This example imports PDF files (F_SCH1.PDF, F_SCH2.PDF, and F_SCH3.PDF) based on
the Type option the content of lines in the file designated by the ExtrFile option in the Data control
group. Using this file, the GenData program adds the images contained in the three PDF
files to the form set. Each image in each PDF file causes a duplicate of the original FAP
image to be appended to the form. This duplicate contains the image from the PDF file.
The images from the PDF files are embedded in the NA file because the Embed option
is set to Yes.
Here is an example of the extract file records pointed to by the ExtrFile option:
0 1
1 1
SCOxxxxxxxHEADERREC
…
…
PDF_File_Name .\PDF\F_SCH1.PDF
…
…
NOTE: This option lets you import and process multiple PDF files because of the way
the file name and path are specified—one file per entry in the file pointed to by
the ExtrFile option.
Using the GVM option This example imports a PDF file based on file name contained in the GVM variable
with the Type option called PDF_File_GVM. Using the PDF file name and path in the GVM variable, the
GenData program adds the images contained in the PDF file to the form set. Each image
in the PDF file causes a duplicate of the original FAP image to be appended to the form.
This duplicate contains the image from the PDF file.
NOTE: Keep in mind you can use any valid GVM variable, no matter how it is created
or assigned.
318
AddMultiPageTIFF
To create the PDF_File_GVM variable, you would include the following INI option in
your FSISYS.INI and add its definition in the TRNDFDFL.DFD file.
< GenTrnDummyFields >
PDF_File_GVM = .\PDF_gvm\T_GVM
319
Chapter 5
Image and Field Rules Reference
BldGrpList
Use this field level rule (level 4) to build lists of data you can use to populate image lists
or columns during GroupEnd processing for each transition. This rule lets you specify
which data will be collected in the list for GroupEnd processing.
• Array
• MultiArray
• MultiOccur
For each list function you can specify the Rule( ) and Data( ). These parameters let you
specify any standard field level rule that can be used to format the data gathered with
this rule, such as the MoveNum and Move_It rules.
NOTE: You must include the following rule in the AFGJOB.JDT file to clear the queues
created by the BldGrpList after it processes each transaction:
;ProcessQueue;;PostPaginationQueue;
For more information, see ProcessQueue on page 182.
Using the Array function This list function retrieves data from the first extract record encountered that meets the
search mask criteria in a transaction. The data defined as an array in the record is used
to populate fields on the image. The sub parameters for this function are:
Parameter Description
Search Search masks used to locate the extract record which contains the array
of data.
Count The offset and length of the field which contains the number of entries in
the array.
Entry The offset for the start of the array data and length of each data entry in
the array.
Parameter Description
BldGrpList; Array Calls the BldGrpList rule using the Array function.
Search(31, 68, 14, 2) Searches for an extract record with 68 in offset 31 and 2 in
offset 14.
320
BldGrpList
Parameter Description
Entry(41, 11) The array starts in offset 41 in the extract record and each
entry is 11 characters long.
Rule(MoveNum) Data( ) The MoveNum rule is called using the parameters defined by
Data ( ). If there are no Data parameters, you do not have to
define a Data sub parameter.
Using the MultiArray Use this function to retrieve data from multiple extract records that meet the search
function mask criteria. The multiple records define the array data that is used to populate fields
on the image. The MultiArray sub parameters are:
Parameter Description
Search Search masks used to locate the extract records which contain the array
of data.
Count The offset and length of the field which contains the number of entries in
the array.
Entry The offset for the start of the array data and length of each data entry in
the array.
Parameter Description
Search(1, CWIARRAY, 14, ~90) Searches the extract records for each transaction with
CWIARRAY in offset 1 and which is not equal to (~) 90 in
offset 14.
Entry(41, 11) The array starts in offset 41 in the extract record and
each entry is 11 characters long.
Rule (MoveNum) Data ( ) Calls the MoveNum rule using the sub parameters
defined by Data ( ). If there are no Data parameters, you
do not have to define a Data sub parameter.
321
Chapter 5
Image and Field Rules Reference
31 39 41
RG00000028030219281501 CWIARRAY0400.0011.1122.2233.3344.44
RG00000028030219281501 CWIARRAY0499.9688.4534.2176.4504.05
Using the MultiOccur Use this function to retrieve data from multiple extract records that meet the search
function criteria for each transition, which is used to populate the fields on the image. The
MultiOccur sub parameters are:
Parameter Description
Search Search masks used to locate the extract records that contain the
data to populate the image field.
Field The offset and length of the data in the extract record.
Parameter Description
Field(41, 38) Collects data from extract record starting at offset 41 for 38
positions.
322
CanSplitImage
CanSplitImage
Use this image level (level 3) rule to identify the segments of images that can be
dynamically split.
Syntax ;CanSplitImage;Debug;
Parameter Description
Debug Optional. Include this parameter to tell the system to include debug
information about when and how the image is split in the LOG.DAT file.
Keep in mind:
• You must include the PaginateAndPropagate rule in the AFGJOB.JDT file. The
PaginateAndPropagate rule looks for the CanSplitImage indicator. Without this
rule, images are paginated normally.
• If the print driver produces output for a non-edge printer, such as PCL, you must
have a header and footer that are copied on overflow. Otherwise, the data that
falls into the non-print area is lost.
• Text area objects must be flagged as Can span pages or the image is not split.
• Text area images that are greater 26,400 FAP units must be defined as Custom in
the Paper Type field on the Page Properties tab. To add information to one of these
images, increase the paper height on the Page Properties tab to accommodate the
increased size before you add the new information. Otherwise, the system may
create a multi-page image, which is not supported.
• Text areas that are multi-page images are not supported.
• This rule cannot split an image that includes a text area with an inserted file object.
• This rule is not supported when you are using a group rule. The group pagination
logic does not check for split images, nor does it call the image split logic.
This table shows how each type of object is handled within a text area:
Object Supported
Borders Yes.
Bullets or numbers No
Columns Yes
Boxes Yes *
Fields Yes
Files No
323
Chapter 5
Image and Field Rules Reference
Object Supported
Charts Yes *
Vectors Yes *
Lines Yes *
Boxes Yes *
* If the object falls on the page to be split, the system moves it to the next page.
2 The system duplicates the image. The new image follows the original image.
3 The system moves up the bottom of the original image to just above the footer.
4 The system moves the objects from the original image to the new image if the
bottom of the object extends beyond the bottom of the original image.
5 If the object is a text area and is defined as Can Span, the system splits the text
area, as described here:
The system makes sure the original image is not set to Can Grow.
The system creates the new text area in the new image and copies the object
from the original text area into the new text area.
The system creates a list of the text areas to divide and repositions all objects
moved to the new image. All objects are moved up as much as possible but
maintain their relative positions.
The system then moves the image down as far as the objects are moved up.
This preserves the relative position of the objects.
The system turns on the Can grow and shrink attribute and turns off the Can
span pages attributes in the text areas earlier saved in the list. It then resizes
the new image to its minimum size and turns the Can Span attribute back on.
Pagination continues as usual with two images, instead of one.
Here are some examples that show what happens when a text area with a border is
split:
324
CanSplitImage
Header
Page 2
Line 1 - This text
area has a border
Footer
Header
325
Chapter 5
Image and Field Rules Reference
CheckImageLoaded
Use this image level rule (level 3) to see if the FAP file is loaded, and if not, load the FAP
file. You would typically use this rule if there is information needed in the FAP file that
is not present in the DDT file, such as bar code information, or variable field rotation
information.
By default, the GenData program loads FAP files. If the LoadCordFAP option is turned
on, the GenData program loads all FAP files. Avoid turning on this INI option as it slows
performance. For example, make sure this option is set in the FSISYS.INI file as follows:
< RunMode >
LoadCordFAP = No
The GenData program should only write information about dynamic data, such as
variables, into the NAFILE.DAT file from the DDT files. You can do this more efficiently
by loading the DDT files instead of the FAP files.
There are, however, situations which require you to load FAP files. This rule and the
TextMergeParagraph rule handle these situations. These rules let you load data for a
single FAP file. Keep in mind that the TextMergeParagraph rule affects a single FAP file
while the LoadCordFAP option affects all FAP files.
Since, in some cases, you must load FAP files, the system includes utilities which let
you pre-compile FAP files and FXR files. By pre-compiling these files into CFA (FAP) and
CFX (FXR) files, you can speed performance by eliminating parsing operations. The
system is set up to use pre-compiled FAP and FXR files. You can see this setting in the
FSISYS.INI file:
< RunMode >
CompiledFAP = Yes
To turn off this setting, change the Yes to No. For best results leave it set to Yes.
Syntax ;CheckImageLoaded;;;
The CheckImageLoaded image rule checks to see if the FAP file associated with the DDT
file has already been loaded into memory. If the FAP file has not been loaded, the
CheckImageLoaded rule loads it.
Rotated fields If you have an image (FAP file) which contains four variable fields, each with a different
rotation and the fields are not rotated when you run the GenPrint program, make sure
you include the CheckImageLoaded rule. This rule is required in this situation.
Bar code variables If you are using the EAN (European Article Numbering) system to represent bar code
variables and you are using the Move_It rule to map the bar code variable field to your
data, include the CheckImageLoaded rule if your LoadCordFAP option is set to No.
326
CompBin
CompBin
Use this field level rule (level 4) to select the largest value of multiple packed decimal
fields located on the same record to populate a variable field.
For each given offset in the data section, the source offset is set and the MoveNum rule
is called. The highest value is kept in a buffer. After comparing all numbers, the system
copies the highest number into the variable field. There are two optional parameters:
• Compare the largest value with the given value. If it is larger, return it. If smaller,
use option two.
• Take the field with the index specified in the next parameter. If the second
parameter is not specified, return a SKIP message.
NOTE: The system ignores the fields of the DDT entry which usually contain the
source offset and the source length. Instead, the system uses the offset and
length specified in the data section. The search criteria and the extract field
descriptors must be delimited by a single space. No other spaces are allowed.
Studio example You could make the following entries in Studio in the Rules section of the Field Options
panel:
Rule CompBin
Destination offset 1
Source offset 45
File *
Length 6
Record *
Required *
Mask 11.0,18.0,B
The rule compares the packed decimals on the locations 45-4 bytes and 67-4 bytes in
the record identified by a XYZ at location 100 and returns the highest value.
327
Chapter 5
Image and Field Rules Reference
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 6
Offset 45
Length 4
File *
Record *
Required *
Rule CompBin
Mask 11.0,18.0,B
The rule compares the packed decimals on the locations 45-4 bytes and 67-4 bytes in
the record identified by a XYZ at location 100 and returns the highest value.
Here's another example:
Offset 1
Length 6
Offset 45
Length 4
File *
328
CompBin
Record *
Required *
Rule CompBin
Mask 11.0,18.0,B
The example compares the packed decimals on the locations 45-4 bytes and 67-4 bytes
in the record identified by a XYZ at location 100 and returns the highest value if it is
larger than 500. If it is not larger, the system returns the data from the first offset/
length pair (45,4).
329
Chapter 5
Image and Field Rules Reference
ConCat
Use this field level rule (level 4) to concatenate two or more text strings contained in
an extract record and place the result in a field you specify. This rule supports overflow.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 15
Offset 30
Length 12
File *
Record *
Required *
Rule ConCat
Mask *
This rule tells the system to get the first occurrence of a record matching the search
criteria of PMSP0200 at offset 17. The output consists of 12 characters retrieved from
three locations. The 14 character output consists of three characters from offset 30,
seven characters from offset 33, and two more characters from offset 40, as well as a
single space between the first and second and the second and third fields.
The mask is used for character compression of concatenated fields. The default is one
space. You can enter zero (0) or any positive value—just make sure the destination
length can accommodate the spacing of the fields.
330
ConnectFields
ConnectFields
Use this image level (level 3) rule to move and align field text so the data elements
appear to be connected.
NOTE: Previously, this rule was known as the ConcatFields rule. You can use either
spelling.
Parameter Description
F Enter the name of the field you want used as the fixed field. The system will
move the other fields in relation to this field. The system does not move the
fixed field. The first field you list in the rule’s parameters is always
considered the fixed field.
L Enter the names of the fields you want moved to the left of the fixed field.
R Enter the names of the fields you want moved to the right of the fixed field.
You must enter a fixed field and at least one field to move to the left or right side of the
fixed field. By default, the system places the other fields one space character from the
fixed field, unless you indicate that you do not want spacing between the fields.
NOTE: Include the word No after the movement parameters (L or R) to tell the system
not to add spacing between the two fields. For example,
F=FIELD1,RNO=FIELD2
tells the system to place the contents of FIELD2 immediately after to the end of
FIELD1 with no intervening spaces.
As the system places another field next to the fixed field, the fixed rectangle grows.
This lets you define additional fields based upon where the last field was added.
Keep in mind...
• This rule does not move fields vertically. Fields are only moved horizontally.
• This rule loads the image (FAP or compiled FAP) if it is not already loaded.
• If you use the Move_It rule, or other rules that support right justification by
padding the data with spaces, your results will be incorrect. This rule calculates
the width of a field based upon its entire contents and does not remove any white
space in the field.
• If you specify a field which does not contain data or is invalid, then no space, or
space holder, is included.
• Do not try to move the same field multiple times. The final location of a given
field's data is determined by the last movement of that field.
331
Chapter 5
Image and Field Rules Reference
• The field you specify as the fixed field, cannot be included as one of the fields to
be moved.
• This rule does not work with barcode or multi-line text fields. If you try to name
such a field, you will get an error. This rule does not handle rotated fields.
Image Editor example For these examples assume FIELD1 contains ABC, FIELD2 contains DEF, and FIELD3
contains XYZ. With this rule in the DDT file:
;ConnectFields;F=FIELD1,R=FIELD2;;
Here, the rule appended FIELD2 to the left side of FIELD1 and appended FIELD3 to the
right of FIELD1. Note, that in this example, it is difficult to see that the fixed field,
FIELD1, did not move. FIELD2 and FIELD3 moved to align with FIELD1. During this
operation, FIELD1 did not move at all.
With this rule in the DDT file:
;ConnectFields;FIELD1,LNO=FIELD2,RNO=FIELD3;;
The result is:
DEFABCXYZ
This rule is defined similar to the last one but uses the No space parameter.
With this rule in the DDT file:
;ConnectFields;F=FIELD1,R=FIELD2,R=FIELD3;;
The result is:
ABC DEF XYZ
Notice there are two fields appended to the right of the fixed field. The first one
appended expanded the rectangle which allows the next one to append after the last.
With this rule in the DDT file:
;ConnectFields;F=FIELD1,R=FIELD2,F=FIELD2,R=FIELD3;;
Notice that the result of this rule is the same as the previous example. In this case, the
fixed field was changed to FIELD2 after FIELD2 had been moved adjacent to FIELD1.
Then FIELD3 was moved adjacent to FIELD2 in its new location.
332
ConnectFields
This example illustrates one of the earlier cautions. In this case, FIELD2 is defined to
move twice. Since the operations are sequential, the field is first moved adjacent to
FIELD1. This movement expands the fixed rectangle used by subsequent movements.
When the field is named again, it moves relative to the current rectangle, making the
field appear farther to the right a distance equal to the size of the text in the field plus
the width of two spaces.
333
Chapter 5
Image and Field Rules Reference
CreateChartSeries
Use this image level rule (level 3) to get data from extract records and include it as
series data in a chart. The system uses the data exactly as it exists in the extract record.
There is a syntax you can use to create a search mask which will search for and get an
extract record. You can also specify where in that record the data resides. Additionally,
you must specify the chart and series to which the data will be added.
Typically, you will use the DeleteDefaultSeriesData rule, on page 345 before you use
this rule. You should always use the PurgeChartSeries rule, on page 449 after you use
this rule.
Parameter Description
Chart The name of the chart (as defined in the FAP file) to which the series
data will be added.
Series The name of the series that data is to be added to. If the series is not
defined in the FAP, a default series is created.
SearchMask The search mask to be used to find the extract record from which data
is retrieved. The search mask should contain one or more offset,data
pairings. For example, if you want to find the extract record with the
text HEADERREC at offset 20 (base 1), the search mask would be
20,HEADERREC. Additional offset length pairings can be appended.
For example:
20,HEADERREC,50,XYZ
means find the record with HEADERREC at offset 20 and XYZ at offset
50. See the topic Search Criteria on page 290 for more information.
DataDefinitions One or more offset,length pairings used to obtain data values from the
extract record defined by the search mask. For example, if five data
values existed at offsets 110, 120, 130, 140 and 150 each one 10
characters in length, the DataDefinitions field would look like this:
110,10 120,10 130,10 140,10 150,10.
There is a space between each offset,length pair, unlike the
SearchMask which has all its offset,data pairs separated by a comma
(,).
This example gets data for three different chart series in the same chart. The chart
name is VBarChart and the three data series are Ser1, Ser2, and Ser3.
334
CreateChartSeries
The series data for series Ser1 is retrieved from the record found with search mask
11,TESTXXREC,25,2. There are four series data values which are added to this series,
each one 10 characters in length. These are found at offsets 30, 40, 50 and 60 in the
extract record.
The series data values are added to the series, one after another, in the order that they
are listed in this rule. Series data for series Ser2 and Ser3 are created in similar
manner, but get data from other extract data records.
If multiple data items are contained in a single record, it is best to use the rule as
described above where the extract data record is searched for only once.
In the following example, we see the extract data records searched individually. If each
series data value is contained in a unique extract data record then there is no choice
but to search for each individually. Here is an example:
;CreateChartSeries;{VBarChart}{Ser1}{11,TESTAAREC,25,2}{30,10};
;CreateChartSeries;{VBarChart}{Ser1}{11,TESTBBREC,25,2}{40,10};
;CreateChartSeries;{VBarChart}{Ser1}{11,TESTCCREC,25,2}{50,10};
;CreateChartSeries;{VBarChart}{Ser1}{11,TESTDDREC,25,2}{60,10};
;CreateChartSeries;{VBarChart}{Ser2}{11,TESTEEREC,25,3}{30,10};
;CreateChartSeries;{VBarChart}{Ser2}{11,TESTFFREC,25,3}{40,10};
;CreateChartSeries;{VBarChart}{Ser2}{11,TESTGGREC,25,3}{50,10};
;CreateChartSeries;{VBarChart}{Ser2}{11,TESTHHREC,25,3}{60,10};
;CreateChartSeries;{VBarChart}{Ser3}{11,TESTIIREC,25,4}{30,10};
;CreateChartSeries;{VBarChart}{Ser3}{11,TESTJJREC,25,4}{40,10};
;CreateChartSeries;{VBarChart}{Ser3}{11,TESTKKREC,25,4}{50,10};
;CreateChartSeries;{VBarChart}{Ser3}{11,TESTLLREC,25,4}{60,10};
335
Chapter 5
Image and Field Rules Reference
CreateSubExtractList
Use this image level rule (level 3) to process multiple items of the same type within a
single transaction. This rule produces a temporary extract list which contains each
record of the same type within a transaction.
The temporary extract list is based on the search mask and key you define. The system
can then populate variable fields using the data in the temporary extract list.
Parameter Description
From( ) To ( ) The From(mask) includes the record specified in the from mask. The
To(mask) indicates where to stop. The To(mask) does not include the
record specified in the To(mask).
Drop This parameter drops the temporary sub-extract list that was created and
removes the records from the cached extract records for that transaction.
You will no longer have access to these records.
Append This parameter adds the temporary sub-extract list that was created to
the end of the extract list.
Image Editor example In the following example, the CRTSUB image triggers the CreateSubExtracList rule.
Here is an excerpt from the CRTSUB.DDT file:
<Image Rules>
;CreateSubExtractList;Search(1,18) Keys((24,10));
The first line creates a list based on the defined search criteria. The Keys variable
defines the scope of the search. In this example, Keys=Service Number. Each time the
service number changes, the system begins a new grouping.
Once a list of records has been grouped by this rule, a second form (sub-form) is called
and processed against that group of data. A unique key, such as a LOB key, must define
each sub-form called by this rule.
The second line in the DDT file defines the key for the sub-form it will call. Key2 triggers
the appropriate sub-form. In this example, CRTSUB calls on LOB2. Therefore, each sub-
group of data created by CRTSUB will be used to process all of the images in LOB2. And,
unless otherwise specified, the LevelCheck value should always be set to zero.
336
CreateSubExtractList
Like all forms under a separate line of business in a form set, a sub-form called by the
CreateSubExtracList must have a trigger in the SETRCPTB.DAT file. You have to make
sure you have a unique trigger for the image that calls the CreateSubExtractList rule.
Otherwise, you will end up with a repeating group of data (see the sample extract file
below.) Here is an example:
;COMPANY;LOB;TEST;;;;;0;0;0;0;;
;COMPANY;LOB;TEST;CRTSUB;;CUSTOMER;1,18,9,HEADER,16,ELEC11;1;1;0;1;
;
;COMPANY;LOB;TEST;IMAGE1;;CUSTOMER;;0;0;0;1;1,18,16,ELEC11;
;COMPANY;LOB2;TEST;;;CUSTOMER;;0;0;0;0;;
;COMPANY;LOB2;TEST;IMAGE2;;CUSTOMER;;0;0;0;1;1,18,16,ELEC11;
;COMPANY;LOB2;TEST;IMAGE3;;CUSTOMER;1,18,16,ELEC11;1;1;0;1;;
;COMPANY;LOB2;TEST;IMAGE4T;;CUSTOMER;;0;0;0;1;1,18,16,ELEC11;
;COMPANY;LOB2;TEST;ENDSUB3;;CUSTOMER;;0;0;0;1;1,18,16,ELEC11;
NOTE: You must set up the calling image for overflow so the CreateSubExtractList rule
is recalled and can group the next set of records. If you do not set up overflow,
the system processes only the first group of records for the first key field. Also
note the form name TEST does not change.
The DDT file corresponding to the last image in the sub-form called by this rule must
contain either Drop or Append. In this example the last image is IMAGE5.FAP. This lets
the rule knows that it has reached the end of the form. Here is an excerpt from the
IMAGE5.DDT file:
<Image Rules>
;CreateSubExtractList;DROP;
337
Chapter 5
Image and Field Rules Reference
DAL
Use this field level (level 4) rule to get information from an extract file if certain
conditions are met. In addition, this rule lets you call most of the DAL functions. The
DAL rule is similar to the IF rule except it returns only data, not another rule. For more
information, see If on page 378.
When you use this rule in a DDT statement, end every statement with two colons (::).
Instead of writing the statement to the DDT file, you can specify a DAL script name by
adding Call ("scriptname") in the Data field. In the DDT file, it would look like this:
;0;0;DALTEST;0;18;DALTEST;0;18;;DAL;Call ("script.dal");N;N;N;N;
It is also possible to specify the rule data for the DAL rule in an external file. Name the
file to include with a leading ampersand (&) in the data area, as shown here:
;0;0;DALTEST;0;18;DALTEST;0;18;;DAL;&data.inc;N;N;N;N;
This loads the file, data.inc, from the current directory and inserts its contents into the
rule’s data area. Note that the file should contain a single line, just as it would appear
if you had typed the data directly into the rule data parameter. Also, if the include file
is not in the current directory, the name must specify the correct path to locate the file.
This means the content of your include file is too large to fit into the rule data area. To
resolve this problem, place the data in a DAL script file and use the CALL or CHAIN
command to execute the DAL script.
338
DAL
NOTE: You can use curly braces { } to tell the system to apply a search mask before
executing the DAL script. Here is an example:
$A = {11,AUTONUREC 25,9}::
The use of curly braces is not part of DAL syntax, but rather is a Documaker
Server notation that is preprocessed before the DAL script is executed.
Please note that you can only use curly braces in this manner if the DAL script
is written into the rule data area. External DAL script files cannot contain such
syntax. To retrieve extract data within an external DAL script file, you have to
use the GETDATA function.
339
Chapter 5
Image and Field Rules Reference
DateDiff
This field level rule (level 4) lets you display the difference between two dates. The
dates do not have to be in the same format in the extract file, but the format of each
must be supported. (The valid formats 1,7,10,11 will be described later.)
The dates and their formats are separated by a comma (,) and are defined in the Data
field of the rule. For formats supporting a two-digit year, the 20th century (19xx) is
assumed for date difference calculations. Date differences as a result of using this rule
are not true in the sense that they are calculated under the following guidelines. These
are sometimes referred to as bankers dates.
Syntax FORMATMASK;rule;RULEDATA;...
The FormatMask must be in the form of:
OUTPUTFORMAT OUTPUTFORMATDATA
For example, if you enter 3 / 3 and there are 365 days difference, the output would be
012/005. Here is an example:
1 3 / 3(1 is OUTPUTFORMAT)
The RULEDATA consists of two groups of search criteria and extract field descriptors for
the two dates. These two groups of data are separated by a colon (:). Within each
group, search criteria and extract field descriptors are separated by a single space.
Within search criteria, offset and length are separated by a comma (,). Extract field
descriptors are also separated by a comma (,).
The RULEDATA must be in this form:
RECOFFSET1,RECDATA1 OFFSET1,LENGTH1,DATEFORMAT1:RECOFFSET2,RECDATA2
OFFSET2,LENGTH2,DATEFORMAT2
Parameter Description
340
DateDiff
Parameter Description
1 MM/DD/YY
7 YYYY-MM-DD
11 MMDDYYYY
NOTE: The data for the two dates is separated by a colon (:). Here is a RULEDATA
example: 1,TRANS 73,10,7:1,TRANS 83,10,7
Understanding the System The input to the DateDiff rule can be any of the supported date formats. The system
converts each format to the Julian_AD date and then returns the difference.
Julian_AD dates are simply the number of days since 1 AD. 1 AD is presumed to be 01/
01/0001 because there was no year 0000. That’s why the millennium does not actually
start until 2001. For example, 730179 is Julian_AD for 02/29/2000.
341
Chapter 5
Image and Field Rules Reference
DateFmt
NOTE: You should use the FmtDate rule, on page 355, instead of this rule. This rule is
included in this version of the system only for legacy system support.
Use this field level rule (level 4) to format a date retrieved from an extract record based
on the mask you select. A list of date masks appears below. This rule supports
overflow.
Date masks
ID Source Destination Also supported by FmtDate
342
DateFmt
24 YYMM MM/YY no
Destination formats with a single letter, such as D, indicate that the system will omit
leading zeros or spaces. Also, please note that Month indicates both upper- and
lowercase letters will be used while MONTH indicates only uppercase letters will be
used. Mon indicates the month will be abbreviated, in upper- and lowercase letters.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 10
Offset 75
Length 6
File *
Record 2
Required *
Rule DateFmt
Mask 4
Data 17,PMSP0200
343
Chapter 5
Image and Field Rules Reference
This rule gets the second occurrence of a record in the extract list which has PMSP0200
starting at its 17th character. It then takes the six characters starting at location 75
(which should be of the format YYMMDD since we are using format mask 4). The
DateFmt rule will reformat the date to be MM-DD-YY before placing the date in the
output buffer.
This example shows the use of a user function and overflow symbol:
Offset 1
Length 10
Offset 75
Length 6
File *
Record 2
Required *
Rule DateFmt
Mask 4
Data @GETRECSUSED,FORMABC,OVSYM/17,PMSP0200
344
DeleteDefaultSeriesData
DeleteDefaultSeriesData
This image level rule (level 3) removes all unnamed series data from the specified set
of series in a chart. If there are no series specified, this rule removes all series for the
chart.
This rule is designed for the special circumstance where unnamed series data may
have been defined for the chart during composition, but this series data is not used in
every production. In other words, the series data is dynamically created as the result
of running rules such as the CreateChartSeries or FieldVarsToChartSeries rules.
Syntax ;DeleteDefaultSeriesData;chart,series,...;;
The first semicolon-delimited field contains the rule name. The second semicolon-
delimited field should contain one or more comma-delimited items. The first item must
always be a chart name. Any successive items must be series names that belong to that
chart.
Image Editor example If you had a chart named MYCHART which contained three different series named
SERIES1, SERIES2, and SERIES3, all the following would be valid uses of this rule:
Delete all series data (either method will work)
;DeleteDefaultSeriesData;MYCHART;
;DeleteDefaultSeriesData;MYCHART,SERIES1,SERIES2,SERIES3;
Delete series data for SERIES1
;DeleteDefaultSeriesData;MYCHART,SERIES1;
345
Chapter 5
Image and Field Rules Reference
DelImageOccur
Use this image level rule (level 3) to delete a specific occurrence of an image on a form.
Syntax ;DelImageOccur;Occurrence,Form,KillSpace;;
Parameter Description
Occurrence The image occurrence to delete. Positive numbers indicate the count is
from the beginning. Negative numbers indicate the count is from the end.
Form The form name. If there are multiple images, separate the image names
with commas, such as
form1,form2,form3,
If you specify a form name, the rule only works on those forms. If you omit
the form names, the rule affects all forms that include the image.
KillSpace (Optional) If you include this parameter, the system removes the space
after the specified occurrence of the image.
If you include this parameter, you must include it before the form name.
Here is an example:
;DelImageOccur;1,KillSpace;;
;DelImageOccur;1,KillSpace, Form1;;
Any form specified before the KillSpace parameter is not affected by this
parameter. Consider this example:
;DelImageOccur;1,Form1,KillSpace,Form2,Form3
The first occurrence of the current image in Form1 is removed but the
space where this image was placed is not removed. However, the first
occurrence of the current image is removed from From2 and From3.
Furthermore, the system also removes the space after the specified
occurrence of the image.
To use this rule, you must also add the following rule to the AFGJOB.JDT file:
;ProcessQueue;;PostPaginationQueue;
Add this rule after the RunSetRcpTbl rule. You can omit the rule level number.
This example removes the third occurrence of the current image on form1 and form2.
;DelImageOccur;-2;;
This example removes the second-to-last occurrences of the current image for all
forms.
346
DontPrintAlone
DontPrintAlone
Use this image level rule (level 3) if you need to delete a page from a form set and there
is only one image on that page.
Syntax DontPrintAlone( )
If, when the system determines pagination, it determines the image is the only image
on the page, the system omits the page from the printed output.
Image Editor example Here is an example from the DDT file for the QAIMSGOP.FAP file:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,298,15965,0,600,0,480;;
;SetOrigin;REL+0,MAX+0;;
;PaginateBeforeThisImage;;;
;ResetImageDimensions;MinHeight;;
;DontPrintAlone;;;
This example will not include the image QAIMSGOP in the printed output if it is the only
image on a page.
347
Chapter 5
Image and Field Rules Reference
EjectPage
Use this field level (4) rule to process multi-page FAP files (images). With multi-page
images, when the image is added to the form set only one image object is created.
When the image gets loaded, the system creates the other images.
Syntax EjectPage( )
This rule makes sure the pre- and post-image level processing is run for each image of
the multi-page FAP image, not just the pre-processing on the first image and the post-
processing on the last.
When you run the FAP2MET utility on a multi-page FAP file, the utility creates a FAP file
for each page. In the DDT file, you should then make an entry for the FAP file and add
an EjectPage rule for each additional page that makes up the form. The system knows
by the EjectPage rules to look for additional FAP files for this form.
Image Editor example Here is an example of the rule as it would appear in a DDT file:
;0;0;zip;75;5;zip;0;5;;move_it;11,ProdARec;N;N;N;N;16168;5070;11010
;
;;;;;;;;;;EjectPage;;;;;;;;;
;0;0;f p num;0;2;f p num;0;2;;mk_hard;X;N;N;N;N;13925;25842;11006;
Image Editor automatically inserts this rule into the DDT file for a multiple page FAP
file.
348
FfSysDte
FfSysDte
Use this field level rule (level 4) to get the current date from the system and place that
date in the destination field. This rule supports overflow.
There are several output formats you can specify by entering a format ID in the DDT
data field. Here's a list of the format IDs you can use:
ID Output Format
MS1 month spelled out, followed by the two-digit year. (24 June 02)
MS2 month spelled out, followed by the date and a four-digit year (February 17,
2002)
Default no option specified in the data field, will use the format MM/DD/YY
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
length 20
Offset *
Length *
File *
Record *
Required *
Rule FfSysDte
Mask *
349
Chapter 5
Image and Field Rules Reference
Data *
This example places the current system time stamp in the destination field, according
to the default format of MM/DD/YY.
NOTE: Place the format ID immediately after the rule. This differs from other rule
masks.
350
Field2GVM
Field2GVM
Use this image level (level 3) rule to create a GVM variable from the fields in the current
image. For instance, you can use this rule to store the system date for later use.
Parameter Description
FieldName Name of the field on the current image from which the data is retrieved.
GVM name Name of the GVM variable in which the retrieved data will be stored.
You can use this rule to output data into one of the batches or the NEWTRN.DAT file if
the GVM variable name matches the field name in the DFD file.
GVM variables are essential part of Documaker Server. For example, the fields in the
NEWTRAN.DAT file, or in recipient batch records are all GVM variables during runtime.
This rule lets you take data from a field and place the data into a GVM variable. If that
GVM variable happened to be one of the fields in a recipient batch record, it would be
written out to the RCB file.
You can also use the \O parameter to identify fields the system should consider as
optional.To flag a field as optional, include \O at the end of the field name. Here is an
example:
;Field2GVM;Date\O,CurrentDate,DTE_CLOSED,DTEACCTCLSD;
This example will not generate an error if Date cannot be located on the image. An error
will be generated if DTE_CLOSED is missing.
If the system cannot find a field marked as optional, it will not change the destination
GVM variable. This behavior supports situations where you map any of several fields
that could be generated to the same GVM variable.
Note, that this rule creates a GVM variable if necessary. Therefore, be sure to check the
spelling of the GVM variable name if you intend to use one created by a prior process.
Otherwise, a new variable is created.
Keep in mind...
• If the GVM variable you specify does not exist, it will be created. This differs from
other rules which expect you to have defined the GVM variable by some other
means. This means that if you misspell the variable name, you will not get an error
because a GVM variable will be created for that name.
• Designating a field as optional does not change the value of the GVM variable if
the field is missing. The system does not clear the GVM variable of data just
because a field is missing.
The data contained in the BANNER Text #002 field is retrieved and stored in the GVM
variable called DATAOUT.
351
Chapter 5
Image and Field Rules Reference
You can also use this rule to place the system date in the NEWTRN.DAT file. To do this,
in the FAP file you create a field, such as System_Date, which will always be triggered.
You then add a field name, such as SystemDate in the TRNDFDFL.DFD file. Next, add...
Field2GVM,System_Date,SystemDate
in the DDT file and use the SysDate rule to place system date in the System_Date field.
This will place the system date in the NEWTRN.DAT file.
If you then want to place the system date into archive, define a field, such as DAPDate,
in the APPIDX.DFD file and add...
< Trigger2Archive >
dapdat = systemdate
Once the system date is in APPIDX.DBF file, you can display it by adding...
< AfeArchiveDisplay >
Field = dapdata,DD%m/%d/%Y
352
FieldVarsToChartSeries
FieldVarsToChartSeries
Use this image level rule (level 3) to allow a chart's series data to be retrieved via
references to the image’s variable fields. Since Documaker Server does no field
propagation, as would an entry system, you must handle field propagation.
You can assign a name for the series data in the FAP file definition. You can then use
the series data name to associate the series with a variable field with the same name.
This rule propagates data mapped to a variable field into series data with the same
name. What this rule does that the CreateChartSeries rule cannot is manipulate extract
data before it is assigned to a series.
Syntax FieldVarsToChartSeries( )
Typically, you will need to use the DeleteDefaultSeriesData rule before you use this
rule. Always use the PurgeChartSeries rule after you use this rule, as a means of
cleanup. If you find incorrect data in a chart, you may be missing one of these rules.
NOTE: Use Studio or Image Editor to select the fields the system will then use to
assign the minimum, maximum, increment/label, and tick mark values. See
the Documaker Studio User Guide or the Docucreate User Guide for more
information.
Image Editor example This example uses the Move_It rule, which does not manipulate the extract data. You
can also use other rules, such as the MoveNum rule, to scale the data mathematically.
For example, if a chart has four series, each with four series data values, you could
build it as shown below with data gathered by field level rules. You can then use the
mapped variable field data to populate the chart series data fields listed in the FAP file.
Here is how it would look in the DDT file:
<Image Rules>
;FieldVarsToChartSeries;;;
<Image Fields>
<Image Field Rules Override>
;0;0;FIELD10;30;10;FIELD10;0;10;;Move_It;11,TESTXXREC,25,1;N;N;N;N;
;0;0;FIELD11;40;10;FIELD11;0;10;;Move_It;11,TESTXXREC,25,1;N;N;N;N;
;0;0;FIELD12;50;10;FIELD12;0;10;;Move_It;11,TESTXXREC,25,1;N;N;N;N;
;0;0;FIELD13;60;10;FIELD13;0;10;;Move_It;11,TESTXXREC,25,1;N;N;N;N;
;0;0;FIELD20;30;10;FIELD20;0;10;;Move_It;11,TESTXXREC,25,2;N;N;N;N;
;0;0;FIELD21;40;10;FIELD21;0;10;;Move_It;11,TESTXXREC,25,2;N;N;N;N;
;0;0;FIELD22;50;10;FIELD22;0;10;;Move_It;11,TESTXXREC,25,2;N;N;N;N;
;0;0;FIELD23;60;10;FIELD23;0;10;;Move_It;11,TESTXXREC,25,2;N;N;N;N;
;0;0;FIELD30;30;10;FIELD30;0;10;;Move_It;11,TESTXXREC,25,3;N;N;N;N;
;0;0;FIELD31;40;10;FIELD31;0;10;;Move_It;11,TESTXXREC,25,3;N;N;N;N;
;0;0;FIELD32;50;10;FIELD32;0;10;;Move_It;11,TESTXXREC,25,3;N;N;N;N;
;0;0;FIELD33;60;10;FIELD33;0;10;;Move_It;11,TESTXXREC,25,3;N;N;N;N;
;0;0;FIELD40;30;10;FIELD40;0;10;;Move_It;11,TESTXXREC,25,4;N;N;N;N;
;0;0;FIELD41;40;10;FIELD41;0;10;;Move_It;11,TESTXXREC,25,4;N;N;N;N;
;0;0;FIELD42;50;10;FIELD42;0;10;;Move_It;11,TESTXXREC,25,4;N;N;N;N;
;0;0;FIELD43;60;10;FIELD43;0;10;;Move_It;11,TESTXXREC,25,4;N;N;N;N;
353
Chapter 5
Image and Field Rules Reference
354
FmtDate
FmtDate
Use this field level rule (level 4) to format dates. Using this rule you can format dates
for different localities. This rule supports overflow.
The DDT mask for the FmtDate rule takes these values:
• input fetype
• input format mask
• output fetype
• output format mask
NOTE: There are two types of format masks, pre-defined types 1-9 and A-Q and user-
defined format arguments. If the pre-defined formats meet your needs, use
them, otherwise, create a user-defined format. For information on using pre-
defined format types, see Using Pre-defined Date Formats on page 278.
Image Editor example Assume the data in extract file is 04/01/2001 (which is fixed type 1 – MM/DD/YYYY) and
you want to convert it to April 1, 2001 (which is Mon D, Yr), use this DDT format mask:
d,”1/4”,d,”4/4”
To produce a Canadian French date, add the CAD locality code, as shown here:
d,”1/4”,dCAD,”4/4”
To produce a date such as Apr 1, 2001 (format -- Mon D, Yr which does not fall into any
fixed type), use the following DDT format mask.
d,”1/4”,d,”%b %#d, %Y”
Here is another example:
;0;0;datefield1;80;6;datefield1;0;12;d,”B”,d,”4/
4”;FmtDate;11,HEADERREC;N;N;N;;;;;
355
Chapter 5
Image and Field Rules Reference
FmtNum
Use this field level rule (level 4) to format numbers. Using this rule you can format
amounts for different localities. This rule supports overflow.
The DDT mask area takes these values:
• input fetype
• output fetype
• output format mask
An fetype defines the field format type. You can have an input and an output fetype. For
example, an input fetype with the FmtNum rule tells the system where the decimal
goes in the number. The output fetype tells the system how to format the output
amount. An fetype can consist of either one or four characters.
The first character of an fetype defines the field format type. There are several types
defined in the system such as a d for dates and an n for numbers. You can add three
additional characters to override the default locale, which is USD (United States,
English). Please see Field Format Types (fetypes) on page 285 for a list of the
supported localities. If your defined fetype is not one that is supported, the system
uses USD.
Image Editor example For example, if you have this DDT format mask...
n,nCAD,"$ZZZ,ZZ9.99"
...and the extract data has an amount such as 123,456.78, the system uses this rule to
read the amount and then create 123456.78. The system then formats this number
(123456.78) to produce the result, 123 456,78$.
Here is another example. If you use this DDT format mask...
nCAD,nUSD,"$ZZZ,ZZ9.99"
...and the extract data has a Canadian French amount such as 123 456.78$, the system
uses this rule to read the number and then create 123456.78. The system then formats
this number (123456.78) to produce the result in US dollars, $123,456.78.
Left justifying numbers You can include the L parameter to left justify numbers after they have been formatted.
This parameter is the fourth optional flag in the DDT mask area. For example, if you
have this DDT format mask
n,n,"z,zzz,zzz,zzz,zz9.99",L
and the extract data has an amount such as 123456.99, the system uses this rule to
read the amount and formats this number to produce the result, 123,459.99. The rule
will then left justify the field. Below is an example of the result with and without the L
parameter.
Without the L parameter:
n,n,"z,zzz,zzz,zzz,zz9.99"
123,456.99
356
FmtNum
Like the Move_It and MoveNum rules, this type of left justification simply removes
leading spaces. It does not provide a positional justification as is provided by the
JustFld rule.
357
Chapter 5
Image and Field Rules Reference
GlobalFld
Use this field level rule (level 4) to speed the processing of fields used repeatedly
throughout a form set.
Frequently a field rule is called to retrieve the same record over and over, which slows
batch processing. Using this rule helps you avoid unnecessary repetition and therefore
speeds processing.
NOTE: The name of the field in the FAP file (the field name in the XDB file) and the
source name of the field in the DDT file (the source name in the XDB file) must
be identical for this rule to work correctly.
Syntax GlobalFld( )
To use this rule, you must have an XDB.DBF file, which is similar to a data definition
table (DDT) file. You set up the XDB and DDT files as shown in the examples below.
The Record field column in an XDB record can be just about anything. If you are
importing the fields from a DDT file, the system defaults the record field to the name of
the DDT file you are importing.
If you import the fields from a COBOL Copybook, the record column field is assigned
the name of the higher level group that owns the field.
Keep in mind that you cannot use the GlobalFld rule if the field data is not going to be
global in scope. For instance, overflow and sub-extract situations where you expect the
next occurrence of the field to get a different result are not candidates for the GlobalFld
rule.
The SourceFile record member is not used in looking up XDB records. XDB records are
looked up by the destination field name alone.
NOTE: When using the GlobalFld Rule, the XDB record replaces the entire DDT record.
Remember, it is a global field, therefore the assumption is that all DDT
references to the field are identical.
If you want to make common rule definitions, but override certain members in
individual DDT files, use the Master DDT Editor instead of the GlobalFld rule.
358
GlobalFld
Image Editor example Assume the InsuredName field is used many times throughout the form set and the
name of the form set is QMDC1. Make these entries in the XDB.DBF file:
Field Enter
Record QMDCL
Offset 25
Length 30
Required Not
Rule Move_It
Mask
Data 11,INSNAMREC
And make these entries in the QMDC1.DDT file, using the Edit DDT tab of the field’s
Properties window in Image Editor:
Field Enter
OffSet 0
Length 30
SourceName InsuredName
OffSet 0
Length 0
File 0
Record 0
Required Not
Rule GlobalFld
Mask
Data
359
Chapter 5
Image and Field Rules Reference
When the system executes this rule, it first checks the Dictionary rule by the field name
key. If the record exists, it returns the value—here InsuredName. If not, it looks into
XDB and gets the original field rule, such as Move_It.
Then the system executes the field rule to get the value and returns it. Finally, it stores
the record in the dictionary. The next time that record is required, the system gets the
value from the dictionary.
NOTE: After you run the GlobalFld rule, you must run the Dictionary rule to terminate
the XDB and free memory.
360
GroupBegin
GroupBegin
Use this image level rule (level 3) to define the first image in a group of images. A group
is a set of images delimited by a begin image and an end image that is processed as a
single unit.
Using this rule, you specify which images are grouped on the printed pages. Each
GroupBegin rule must have a corresponding GroupEnd rule. With these rules you can:
• Box
• GroupPagination
• List
• StayTogether
• Column
Parameter Description
361
Chapter 5
Image and Field Rules Reference
Here is an example:
;GroupBegin; Box(Margin(20,20,20,20));;
The image must include a box that will be expanded by the GroupBegin rule’s Box
function around the text, as shown below:
This example expands the box around an image group and sets the margin to 20 FAP
units between the outer edge of the image and the outer edge of the box. There are
2400 FAP units per inch.
Parameter Description
362
GroupBegin
Parameter Description
MinImagesOnNext Defines the minimum number of images required for new and
next page. The default is one (1).
NeverSplit Requires that all images within the group must remain together
on same page—pagination can never occur within the group.
The default is No.
CheckNextPage Requires that the next page be checked to confirm that the
entire group cannot fit on the next page before splitting can
occur. The default is No.
The following example requires that a minimum of two images appear on the current
page, and a minimum of three images appear on any subsequent pages. This example
also requires that the next page be checked to confirm that the entire group cannot fit
on the next page before splitting can occur. In addition, the second image is defined as
the header for the group and is to be copied on overflow. Plus the fourth image is
defined as the footer for this group.
Here’s an excerpt from the DDT file for the first image:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,936,19718,0,0,0,0;
;SetOrigin;Rel+0,Max+100;
;GroupBegin;GroupPagination(MinImagesOnCurrent(2),MinImagesOnNext(3
));
… … …
Here’s an excerpt from the DDT file for the second image:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,1142,19718,0,0,0,0;
;SetOrigin;Rel+0,Max+100;
;SetGroupOptions;header,copyonoverflow;
Here’s an excerpt from the DDT file for the third image:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,357,19699,0,0,0,0;
;SetOrigin;Rel+0,Max+100;
… … … …
Here’s an excerpt from the DDT file for the fourth image:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,621,6124,0,0,0,0;
;SetOrigin;Rel+0,Max+100;
…. … … …
;SetGroupOptions;footer;
;GroupEnd;;
363
Chapter 5
Image and Field Rules Reference
Parameter Description
AddSpacing Adds additional spacing in FAP units between rows of data. There are
2400 FAP units per inch.
MinSpacing Defines the minimum size in FAP units for each row of data.
MinLines Defines the minimum number of lines to be printed on the first page of
an image. When pagination occurs, if the number of lines printed on
the first page is less than the MinLines amount, the entire image is
moved to the second page.
MinLinesCont Defines the minimum number of lines to be printed on the last page of
an image. When pagination occurs, if the number of lines printed on
the last page is less than the MinLinesCont amount, lines are taken
from the preceding page to meet the minimum.
Here is an example:
GroupBegin;List (MinSpacing(800) AddSpacing(200) MinLines(12)
MinLinesCont(5) );;
; GroupBegin;List(AddSpacing(65));;
This example causes 65 FAP units to be inserted between the groups of images.
NOTE: Also keep in mind that you cannot nest a StayTogether with a column to keep
the column section together. If you try to use a StayTogether over all the
images you want to organize into columns, the results will not be what you
expect.
Here is an example:
;GroupBegin;StayTogether;;
This example keeps a group of images together when overflow forces them onto a new
page.
364
GroupBegin
Creating wrapping Use the Wrap parameter to create newspaper style columns where the column
columns contents flow from the top of a column to the bottom and then to the top of the next
column. All columns have the same width and the same amount of space between
them. There are a fixed number of columns on the page.
Creating straight columns Use the Straight parameter to create columns whose contents do not flow from one
column to the next. Instead, these columns are not connected and run parallel to one
another. Straight columns are paginated independently. If the contents of one column
exceed the page, the remaining contents appear in that same column on a second
page. All the usual overflow, header, and footer considerations still apply.
365
Chapter 5
Image and Field Rules Reference
Page 1
Page 2
Column function Here is a list of the parameters you can use with the Column function.
parameters
Parameter Description
Wrap Indicates the text in the columns will wrap. No other parameters are
required. Wrapping is done by default, unless you use the Multiple or
Straight parameter.
Straight Indicates the text will not be wrapped from one column to the next. No
other parameters are required.
The image definition controls the width and separation of the
columns. When you use straight columns, you define the starting
columns with a GroupBegin and the ending column with an GroupEnd.
366
GroupBegin
Parameter Description
ColCount( ) Defines how many columns will be on a page. You must enter a
positive number.
ColSeparation( ) Defines, in FAP units, how much space is between columns. You must
enter a positive number. The default is zero. There are 2400 FAP units
per inch.
ColWidth( ) Defines, in FAP units, the width of each column. If you omit the width,
the system uses the width of the widest image in the group. You
cannot enter a negative number. There are 2400 FAP units per inch.
Single Indicated there will be a single straight column on the page. Single is
the default unless you specify Multiple.
Multiple Indicates there will be multiple straight columns on the page. You
must embed the straight groups within a group. You do this using the
Multiple group parameter.
367
Chapter 5
Image and Field Rules Reference
Example 1: Wrapped Assume you have a long list of narrow images which you want to flow down the page
balanced columns until they reach the bottom of the page. The next image should appear at the top of the
second column on that page.
In addition, you want the images to move over to the right so they do not overlap the
images in the first column and you want to repeat this layout until there are three
columns of images.
The columns should be 6000 FAP units wide, balanced as much as possible, and
separated by 1/4 inch (600 FAP units) gap. Each image is 1800 x 5200 FAP units. Image
margins are 600 FAP units for the top, bottom, left, and right. The text area is 4000 FAP
units in width and can grow and shrink. Up to two hundred characters of data can be
moved into each text area.
Based on this criteria, here is an excerpt from the DDT file for the first image:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;…
;SetOrigin;Rel+0,Max+0
;GroupBegin;Column(Wrap Balanced(Left) ColCount(3) ColWidth(6000)
ColSeparation(600));
…
Here are excerpts from the DDT file for the second image:
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;…
;SetOrigin;Rel+0,Max+0;
;IncOvSym;QAICOL2ASYM,QAICOL2A;
;TextMergeParagraph;;
….
/* The following fields override the lower level definitions for this
image only.*/
<Image Field Rules Override>
;0;1;Column Input Area A;40;200;Column Input Area A; 0;200;;Move_It;
@GETRECSUSED,QAICOL2A,QAICOL2ASYM/
31,MOVEITA;N;N;N;N;650;1020;12110;
368
GroupBegin
Example: 2 - Multiple Assume you have three columns of images which you want to output as straight
straight columns columns. When either of the columns runs into a page footer or off the bottom of the
page, you want the images continued on the next page.
The data in the extract file is contained in three separate groups of continuous overflow
records, which may have up to two hundred characters of information.
/* Excerpt from the DDT file for the second column anchor point. */
<Image Rules>
;SetImageDimensions;98,0,2098,6600,600,600,600,600;
;SetOrigin;VAR1.right+600,VAR1.top+0,,Store(VAR2);;
;GroupBegin;Column(Straight);
/* Excerpt from the DDT file for the third column anchor point. */
<Image Rules>
;SetImageDimensions;98,0,2098,6600,600,600,600,600;
;SetOrigin;VAR2.right+600,VAR2.top+0;;
;GroupBegin;Column(Straight);
369
Chapter 5
Image and Field Rules Reference
/* Excerpt from the DDT file for the first column image*/
<Image Rules>
;SetImageDimensions;98,0,1749,6634,600,600,600,600;
;SetOrigin;Abs+0,Max+0;
;IncOvSym;QAICOL2C11SYM,QAICL2C1;
;TextMergeParagraph;;;
<Image Fields>
/* Excerpt from the DDT file for the second column image */
<Image Rules>
;SetImageDimensions;98,0,1749,6634,600,600,600,600;
;SetOrigin;VAR1.right+600,Max+0;;
;IncOvSym;QAICOL2C21SYM,QAICL2C2;
;TextMergeParagraph;;;
<Image Fields>
/* Excerpt from the DDT file for the third column image */
<Image Rules>
;SetImageDimensions;98,0,1749,6634,600,600,600,600;
;SetOrigin;VAR2.right+600,Max+0;;
;IncOvSym;QAICOL2C31SYM,QAICL2C3;
;TextMergeParagraph;;
<Image Fields>
/* Excerpt from the DDT file for the End of the first column. */
<Image Rules>
;SetImageDimensions;98,0,1749,6634,600,600,600,600;
;SetOrigin;Abs+0,Max+1200;
;GroupEnd;;
/* Excerpt from the DDT file for the End of the second column. */
<Image Rules>
;SetImageDimensions;98,0,1749,6634,600,600,600,600;
370
GroupBegin
;SetOrigin;VAR1.right+600,Max+1200;;
;GroupEnd;;
/* Excerpt from the DDT file for the End of the third column. */
<Image Rules>
;SetImageDimensions;98,0,1749,6634,600,600,600,600;
;SetOrigin;VAR2.right+600,Max+1200;;
;GroupEnd;;;
;GroupEnd;;;
371
Chapter 5
Image and Field Rules Reference
372
GroupEnd
GroupEnd
Use this image level rule (level 3) to define the last image in a group of images. This
rule triggers the formatting of gathered data into image lists, or columns. Vertical
pagination occurs while the system processes this rule.
Syntax GroupEnd( )
There are no parameters for this rule.
This example causes the group of images defined with a GroupBegin rule to be ended
and triggers the formatting for those images.
373
Chapter 5
Image and Field Rules Reference
HardExst
Use this field level rule (level 4) to place a value into a field only if a record is found in
the extract data using the search criteria you specify in the data field. This rule
supports overflow.
Syntax HardExst ( )
For instance, you could use this rule to see if there is a record in an extract file that
corresponds to a field designating whether or not the applicant is a home owner. If the
data exists in the extract record, the rule could then place an X in the Home Owner field.
You can use these format flags:
Flag Description
C Center
R Right justify
The system justifies the data by adding spaces in front of the text. If you are using a
proportional font, do not use these flags to align the data. Use the JustFld rule for that.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 1
Offset *
Length *
File *
Record *
Required *
Rule HardExst
Mask *
374
HardExst
This example puts an X into the destination buffer for the field named CHECK BOX if a
record is found in the extract list using the search criteria of 17,PMSP0200.
Keep in mind that the HardExst rule, when working with overflow, does not return data
in the same order the search criteria appears in the extract file.
For example, suppose you want to return the value X in a variable field called CHECKBX
based on the search criteria:
11,AUTOREC,40,CHECKBX
In the extract file, there are five occurrences of 11,AUTOREC. The first, third, and fifth
occurrence of 11,AUTOREC does not have the value CHECKBX at offset 40 but
the second and fourth occurrences of 11,AUTOREC do have CHECKBX at offset 40.
SCO12345678AUTOREC
SCO12345678AUTOREC CHECKBX
SCO12345678AUTOREC
SCO12345678AUTOREC CHECKBX
SCO12345678AUTOREC
The system does not leave the first, third, and fifth occurrences of the variable field
blank and populate the second and fourth occurrence.
The system finds the two occurrences of 11,AUTOREC,40,CHECKBX, populates the first
two occurrences of the variable field with the value X, and leaves the last three
occurrences of the field blank.
Search masks and Before version 10.1, the HardExst rule did not support overflow. Overflow affects how
overflow the search mask is used. Keep in mind that the rule uses the entire search mask, not
just part of it. In this way, the HardExst rule differs from the PrintIf rule.
For example, if you specify a search mask like
11,DETAILREC,28,Y
it appears that the system checks to see if the record contains a Y in the 28th position.
Instead, this mask really tells the system to find a row with DETAILREC at offset 11 and
with a Y in the 28th position. This may sound like the same thing, but it is not.
Before the rule supported overflow, the answer could only be Yes or No—either you
have such a record in your extract file or you don’t. For example, suppose you have
these rows in an extract file:
HEADERREC0
DETAILREC0Y
And, suppose you specify the HardExst rule without overflow and with this search mask
1,DETAILREC,11,Y
375
Chapter 5
Image and Field Rules Reference
The HardExst rule, even without overflow, will find the record that matches the search
mask. Therefore, the answer is still Yes—you do have a row with DETAILREC at offset 1
and a Y in offset 11.
If you introduce overflow the result does not change. There is still only one record that
has DETAILREC at offset 1 and a Y in offset 11. The first overflow variable will have the
value you assign, while all the rest will not.
Although it may seem like you are searching for DETAILREC and you want to know if
there is a Y in the 11th position, this is not what you are specifying. You are specifying
that a row must have both criteria to match.
That is the difference between the PrintIf rule (which also now supports overflow) and
the HardExst rule. For the PrintIf rule, you would use a less specific search mask of
1,DETAILREC and then use the if part of the rule to determine if the row contains the
value you want. There are two records that match the less specific search mask of
1,DETAILREC. The first does not have a Y in the designated position, but the second
does.
What you have to note is that the HardExst rule, like any other rule, uses the entire
search mask to find matching rows—not just part of the mask. Therefore, only use the
HardExst rule in overflow conditions to determine how many matching rows are
found—rather than to try to find out if a row does or does not match the criteria.
How data is returned The HardExst rule with overflow does not return data in the same order that the search
criteria appears in the extract file. For example, suppose you would like to return the
value X in a variable field named CHECKBX based on this search criteria:
11,AUTOREC,40,CHECKBX
The variable field is set up for overflow.
;0;1;CHECKBX;0;0;CHECKBX;0;0;;hardexst;@GETRECSUSED,OVFSYM1,MYIMAGE
/11,AUTOREC,40,CHECKBX X;;;;
In the extract file, assume there are five occurrences of 11,AUTOREC. The first, third,
and fifth occurrence of 11,AUTOREC does not have CHECKBX in offset 40 but the second
and fourth occurrence of 11,AUTOREC does have CHECKBX at offset 40.
SCO12345678AUTOREC
SCO12345678AUTOREC CHECKBX
SCO12345678AUTOREC
SCO12345678AUTOREC CHECKBX
SCO12345678AUTOREC
The system does not leave the first, third, and fifth occurrences of the variable field
blank and populate the second and fourth occurrence. The system finds the two
occurrences of 11,AUTOREC,40,CHECKBX, populates the first two occurrences of the
variable field with X, and leaves the last three occurrences of the field blank.
376
HardExst
377
Chapter 5
Image and Field Rules Reference
If
Use this field level (level 4) rule to get information from an extract file if certain
conditions are met. In addition, the IF rule lets you call most of the DAL functions. For
more information, see the FieldRule function in the DAL Reference.
When you use this rule in a DDT statement, end every statement with two colons (::).
Instead of writing the statement to the DDT file, you can specify a file name by adding
&filename in the Data field. In the DDT file, it would look like this:
;&filename;
The IF rule supports the FieldRule function to call every field rule in the IF rule. The
FieldRule function requires as many parameters as are required for a field level rule.
Not all fields must contain data, but you must include the correct number of delimiters.
Here is a list of field rule parameters. An asterisk indicates the parameter is generally
required, depending on the rule you are using. If you leave a parameter blank, be sure
to include two colons as delimiters (::) to indicate the parameter is blank.
Parameter Description
Format mask *
X position
378
If
Parameter Description
Y position
Font ID
The IF rule and overflow You can use overflow variables if the field-level rule you used supports overflow.
Generally, the IF rule does not support overflow—it can only be supported through the
use of the FieldRule function. Here is an example. Suppose you want to move multiple
lines of text from N number of specific external extract records to the output buffer
when the HEADERREC record (at offset 11) contains an F in position 1.
For this scenario, you could use the FieldRule function to call the MoveExt rule and use
the standard IF rule to do the rest. The DAL script for this example would look like this:
CON={11,HEADERREC 1,1}:: A=FIELDRULE("::0::1::E::45::4::PREM/OPS
RATE1::0::4::::moveext::@GETRECSUSED,QCPVR5,OVSYM1/
11,CLSSCDREC::N::N::N::N::::::::")::if(CON='F')::return("^" & A &
"^")::end ;N;N;Y;N;12461;2119;16010
Overflow variables used in the search mask have a syntax which looks like this:
@GETRECSUSED,CPDEC1,CPDEC1OVF/11,CLSSCDREC
Writing DAL scripts Keep in mind that writing DAL scripts is like coding rules. You must write the script
using the correct syntax and make sure you correctly handle the variables you use. This
table shows the different types of variables:
Type Description
A String variable. Use quotation marks for comparisons with this variable.
$A Numeric variable with decimal places. Omit the quotation marks and include
only numbers.
#A Numeric variable without decimal places. Omit the quotation marks and include
only numbers.
In an IF condition, the data type of the variable on the left side of the operator
determines the data type used during the comparison. This means the variable/
number/string on the right is converted to the data type of the variable/number/string
on the left. After this conversion occurs, the comparison is performed.
If you encounter this error message:
DM10558: Error in GetFieldRuleData(): Condition exceeds buffer length
379
Chapter 5
Image and Field Rules Reference
NOTE: You can use curly braces { } to tell the system to apply a search mask before
executing the DAL script. Here is an example:
$A = {11,AUTONUREC 25,9}::
The use of curly braces is not part of DAL syntax, but rather is a Documaker
Server notation that is preprocessed before the DAL script is executed.
Please note that you can only use curly braces in this manner if the DAL script
is written into the rule data area. External DAL script files cannot contain such
syntax. To retrieve extract data within an external DAL script file, you have to
use the GETDATA function.
For more detailed information on writing DAL scripts and using DAL functions,
see the DAL Reference.
Examples
Here are some examples which will help you understand how you can use the IF rule.
While the IF rule can be very useful, its use affects performance. For production
purposes, you may want to use other rules and triggers to perform the same tasks.
Image Editor example 1 Suppose you want to print the town and state information on the form only if a record
PRODADREC at offset 11 contains a string of four characters of 0000 starting at position
20. The town and state information is stored in the extract file record PRODADREC
starting at position 65 for 25 characters. You want to trim off any trailing spaces or
characters for the town and state information.
You can define a variable to be used in the IF rule with the following syntax:
{search criteria variable attribute}
The search criteria and the variable attributes are separated by one space. The search
criteria is a series of offset and data pairs. You can have as many pairs as you want to
define, as long as they refer to the same record.
The variable attributes are offset and length for the variable you want to define. The
offset of the variable must be for the same record as the search criteria.
The return statement does not support the DAL function. Therefore, the variable must
be trimmed first, before it can be used in the return statement. For this example, we will
define two variables, A and B:
A={11,PRODADREC 20,4} and B={11,PRODADREC 65,25}
The complete script for the IF rule in the semicolon-delimited field would look like this:
::A={11,PRODADREC 20,4}::B={11,PRODADREC 65,25}::
if(A='0000')::B=TRIM(B)::RETURN("^" & B & "^")::END::
Image Editor example 2 Suppose you want the transaction sent to WIP when the record PRODAREC, at offset 11,
contains a string of four characters (0000) starting at position 20. And, you always want
the system to get 25characters of data from PRODAREC, starting at position 65.
Furthermore, you want the system to remove any trailing spaces.
380
If
For this scenario, you would use the FieldRule DAL function to call the KickToWIP rule
and use the standard IF rule to do the rest. The script for this example would look like
this:
::A={11,PRODAREC 20,4}::B={11,PRODAREC 65,25}:: if(A='0000')::
FIELDRULE("::0::1::TOWN_STATE::55:9:REC-TOWN_STATE::0::25::::
KICKTOWIP::::N::N::Y::N::3001::5602::11010::")::END::B=TRIM(B)::
RETURN("^" & B & "^")::END::
Image Editor example 3 For a record where there SUN at offset 23; if 00308 is found in this record at offset 54
and LIFE at offset 80, then put Indiana into the variable named StateCode, else put
OutOfState into the variable.
The DDT file should look like this:
;0;0;StateCode;;;StateCode;;10;;if;A={23,SUN 54,5}::B={23,SUN
80,4}::if((A='00308') AND
(B='LIFE'))::RETURN("^Indiana^")::ELSE::RETURN("^OutOfS
tate^")::END::;;;;;2128;11592;5;
Image Editor example 4 For a record with SUN at offset 23; if 00308 is found in this record at offset 54, then put
Indiana into the variable named StateCode, else if 00400 is found, then put Georgia
into it, else put OutOfState into it.
The DDT file should look like this:
;0;0;StateCode;;;StateCode;;10;;IF;A={23,SUN
54,5}::IF(A='00308')::RETURN("^Indiana^")::
elseif(A='00400')::RETURN("^Georgia^"):ELSE::RETURN("^OutOfState^")
::END ::;;;;;2128;11592;5;
Image Editor example 5 For a record where there is a SUN at offset 23; if 00308 is found in this record at offset
54 and LIFE at offset 80, then put the data from the offset 63 for 8 bytes in the record
where MOON is found at offset 23 into the variable called StateCode.
The DDT file should look like this:
;0;0;StateCode;;;StateCode;;10;;IF;A={23,SUN 54,5}::B={23,SUN
80,4}::IF((A='00308') AND (B='LIFE'))::RETURN("^{23,MOON
63,8}^")::END::;;;;;2128;11592;5;
Image Editor example 6 This example shows how to specify the occurrence of a record.
In every place where you want to use variable data from the extract file, specify a string
like the one shown here:
{1,MIS257 138,10-5}
In this string, 1,MIS257 is the search mask. If the record is found, the function takes ten
characters starting from position 138. The -5 tells the function to search for the fifth
occurrence of the 1,MIS257 record. If you omit the -5, the function searches for the first
occurrence.
Image Editor example 7 This example shows you how to use the Trim function with the IF rule:
;0;0;TOWN AND STATE;65;25;TOWN AND STATE;0;40;;IF;A={11,PRODADREC
20,4}::B={11,PRODADREC 65,25}::IF(A='0000')::B=TRIM(B)::RETURN("^"
& B & "^")::END::;N;N;N;N;
381
Chapter 5
Image and Field Rules Reference
Note that the Trim function does not work in the Return statement. Also, make sure you
define a variable first, and then trim the variable after the IF statement and before the
Return statement. This is the only way it works.
Image Editor example 8 If you are using the Trim function in an IF rule and you can get either the first or second
portions of the Return statement, but not both, this example may help you understand
how the system works.
For instance, the following statement…
Y={1,MODELDES 94,45}::if((A='ACV') AND B='1'))::Y=TRIM(Y)::return
("{1,VUNITNBR 112,20} + {1,VUNITNBR 81,10}")::elseif((A='APV') AND
(C='1')) or ((A='APA') AND (C='1'))::return("^"&Y&"^ + {1,MODELDES
49,45}")::end;N;N;N;N;2719;9699;16008
• if you have a variable A=ACV and a variable B=1, then trim the data from the
record, where there is VUNITNBR at position 1, for 20 bytes starting at position 112
and the data from the same record for 10 bytes starting at position 81.
• if (variable A=APV and variable B=1) or (variable A=APA and variable C=1), then
trim the data from the record, where there is MODELDES at position 1, for 45 bytes
starting at position 94, and combine this data with the data from the same record
for 45 characters starting at position 49.
The system does not allow (“{offset,data offset,length} + {offset,data offset,length}”)
in one Return statement. You must define the variables first and use the variables in
the Return statement, as shown above.
Image Editor example 9 This example shows you how to format a date from YYYYMMDD to MM/DD format. To
do this, you would need to include the IF rule in your DDT file. The syntax is shown here:
;IF;A={11,POLICYREC 21,8}::B=( sub(date2date( A, "D4"), 1,
5))::return("^" & B & "^")::end::;
382
If
Image Editor example 10 If, in the extract file, you have a date in this format…
YYYYMMDD
NOTE: Format options 1 through 27 provide many format choices you can use, but
these options truncate the year into a two-digit year, such as MM/DD/YY.
No format in the DateFmt rule handles this task, but you can use the IF rule to reformat
the date. Assuming that the date in the EXTRFILE.DAT file is located at offset 77 in a
record with FMMDECREC at offset 11, here is the syntax for the IF rule:
IF;A={11,FMMDECREC 77,8}::B=(sub(date2date(A
,"D4"),1,10))::return("^" & B & "^")::END::;
Image Editor example 11 To format a salutation so you can have the text Dear, a space, and then a variable field
followed by a comma, use this syntax:
If; A={1,Criteria 10,5}::RETURN(“^”&TRIM(A)&”,”&”^”)
Image Editor example 12 This example shows how the IF rule can support overflow by using the FieldRule within
the IF rule. In this case, the FmtNum rule is used to get the locale and Trim is used to
left-justify the text.
NOTE: In this example the locale is the Netherlands, so the text is in Dutch.
Since the FmtNum rule uses double quotes “-ZZZ,ZZZ,ZZZ.ZZ”, the FieldRule must use
single quotes (' ') to avoid parsing errors. Note the semicolons (;) within the FieldRule
are replaced with double colons (::).
Assume the image name is IMGNAME and overflow symbol is OVFSYM:
;0;0;KORTOT-Totaalkorting-Bed;92;10;KORTOT-Totaalkorting-
Bed;0;0;;if;val=fieldrule('::0::0::KORTOT-Totaalkorting-
Bed::92::10::KORTOT-Totaalkorting-Bed::0::0::n,nNLG,"-
ZZZ,ZZZ,ZZZ.ZZ"::fmtnum::@GETRECUSED,IMGNAME,OVFSYM/
18,KORTOT::N::N::N::N::0::0::0')::return("^"&TRIM(val)&"^");N;N;N;N
;0;0;0;
383
Chapter 5
Image and Field Rules Reference
IncOvSym
Use this image level rule (level 3) to increment an overflow variable. The overflow
variable is a counter that tracks of the number of overflow values processed for an
image. This overflow variable is incremented as records are processed and as the
overflow increases.
This rule increments the overflow symbol you specify in the data field. Use the
ResetOvSym rule to reset the variable for the next transaction that might overflow.
Syntax ;IncOvSym;OVERFLOWVAR,IMAGENAME,X;;
Use the X parameter to limit the IncOvSym rule to a single execution and also
determine when the rule is executed. You control the execution of the rule by including
the X parameter, as shown here:
Parameter Description
X (Optional) Here you specify when the system should execute the IncOvSym
rule by choosing one of these options:
F - Tells the system to execute the IncOvSym rule after the first page.
L - Tells the system to execute the IncOvSym rule after the last page.
1-9 - Tells the system to execute the IncOvSym rule after the corresponding
page. For instance, enter 3 to tell the system to execute the rule after the
third page.
Keep in mind you can enter only one option. If you enter more than one
character, the system evaluates the first character and ignores the rest.
If the requesting image is not a multi-page image, the system ignores this parameter.
If you enter a character other than F, L, or 0-9, an error message appears. If you enter
zero (0), nothing happens because there is never a page zero.
NOTE: Be sure to thoroughly test your environment when you use this parameter.
Different results are created depending on the number of pages in the FAP file,
the type of overflow, when pagination occurs, and type of data fields on the
different pages in the FAP file.
This rule increments the overflow variable OVERFLOWVAR by 1 for the form called
IMAGENAME.
384
JustFld
JustFld
Use this field level rule (level 4) to justify (left, right, or center) a variable field by
modifying its field coordinates.
Parameter Description
Mode Enter L (left), R (right), or C (center). If you omit this parameter, this rule
will call the Move_It rule and generate an error message.
You must also include the Cord or Xpos parameter. The other
parameters are optional.
The mode parameters (left, right, and center) tell the system to remove
leading and trailing blanks before it justifies the data. Use the NoClip
parameter if you do not want the system to do this.
Cord Enter the top, bottom, left, and right coordinates to define where the
field appears on the page.
In Studio, you specify a field’s coordinates on the Field Properties
window.
In Image Editor, you use the General tab of the Properties window. The
coordinates are specified as shown here:
• The top coordinate is specified in the Y field. The bottom coordinate
is the entry in the Y field, plus the entry in the Height field.
• The left coordinate is specified in the X field. The right coordinate is
the entry in the X field, plus the entry in the Width field.
In the DDT file, each coordinate must be in FAP units (2400 per inch) and
separated by commas. Here is an example:
CORD=113,441,5714,9314
XPos Enter the X coordinate used to align the field. If Mode=R this will be the
right most position of the field, likewise if Mode=C this will be the center
of the field. Here is an example:
MODE=R,XPOS=5000
If the data is 12345, character 5 will be at position 5000.
Achr Enter a string of characters found in the data and used to align the field.
When you use this parameter, you must define the XPos parameter,
otherwise the system ignores the Achr parameter. With the correct
setup, the rule aligns the field so the characters you specify in this
parameter overlay the XPos. You can include up to 10 characters in the
string. Here is an example:
MODE=R, XPOS=5000, ACHR=.
If the data is 123.45, the decimal will be at position 5000.
385
Chapter 5
Image and Field Rules Reference
Parameter Description
Rota Specifies the field rotation. Enter 0,90,180, or 270. For example:
ROTA=270
This tells the system to rotate the field 270 degrees.
NoClip Tells the system not to remove trailing spaces from the field.
Rule Enter the name of the rule you want to use to load the data from the
extract file. If you omit this parameter, the system uses the Move_It rule.
You can choose from any of the date function rules, such as FmtDate,
FfSysDte, MoveSum, ConCat, TblLkUp, SAPMove_It, MoveExt, FmtNum,
TblText, Mk_Hard, StrngFmt, and so on.
For instance, enter MoveNum to have the JustFld rule call the MoveNum
rule. This lets you use the formatting capabilities of the MoveNum rule.
Here is an example:
MODE=R,XPOS=5000,RULE=MoveNum,FONT=11010
Errors If the call to the rule fails, this rule returns an error. If you omit the Mode parameter,
this rule calls the Move_It rule and generates an error. The Mode parameter separates
the portion of the data parameter passed to the specified rule.
Using the LoadCordFAP Use of the LoadCordFAP option also affects the JustFld rule. The following table shows
option how this INI option affects this rule:
Yes The system gets the coordinates (Cord), font (Font), and rotation (Rota) from
the FAP file.
No You must define the coordinates, font, and rotation using the Cord, Font, and
Rota parameters. Otherwise the field will not be positioned properly.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 0
386
JustFld
Length 15
Offset 21
Length 15
File *
Record *
Required *
Rule JustFld
Data 11,JUSTRIGHTA,MODE=R,CORD=12800,13288,5000,10760,FONT
=11016,ROTA=0,CLIP,XPOS=5000,ACHR=.
This example shows all possible parameters, as they would appear in the DDT file.
Here are some other examples of how to use the JustFld rule:
This example shows how the DDT file would look if you enter a mask and data value for
the MoveNum rule:
'12.2,12.2,M,S,R,Z,SLZ,T'
'43,Gval NegText("" R"),mode=L,FONT=16116, ROTA=0, Rule=MoveNum'.
;0;0;k1;53;12;k1;0;15;12.2,12.2,M,S,R,Z,SLZ,T;JustFld;43,Gval
NegText("" CR"), mode=L,FONT=16116,ROTA=0,RULE=MoveNum;
N;N;N;N;4999;2500;16116;
NOTE: The data value for the MoveNum rule must follow the search mask for the
JustFld rule. Include a space to separate the parameters.
Here is an example of how you would use a DDT line to map a field using the Move_It
rule:
;0;0;FIELD;30;10;FIELD;0;10;;move_it;11,TVBR2DREC,25,1;N;N;N;N;1977
;3763;11006;
If the then decided to right-justify the data using the JustFld rule. Simply change the
DDT line as shown here:
;0;0;FIELD;30;10;FIELD;0;10;;JustFld;11,TVBR2DREC,25,1,MODE=R,XPOS=
5000;N;N;N;N;1977;3763;11006;
387
Chapter 5
Image and Field Rules Reference
Notice that most of the line did not change. You simply changed the rule name from
Move_It to JustFld and appended the JustFld parameters, starting with the Mode
parameter. In this example, the Rule parameter was omitted because the default rule
used by JustFld is Move_It.
Now assume you are using the DDT line to map a numeric field using the MoveNum
rule:
;0;1;PRM;25;9;PRM;0;;12;9.2,12.2,C;movenum;11,AREC;N;N;N;N;13082;34
72;12012;
If you decide that you want the result of this to be right-justified, you could change the
line as shown here:
;0;1;PRM;25;9;PRM;0;;12;9.2,12.2,C;JustFld;11,AREC,MODE=R,RULE=Move
Num,XPOS=14500;N;N;N;N;13082;3472;12012;
Again notice that most of the line did not change. You simply changed the rule from
MoveNum to JustFld and then included the Rule=MoveNum parameter after the
Mode=R parameter.
If you want the number to be decimal-aligned over the X position instead of right-
justified, include the ACHR parameter.
Here is an example of using a rule other than the Move_It and MoveNum rules:
;1;0;TBL;0;48;TBL;0;48;;TblLkUp;11,HDRREC 53,1 1,CLCODE,12
20,11;N;N;N;N;7831;24236;12012;
Although the TblLkUp rule has more information in the rule parameter area than the
typical Move_It or MoveNum rule might have, the same approach is used to convert to
using the JustFld rule:
;1;0;TBL;0;48;TBL;0;48;;JustFld;11,HDRREC 53,1 1,CLCODE,12
20,11,Mode=R,Rule=TblLkUp,XPOS=11000 ;N;N;N;N;7831;24236;12012;
The JustFLd parameters are appended to the end of the existing rule parameters,
starting with Mode. Then the Rule parameter names the original rule (TblLkUp) and the
other JustFld rule parameters further control the resulting output.
This example demonstrates how to use the JustFld rule in an overflow situation using
the @GetRecsUsed function.
<Image Rules>
...
;IncOvSym;JOVF,QAIJUST1;
...
...
<Image Field Rules Override>
;0;1;qaij1;53;15;qaij1;0;15;;JustFld;@GETRECSUSED,QAIJUST1,JOVF/
43,JUSTRIGHT,MODE=R,FONT=16116,ROTA=0,CLIP,XPOS=5000,ACHR=.;N;N;N;N
;724;727;16114;
388
JustFld
389
Chapter 5
Image and Field Rules Reference
KickToWip
Use this field level rule (level 4) to force a transaction to manual batch (WIP). You can
use the KickToWIP rule for situations when data is not available in the extract file or the
data changes, requiring entry by a data entry operator. This rule makes those fields
available for entry.
Syntax KickToWip( )
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length *
Offset *
Length *
File *
Record *
Required Operator
Rule KickToWip
Mask *
Data *
The KickToWip rule tells the system to set the manual batch flag to true. Also, to edit
the field associated with the KickToWip rule in the Entry module of Documaker, you
must set the Required field to Operator.
In this example, the operator required flag for the field INSNAMEREC-INSNAME1 must
be set if this field is to be editable in the entry system when retrieved from manual
batch.
390
KickToWip
Option Description
391
Chapter 5
Image and Field Rules Reference
LookUp
Use this field level rule (level 4) to take data from an extract record. Next, use the data
as a key name to look up the key data in a table. Then, copy the table data to the
destination field. You must specify the offset of the key name in the data field, as well
as the offset and length of the key data in the data field. This rule uses the same table
as the MovTbl rule.
Syntax LookUp( )
You can use one or more files to keep the tables used by this rule. You must list each
table (file) in the TABLEFILE.DAT file. The table list file must be in the following format:
TABLEFILENAME1.EXT <crlf>
TABLEFILENAME2.EXT <crlf>
where each table is listed on a single line followed by a carriage return/line feed.
The format of the tables is key name followed by key data. The key need not be a
specific length. The data can also be any length, which allows a single table or group
of table files to contain table entries of varying lengths.
You specify the table list file using the TblFile option under the Data control group in
the FSISYS.INI file.
For example, suppose a form contains the names and numbers of agents for calling
purposes, but these names and numbers change on a regular basis. For this situation
you could create a text table called AGENTS.TBL which contains entries such as...
AGENT001 JOE MILLER <crlf>
and another table, called AGENTPHO.TBL, with phone number entries such as...
AGENT001PHONE404 111-2222 <crlf>
You could then make these tables available to Documaker Server by including them in
the files specified in the Data control group of the FSISYS.INI file, as shown here:
< Data >
TblFile=.\deflib\TblFile.Dat
You must load the tables into memory before the system can use them. To do this,
include these rules in the AFGJOB.JDT file:
;CreateGlbVar;1;TblLstH,PVOID;
;LoadTblFiles;1;;
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 80
392
LookUp
Offset 100
Length 5
File *
Record 2
Required *
Rule LookUp
Mask *
This example searches for the second extract record matching the search criteria of
17,PMSP0200. It then takes the five characters at offset 100 in the extract record and
uses them as a key name into the table data.
The table data is searched for a match with the five characters from the extract record
starting at offset 1, the first character of each table entry. If a match is found, the key
data of 80 characters starting at offset 14 are copied into the destination field.
393
Chapter 5
Image and Field Rules Reference
MapFromImportData
Use this field level (level 4) rule to map imported data from an internal dictionary to a
field, as opposed to mapping from an extract file. Normally, you use this rule with
either the ImportFile or ImportExtract rules, however, you can use this rule with any
preceding rule that fills in field dictionary values.
By default, this rule checks for a dictionary value starting with the image dictionary,
then the form dictionary, and finally the form set (global) dictionary. The search ends
as soon as the rule finds a value for the field.
If no dictionary entry is found for the field, the field remains blank. Use the Required
flags in the rule definition to control whether an empty field is considered an error.
NOTE: For some legacy implementations, this rule was registered under the name
NoOpImp.
If you do not use this rule, you must use the ReplaceNoOpFunc rule and make sure that
all of the fields for each DDT file are set to NoOpFunc.
Syntax MapFromImportData( )
You can use the optional INDEX parameter to specify a particular dictionary instance of
the field to use. This is only useful if you use the ImportFile or ImportExtract rules to
import form set data.
For the ImportFile rule, to support field instances you must include this INI option:
< ImportFile >
IndexDuplicateFields = Yes
For the ImportExtract rule, to support field instances you must include this INI option:
< ImportExtract >
IndexDuplicateFields = Yes
Normally, duplicate field entries found in the import file are ignored. If, however, you
enter Yes, each instance is stored in a separate dictionary entry.
NOTE: Field instance (indexing) only applies to field data stored in the form set
(global) dictionary.
Where option is a keyword that indicates how to calculate the dictionary instance to
use or a constant value to use as the index.
394
MapFromImportData
Keyword Description
FORM Use the occurrence of this form as the instance index. For example, if this
field is contained on the second copy of this form, then get the second
instance of field data.
IMG Use the occurrence of this image within the current form as the instance
index. For example, if this field is contained on the third copy of image on
the current form, then get the third instance of field data.
IMGFSET Use the occurrence of this image within the entire form set as the instance
index. For example, if this is the fifth occurrence of this image within the
form set (without considering what forms contain the other copies of this
image), then get the fifth instance of field data.
FLD Use the occurrence of this field within the current form as the instance
index. For example, if this field is the third occurrence within the same
form, then get the third instance of field data.
FLDFSET Use the occurrence of this field within the entire form set as the instance
index. For example, if this is the tenth occurrence of this field within the
entire form set (without considering what forms and images contain the
other copies of this field), then get the tenth instance of field data.
A successful return does not indicate whether the field was assigned a value.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 0
Length 8
Offset 0
Length 8
File *
Record *
Required flags *
Rule MapFromImportData
Mask *
395
Chapter 5
Image and Field Rules Reference
The above example would try to map the field by querying the image dictionary first;
then the form dictionary, and finally the global dictionary.
Suppose you had this line in the DDT file:
;0;0;ISSUE;0;0;ISSUE;0;8;;noopimp;INDEX(IMG);N;N;N;N;1167;652;1201;
This example would use the occurrence number of this image on the form to index the
global dictionary for this field.
396
Master
Master
Use this field level rule (level 4) to tell the system the field has been mapped in the
MASTER.DDT (data definition table) file. Use this rule when you have variable fields
which are used on multiple images.
Instead of mapping these identical variable fields, like Name and Address, each time
they are used, you can map them once in the MASTER.DDT file and then map the
individual fields to the Master rule. This tells the system to look in the MASTER.DDT file
for the complete mapping information for those variable fields.
Syntax Master( )
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length *
Offset *
Length *
File *
Record *
Required *
Rule Master
Mask *
Data *
397
Chapter 5
Image and Field Rules Reference
MessageFromExtr
Use this field level rule (level 4) to retrieve a message from an extract file and place the
message into a field on the form. Default formatting information comes from the
definition of the field which you set up using Studio or Image Editor. Specific formatting
information is embedded within the message using tags. This rule can also contain
variable blocks of text.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset The offset within a record where the key can be found
Source name *
Offset *
Length *
File *
Record *
Required *
Rule MessageFromExtr
For this rule, the main components are the message, the message tags, the Record
Definition Dictionary, and the INI options. These components are discussed in the
following topics.
398
MessageFromExtr
Creating Messages
The message is the text retrieved from the extract file. This text can contain message
tags which control how the text is formatted. The tags control the justification, spacing,
font, variable insertion and other functions. All formatting information is contained in
the tags, which serve as a mark-up language. The message itself is straight text. The
message is a single line or record with a maximum length of 2000 bytes.
Setting up the field You attach this rule to a field in the image’s DDT file. You can do this by editing the DDT
file in a text editor or by using Image Editor. In the image (FAP file), you define the field
to which the message is attached as a multi-line text field.
If you also select the Can Grow option for the field, the system combines all messages
with the same group code in this field, letting the field grow to accommodate the entire
message. If you do not select the Can Grow option, the system only includes the
messages that fit within the defined area for the field. Messages that would not fit are
ignored.
Adding messages The system adds messages in the order they appear in the extract file or database. It
tests every message to see if the message fits in the available space. All the messages
of a group must fit in the available space or none of the messages appear.
Grouping messages You can group and format messages as a single message by including a group code.
You define grouping codes in the Record Dictionary. For more information about the
Record Dictionary, see Using the Record Dictionary on page 511. All the messages in a
group are treated as a single message. Group codes cannot be blank. All messages
comprising a group must be located together in the extract list.
Formatting messages The formatting information you select for the field serves as the default formatting
information for all messages, so make sure you set up the field in the image (FAP file)
to use the default font you want for all messages.
Message tags override the default formatting you set up for the field and let you control
the appearance of the message text. You can add tags to the text of the message to
describe and control the justification, spacing, fonts and other formatting information.
The tags affect all text which follows the tag. You can also use message tags to insert
variable data fields.
NOTE: Place the variable (VAR) tag within the text where you want the system to
insert the variable.
Tags are enclosed within brackets (< >). The text between the brackets describes the
formatting action or the reference to the variable name referenced in the Record
Dictionary. The tag itself does not appear in the formatted text.
399
Chapter 5
Image and Field Rules Reference
Tag Description
<Justify:value> You can enter Left, Right, or Center to have the system left, right, or
center-justify the text. If you omit the value, the system uses the
previously defined justification. You can abbreviated tags if the line
size is limited.
For example, <J:L> or <Justify:L> provides left justification and
<J:C> or <Justify:C> provides center justification.
Note: If the justification tag is in the message—not the first entry on
the line—then you must insert the carriage return tag before the
justification tag. For example, this message places the word, age, to
the right of the second line:
<CR><Justify:Right>Age
<Font:value> You can enter any valid font ID (00000-99999) or Default. The value
is a numeric reference to the font cross reference file (FXR) font ID.
If the value is left blank, the system uses the previously defined font
ID.
For example, <Font:16210> changes the text to the font identified
with font ID 16210 in the FXR file while <Font> changes the font back
to the default font as font defined in the FAP file.
You cannot abbreviate this tag.
<Spacing:value> You can enter Single, Double, or a numeric value in FAP units (2400
per inch in place of value). Single indicates the following text should
be single-spaced. Double indicates the following text should be
double-spaced. A numeric value tells the system the number of FAP
units to use for spacing. If you omit the value, the system returns to
the previously defined spacing.
You cannot abbreviate this tag.
The spacing option you choose applies to the entire message
grouping. You cannot change spacing within a grouping (a single
message).
For example, <Spacing:Double> tells the system to double space
the message lines within the message or message group while
<Spacing> returns the spacing to the default format.
Note: If you change spacing in the text of a message—not the first
items in the message—you must insert a carriage return tag before
the spacing tag. For example, this changes spacing to double lines:
<CR><Spacing:Double>
400
MessageFromExtr
Tag Description
<Tab> Use the Tab tag to have the system indent the text from the left
margin by a specified number of FAP units. You can abbreviate the
tag to <T> if the line size is limited.
You can justify the text relative to the tabbed position by specifying
Left, Center, or Right. You can abbreviate the tags by using the first
character (L, C, or R) if the line size is limited. The default is to left
justify the text.
You can also use different types of fill (leader) characters if the text
does not fill the entire space. You can use these leader characters:
no leader (spaces), dashes (---), periods (…), or underlines (___).
Except for no leader, you can abbreviate the tags using the first
character if the line size is limited. For no leader, you must use the
word nolead for spaces. Spaces are the default fill characters.
<CR> This tag tells the system to insert a hard return (carriage return), or
forced line break. For example, Residential <CR> rate will look like
this:
Residential
rate
You cannot abbreviate this tag.
01 2 3 4 65 7 8
Tabbing in 4 inches with no leader.
-----------------Tabbing in 4 inches with dashes.
……………………………………………Tabbing in 4 inches with periods.
_________________Tabbing in 4 inches with underline.
0 1 2 3 4 5 6 7 8
----------------4" dashes & text centered.
.…………………………………….4" periods & text right.
Example
This is a sample message.
Name Age
401
Chapter 5
Image and Field Rules Reference
Parameter Description
Record Name The name the record will use in the future. A record name begins with
an alpha character and can have a maximum of 30 characters. You can
have only one description for a given record name. Record names are
not case sensitive—you cannot define both BASE and Base.
Search Keyword
402
MessageFromExtr
Parameter Description
Variable The name future references to this variable will use. A variable name
begins with an alpha character and can have a maximum of thirty (30)
characters.
Record(name) (Optional) Identifies the record in which this variable will be found. This
parameter is mutually exclusive when using GVM.
GVM(name) (Optional) The name of the global variable to use. This parameter is
mutually exclusive when using Record. Also keep in mind a rule is not
necessary with the global variable.
Offset The offset into the record where the data is located.
Format(flags) (Optional) Similar to the flags used with the MoveNum rule except the
input flags (such as input length and precision, S, and B) are not
needed.
Rule(name) (Optional) You can include any field rule such as DateFmt or SetAddr2.
The Move_It and MoveNum rules are inherent to the Record Dictionary,
so you do not need to call them. If you omit a rule, the Move_It rule
functionality is the default.
* OMR
RCBBATCH = GVM(RCBBatchName)Length(32)Type(Char)
403
Chapter 5
Image and Field Rules Reference
INI options This INI option is required. Place the Record Dictionary file in your DEFLIB directory.
< DataDictionary >
Name = (file name of the Record Dictionary)
404
MessageFromExtr
405
Chapter 5
Image and Field Rules Reference
Mk_Hard
Use this field level rule (level 4) to insert or hard code a value into a variable field. For
instance, you can use this rule to place an X in a check box or to insert the text Same as
above in a field on a form.
Syntax Mk_Hard( )
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 1
Offset *
Length *
File *
Record *
Required *
Rule Mk_Hard
Mask *
Data X
This example puts an uppercase X into the destination buffer for the field named
CHECK BOX. This field has a destination length of one character, and begins at offset 1
by default (since none was specified).
NOTE: Source offset and length have no significance to this rule since the source text
is coming from the Data field in the mapping.
406
Mk_Hard
407
Chapter 5
Image and Field Rules Reference
MNumExt
Use this field level rule (level 4) to perform the function of the MoveNum rule if an
external record is found. Enter the external record search criteria after the MoveNum
search criteria in the Data field. You can also enter a calculation after the external
search criteria. This rule supports overflow.
The format mask must contain the input numeric format, followed by the output
numeric format. These formats are in the form of X.Y, where X is the size of the number,
including any commas, currency symbols, and decimal points, and Y represents the
number of digits after the decimal point, such as:
10.2,12.2
The first pairing of X.Y describes the input. The second pairing describes the output. In
this example, 10.2 is the description of the data in the extract record and the output for
this would be 12 digits before and two digits after the decimal.
The format mask can contain any of these formats after the output numeric format:
Format Description
C Add commas
NOTE: You cannot use the dollar sign ($) as the first character in the format mask
because this conflicts with the use of this character in the Move_It rule.
The data may contain a calculation to be performed upon the number obtained from the
extract record. The calculation must be separated from the search criteria by a space,
enclosed in parentheses, and contain spaces to separate each element (including
parentheses) in the equation string.
An X in the calculation is replaced by the value moved from the extract file. You must
place parentheses around each operator and its accompanying operands.
NOTE: This rule does not support an OR condition in the search mask. You can,
however, run multiple searches.
408
MNumExt
Image Editor example 1 If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 18
Offset 64
Length 6
File *
Record *
Required *
Rule MNumExt
The move occurs only if the record defined by the external search criteria is found. If
not found, zero is used in place of X.
If the external extract record matching the search format 17,PMSP0200 and 99,0 is
found, the current record defined by the search format 17,PMSPAR01 is searched to get
the numeric data from offset 64 for length 6.
The six-character BCD value located at offset 64 is then multiplied by 50. The system
adds 2.50, as specified by the operation ( ( X * 50 ) + 2.50 ), before copying the result
to the destination field. The destination field can contain up to 11 characters, including
the decimal point and two characters after.
409
Chapter 5
Image and Field Rules Reference
Image Editor example 2 This example shows the use of a user function and overflow symbol. If you make the
following entries on the Edit DDT tab of the field’s Properties window in Image Editor:
Offset *
Length 12
Offset 87
Length 6
File *
Record 1
Required *
Rule MNumExt
Mask 11.0,7.2,$,L
Data @GETRECSUSED,FORMABC,OVSYM/17,PMSPAR01
17,PMSP0200,99,0 ( ( X * 50 ) + 2.5 )
410
Move_It
Move_It
Use this field level rule (level 4) to move text from an extract record to the output buffer.
This rule supports overflow.
The format mask can contain these options:
Format Description
F Converts to sentence style where the first character is capitalized and the
remaining characters are lowercased.
G If you include this flag, the system always returns the data at the source length
and ignores the destination length.
If you omit the G flag, the Move_It rule returns data truncated to either the
source or destination length, whichever is shorter.
For instance, if you use the Move_It rule with a source length of 20 and a
destination length of 19, including the G flag returns 20 characters. Omitting
the G flag returns 19 characters.
If you include the ChkDestLenExceeded option in the RunMode control group
and set the option to Yes, the system reports any occurrence where the
destination length is less than the source length.
N Searches for the next record in the transaction list instead of starting with the
first record. For example, assume the current transaction has five records (A,
B, C, D, and E) and the last record processed is C. If the next rule is Move_It and
it has the N flag set, the D record will be searched instead of starting at the top
(record A). When you include the Move_It rule and you are using overflow
(@UserFuncName options) do not use the N flag.
SR Same record flag. This flag is similar to the N (next record) flag except it
assumes the data is in the record returned by the previous Move_it rule.
Note that SR only applies to the prior execution of a Move_It rule. You must
have at least one Move_It rule without the SR flag before you can add a
Move_It rule which uses this flag.
$ A string proceeded by a dollar sign ($) is used as a sprintf format for the output
data.
411
Chapter 5
Image and Field Rules Reference
Format Description
8 Indicates the extract data for this field is stored in UTF-8 format. UTF-8
(Unicode Transformation Format, 8-bit encoding form) is a format for writing
Unicode data in text files. See Using Unicode Support for more information.
NOTE: Before version 10.0, this rule did not permit multiple flags. Beginning with
version 10.0, flags are executed in sequence, thus the particular order may
cause a difference in the formatted string output. When you use multiple
format mask flags, use a comma as a separator.
For example, if a K flag occurs first, the system clips the heading and tailing spaces and
then formats the string. If a K flag occurs second in the format string, the system
formats the string and then clips the heading and trailing spaces.
You can do some interesting things by handling the flags in sequence, you can clip (K)
the input data, format ($) the string, right justify (R) the result, and format ($) it again.
On the other hand, you can do some things that don't make sense, like center justify
(C) the data and then clip (K) the result. This sequence negates the center justification.
The same applies to right (R) and left justification (L) if you put a K in the format
afterwards.
Furthermore, what order would you expect R, C, and L applied especially when mixed
with the format ($)? Just like the clip flag (K), if you right justify (R) first and then format
($), you will likely get different results than if you format ($) first and then right justify
(R).
NOTE: If you apply this rule to a multi-line variable field, make sure destination length
is greater than one (1). Otherwise, no data will be mapped. This happens
because when you create a multi-line variable field, its length is zero (0) and
its destination length in the DDT file is also set to zero. While some rules, such
as the Mk_Hard rule, map data even if the destination length is zero, the
Move_It rule will not.
Handling currency Let’s assume you have variable fields that represent amounts. The extract data is pre-
symbols formatted as character text (left justified), which represents the correct currency
format. Unfortunately, the extract data does not include the currency symbol. You have
to add the currency symbol.
Depending on the nationality, the currency symbol can appear at the beginning of the
amount, like the dollar sign, or it can appear at the end of the amount, such as FF for
French Francs.
Beginning with version 10.0, you can use a format of K,$%sFF to add the currency
symbol.
412
Move_It
The K would come first to indicate the space before and after the input data should be
removed, then FF would be appended.
So K,$%sFF is not the same as $%sFF,K. The former clips the input data before the
format is applied. The latter clips the data after the format has been applied.
For currency symbols that appear at the beginning of the data, such as British pound
sterling, you could use the Move_It rule with a format mask of $£%s. This works
because trailing spaces are trimmed. For currency symbols at the end of the data, this
will not work.
User functions The Move_It rule supports the use of @UserFuncName functions. User functions let you
move data from the source record to the output buffer based on the outcome of a user-
defined function. User functions and their parameters are specified in the data field
before the search criteria.
413
Chapter 5
Image and Field Rules Reference
Image Editor example In this example, the user function name is GetRecsUsed and has two parameters. FORM
NAME and VAR; / denote the end of the parameter list and the start of the search
criteria.
;Move_It;@GETRECSUSED,FORM NAME,VAR/17,00,15,B;;;;;
If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1**
Length 10
Offset 50
Length 10
File *
Record * (generally not required unless you are also using overflow)
Required *
Rule Move_It
Mask *
Data 17,PMSP0200
This rule gets the first occurrence of a record matching the search criteria of PMSP0200
at offset 17. From the extract record, ten characters from offset 50 are moved to the
output buffer (which also happens to be 10 characters in length).
414
Move_It
This example shows the use of a user function and overflow symbol:
Offset 1
Length 10
Offset 50
Length 10
File *
Required *
Rule Move_It
Mask *
Data @GETRECSUSED,FORMABC,OVSYM/17,PMSP0200
415
Chapter 5
Image and Field Rules Reference
MoveExt
Use this field level rule (level 4) to move text from a specific external extract record to
the output buffer if a specific external record is found. This rule calls the Move_It rule
if the specified extract record is found. This rule supports overflow.
A string in the format mask that is preceded by a dollar sign ($) is used as a sprintf
format for output data. You cannot use this feature with a format mask ID.
User functions let data move from the source record to the output buffer based on the
outcome of a user-defined function. User functions and their parameters are specified
in the data field before the search criteria, and follow the syntax described below.
In this example the user function name is GetRecsUsed. It has two parameters FORM
NAME, and VAR. The slash (/) denotes the end of the parameter list and the start of the
search criteria.
;MoveExt;@GETRECSUSED,FORM NAME,VAR/17,00,15,B;;;;;
Image Editor examples If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 10
Offset 50
Length 10
File *
Record *
Required *
Rule MoveExt
Mask *
416
MoveExt
The move only occurs if the record defined by the external search criteria is found. If
the extract record matching the search format 17,IPMSR01,99,T1 is found, the record
defined by the search format 17,PMSP0200 is searched to get the text from offset 50
for the length of 10 characters.
This example shows the use of a user function and overflow symbol:
Offset 1
Length 10
Offset 50
Length 10
File *
Record 1
Required *
Rule MoveExt
Mask *
Data @GETRECSUSED,FORMABC,OVSYM/17,PMSP0200
17,IPMSR01,99,T1
417
Chapter 5
Image and Field Rules Reference
MoveMeToPage
Use this image level rule (level 3) to move the entire page the image resides on to a
designated page.
Syntax ;MoveMeToPage;;PageNumber;
Parameter Description
PageNumber Page number to which the images will be moved. To move images to the
last page, enter zero (0).
If you use the rule, you must have the following set in the AFGJOB.JDT:
;ProcessQueue;;PaginationQueue;
This rule only works with forms that have multiple pages.
This example moves the image to the last page of the form set.
418
MoveNum
MoveNum
Use this field level rule (level 4) to move numeric data from an extract record to the
output field and, if necessary, reformat the data. This rule supports overflow.
NOTE: The numeric data this rule handles is limited to 15 significant digits. This is a
total of all the digits, both to the right and left of the decimal. Here are some
examples:
999,999,999,999,999.
.999,999,999,999,999
999,999,999.999,999
The system tries to honor almost any format you supply, but when a
conversion has to occur, it can only guarantee 15 significant digits in the result.
The first part of the format mask must contain the input numeric format (X.Y) followed
by the output numeric format (X.Y), where X is the size of the number, including any
commas, currency symbols, and decimal places, and Y is the number of digits after the
decimal. For example, a simple format mask can look like this:
10.2,15.2
This tells the system the input string consists of ten characters and the last two
characters are decimals, such as 1234567890. The output string should consist of 15
characters, including two decimals.
To format the output, you can also include any of the following format options after the
output numeric format (separate each option with a comma).
Format mask
Mask Description
- (one dash) If the number is negative, this option places a minus sign (-) in
the left most position. For example, if the format mask is (9.2,12.2,C,$,-),
the result is: “- $2,100.00”.
-- (two dashes) If the number is negative, this option places a minus sign (-)
immediately before the amount. For example, if the format is
(9.2,12.2,C,$,--), the result is “ -$2,100.00”, with a full length of 12.
$ Adds a dollar sign. The dollar sign cannot be the first character in the
format mask. This limitation arises from the Move_It format option, where
a dollar sign ($) in the first character of the mask means to perform a
sprintf.
419
Chapter 5
Image and Field Rules Reference
Mask Description
A Removes the trailing spaces after an extract value if the input data type is
neither BCD nor Packed Decimal. For example, assume the data value is
“100000 “ (a one followed by five zeros and two spaces).
If you omit this flag and select a 12.2 output format with commas, the
value generated will be “ 100,000.00”. If you include this flag, the result
will be “ 1,000.00”.
BA Translates a BCD number into a decimal. Use this flag for ASCII signed
numbers.
C** Adds commas if the data is in US English format or spaces if the date is in
Canadian French format.
E Stops a calculation if the search condition is false. The Move_It rule may
return a null output buffer if: no record was found; a record was found, but
the search mask contained a pairing (offset,data) which extended past the
end of the record; or a record was found, but the mapped data was blank.
F Add a dollar sign ($) and place it in the first position. If the value is
negative, move the minus sign (-) to the last position.
G Tells the MoveNum rule not to use the Move_It rule to get the data from
the extract file. See Extracting data on page 426 for more information.
-L (or --) Tells the system to use a floating negative sign on negative values.
+L (or Tells the system to use a floating sign and to always show that sign.
++)
Lang Selects a language for spelling out the number. This flag is used with the
V flag and mask parameters. Here is an example: US, CFR.
420
MoveNum
Mask Description
-O Places a negative sign outside the right side of the field definition. This
allows positive and negative numbers to right align on the page if you use
a fixed font. Here is an example using this input format: 10.2,10.2,-O:
input data: 0000009.99
-000012.25
output: 12345678901234567890
**********
9.99
12.25-
On Sets the output field size to n and overrides the output size of the field.
Here is an example using this input format: 10.2,10.2,O8:
input data: 0000009.99
-000012.25
output: 12345678901234567890
**********
9.99
-12.25
P Print leading zeros. You cannot use this format with $, -, C, and F.
Pn Pads the output zeroes to n total width. This parameter only works with
whole numbers, not decimals. Here is an example using this input format:
10.0,10.0,P4:
input data: 0000000001
0000000025
0000012345
output: 12345678901234567890
**********
0001
0025
12345
P** Prints leading zeros if used without character or symbol enclosed with
single quote.
R Tells the system to retain the minus sign (-) if the result is less than zero.
Use with signed numbers.
421
Chapter 5
Image and Field Rules Reference
Mask Description
-R Places a negative sign on the right side of the field (within the field). Here
is an example using this input format: 10.2,10.2,-R:
input data: 0000009.99
-000012.25
output: 12345678901234567890
**********
9.99
12.25-
R** Retains the sign when translating a signed data value into decimal. Use
with the S flag.
T Adds text before or after a number. Use the less than (<) symbol for
inserting before, the greater than (>) symbol for inserting after. Use the
comma as a separator.
Use with the NegText, Text, and ZeroText data options.
You can also use this option to place currency symbols before or after
amounts. For instance, T>£ places the British pound sterling symbol
(ALT+0163) before an amount.
TA Same as T>
TB Same as T<
SP Same as E
For example…
…tells the system to take a ten-character input string with two decimals (10.2) and
output it as a 15-character string with two decimals (15.2), commas (C), a dollar sign
($), and left-justified (L).
This rule respects the number of decimals in the source. For instance, if you have the
number “ 1.2" defined as using a mask of 6.2, the system outputs 1.20 instead of 0.12.
422
MoveNum
Understanding the System The MoveNum and AccumulateVariableTotal rules support three checksum methods.
These methods only work on the integer portion of a number. The system ignores the
decimal portion of the number.
CS1 works from right to left. CS2 works from left to right. These two algorithms are
exactly the same except for the direction in which they work. The calculation works like
this:
The odd number digits are multiplied by 2. If that result is greater than 9, then 9 is
subtracted from the value. The result is added to the sum. The even number digits
are simply added to the sum.
Once all the digits values have been summed, the total is divided by 10. The
remainder of this division is subtracted from 10 and that becomes the check-digit.
If the resulting value is 10, then zero (0) will be the check-digit.
Here are some examples. In all cases, assume the value is 346,100.99.
The CS1 calculation works like this: (notice the digits are addressed backwards)
(0 x 2) + 0 + (1 x 2) + 6 + (4 x 2) + 3
0 + 0 + 2 + 6 + 8 + 3 = 19
( 19 mod 10) = 9
10 - 9 = 1
Data The data can contain a calculation to be performed on the number in the extract record.
Separate the calculation from the search criteria with a space, enclosed in
parentheses. Use spaces to separate each element (including parentheses) in the
equation string.
423
Chapter 5
Image and Field Rules Reference
An X in the calculation is replaced by the value moved from the extract record. You must
place parentheses around each operator and its accompanying operands.
NOTE: If you have zeros in your extract file, the MoveNum rule converts these zeros
into blanks unless you include the Z option.
Option Description
NegText If the value is negative, this option lets you insert user-defined text before
and/or after the negative value.
Text Lets you print text before and after the number.
ZeroText If the result is zero, this option lets you insert user-defined text instead of
the zero value.
Offset *
Length 12
424
MoveNum
Offset 87
Length 6
File *
Record *
Required *
Rule MoveNum
Mask 11.0,7.2,$,L
This example takes the numeric value represented by the six characters at offset 87 in
the record found using the search criteria of 17,PMSP0200. That value is then
multiplied by .50.
Then the system adds 2.50, left justifies the output, and adds a leading dollar sign ($).
The numeric output can contain up to 11 characters before the decimal point, and zero
(0) after.
This example shows the use of a user function and overflow symbol:
Offset *
Length 12
Offset 87
Length 6
File *
425
Chapter 5
Image and Field Rules Reference
Record 1
Required *
Rule MoveNum
Mask 11.0,7.2,$,L
Extracting data Typically, the MoveNum rule uses the Move_It rule to get numeric data from the extract
record before formatting the numeric data. The Move_It rule only copies the least
number of characters possible. If the destination length is shorter than the source
length, this means that the destination length is used instead of the source.
Normally, this is fine with numeric processing because extract files typically contain
unformatted data. For example, you might pick up 123456 and turn it into
$$$$$1,234.56 or some other valid format. In these cases, the destination is almost
always longer than the source length.
There are cases, however, where the extract data is already formatted in some fashion
that’s longer than the expected destination. For example 00000001234 might appear
in the extract and yet the desired format expected for output is known to never exceed
6.2, such as 9999.99.
In this case, if you use the Move_It rule to get the data the result would be 0000000
because the destination length is only seven characters—shorter than the 11 character
source length.
The G flag tells the MoveNum rule not to call the Move_It rule and instead use an
alternate function that retrieves the entire source length before it formats the data for
the destination length.
In the DDT file, this information looks like this:
;0;1;REC-TOTALPREM;87;6;TOTALPREM;;12;7.2,11.0,$,L;MoveNum;
@GETRECSUSED,FORMABC,OVSYM/17,PMSP0200 ( ( X * .50 ) + 2.50 )
;N;N;N;N;
The system substitutes zero (0) for X and calculates the format when the search
condition is not met.
NOTE: You can use format E to stop the calculation when the search condition is false.
426
MoveSum
MoveSum
Use this field level rule (level 4) to add two fields and insert the result into a new field.
This rule uses the Record Dictionary table to get the search criteria, offset, length and
type for the variables specified in the Data field. It then performs an addition on the
information retrieved from extract file. The output sum is formatted according to the
format specified in the format mask in the DDT file.
To apply this rule, you must define the record, offset, length, and type for the variables
in the Record Dictionary table. For more information about the Record Dictionary, see
Using the Record Dictionary on page 511. An example of the Record Dictionary table is
as follows:
* This is the Record Dictionary table
<Records>
Account= Search(PMSP0200,17)
<Variables>
TBAL = Record(Account) Offset(18) Length(12) Type(Zone) Precision(2)
TBAL2 = Record(Account) Offset(38) Length(8) Type(Zone) Precision(2)
The name of the data dictionary file must be defined in the DataDictionary control
group as shown here:
< DataDictionary >
Name = DataDict.Tbl
The path for the table files must also be defined in the MasterResource control group
as shown here:
< MasterResource >
TablePath = .\MstrRes\TblLib\
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 0
Length 15
Offset 0
Length 0
File 0
Record 0
Required *
Rule MoveSum
Mask 15.2
427
Chapter 5
Image and Field Rules Reference
Data TBAL,TBAL2
This rule tells the system to look up the variable TBAL in the Record Dictionary table
named DATADICT.TBL located in the TblLib directory. Then the system gets from the
EXTRFILE.DAT file the first occurrence of a record matching the search criteria of
PMSP0200 at offset 17 as defined in Account under < Records >.
The output consists of 12 characters from offset 18. It is a zoned decimal with two
position precision. The same procedure is applied to the second variable TBAL2. The
system gets from the EXTRFILE.DAT the first occurrence of a record matching the search
criteria of PMSP0200 at offset 17 as defined in Account under < Records >.
The output consists of eight characters from offset 38. It is a zoned decimal with two
position precision. Finally, these two numbers are added and the result is stored in the
variable NEW_BAL. The length of the sum number is 15 and the precision is two
decimals.
428
MovTbl
MovTbl
This field level rule (level 4) works similarly to the Move_It rule, except records are
taken from the table list of records stored in memory instead of the extract records list
from which many of the other rules get data.
One or more files may be used to keep tables used by this rule. Each table (file) must
be listed in the table list file specified in the Data control group with the name TBLFILE.
This table file list file must be in the following format:
TABLEFILENAME1.EXT <crlf>
TABLEFILENAME2.EXT <crlf>
Each table file name is listed on a single line followed by a carriage return/line feed.
The format of the table itself is a key name followed by key data. The key need not be
a specific length nor the data, which allows for a single table or group of table files to
contain table entries of varying lengths.
For example, suppose a form contains the names and numbers of agents for calling
purposes, but these names and numbers change on a regular basis, this situation
lends itself to the use of text tables. A table might be created called AGENTS.TBL that
contains table entries such as the following:
AGENT001 JOE MILLER <crlf>
and another table called agentpho.tbl with phone number entries such as:
AGENT001PHONE404 111-2222 <crlf>
You could then make these tables available to Documaker Server by including them in
the file specified by the TblFile setting in the FSISYS.INI file.
You specify the table file name in the Data control group of the FSISYS.INI file as
follows:
< Data >
TblFile = .\deflib\TblFile.Dat
These tables must first be loaded into memory before the system can use them. To do
so, the following rules must be in the AFGJOB.JDT file:
;CreateGlbVar;1;TblLstH,PVOID;
;LoadTblFiles;1;;
429
Chapter 5
Image and Field Rules Reference
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 30
Offset 10
Length 20
File *
Record *
Required *
Rule MovTbl
Mask *
Data 1,AGENT001
Here, the system will find a maximum of 20 characters at offset 10 in the first record in
the table with a key value of AGENT001 at offset 1. It then moves the information to the
destination field.
430
NoOpFunc
NoOpFunc
This field level rule (level 4) is useful when you are developing new forms because it
lets you map all fields and systematically test each field by replacing the NoOpFunc
rule with the actual rule you want to use.
If a particular DDT rule keeps failing, you can use NoOpFunc to temporarily replace the
original rule and process the form without error until you can evaluate and solve the
problem.
NOTE: The field on the form will be blank after processing with this rule.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length *
Offset *
Length *
File *
Record *
Required *
Rule NoOpFunc
Mask *
Data *
431
Chapter 5
Image and Field Rules Reference
NOTE: When you use the NoOpFunc rule, many of the fields which would otherwise be
required for processing are not needed. If, however, any of the other fields
contain data, this will not affect the operation of the NoOpFunc rule. The
system lets the NoOpFunc rule replace any rule on an existing line in a DDT file.
432
OvActPrint
OvActPrint
Use this field level (level 4) rule to report the actual number of overflow records that
could be processed per transaction for the overflow image.
Parameter Description
For instance, assume an overflow image can handle five overflow records before being
forced to another page and a transaction contains seven overflow records. This rule
would state the output as 7—five for the first page, plus two for the second page.
This rule supports only automatic overflow.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 15
Offset *
Length *
File *
Record *
Required *
Rule OvActPrint
Mask *
Data FORMABC,ITEMSYM **
433
Chapter 5
Image and Field Rules Reference
This example outputs to a destination field the actual number of overflow records
processed for the form/overflow symbol combination of FORMABC, ITEMSYM.
434
OvPrint
OvPrint
Use this field level (level 4) rule to report the maximum number of overflow records that
could be processed per transaction for the overflow image.
Parameter Description
For instance, assume an overflow image can handle five overflow records before being
forced to another page and a transaction contains seven overflow records. This rule
would state the output as 10—five for the first page, plus five for the second page.
This rule works with the IncOvSym rule.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 15
Offset *
Length *
File *
Record *
Required *
Rule OvPrint
Mask *
Data FORMABC,ITEMSYM**
435
Chapter 5
Image and Field Rules Reference
This example counts the maximum number for the overflow records used for the form,
overflow symbol combination of FORMABC, ITEMSYM.
436
PaginateBeforeThisImage
PaginateBeforeThisImage
Use this image level rule (level 3) to force the system to perform a pagination before it
processes this image. Normally, pagination does not occur until the system has
finished processing the entire form set - meaning that all data is complete.
If pagination occurs because an earlier image exceeded a page boundary, the internal
references for page coordinates are reset for the page that now contains this image.
This rule makes it possible for a image or field rule that occurs later to know what page
the image (or field) occupies. You can also use this rule if you want to know how much
of the page is occupied so you can conditionally include or exclude data. If you waited
until normal pagination would occur, it would be after all normal image and field level
rules had been executed and it would be too late.
Syntax PaginateBeforeThisImage ( )
There are no parameters for this rule. This rule is sometimes used with the
ResetImageDimensions and DontPrintAlone rules.
437
Chapter 5
Image and Field Rules Reference
PostImageDAL
Use this image level rule (level 3) in the DDT file to execute a DAL script on the
POST_PROC_B message. The PostImageDAL rule executes after all field level rules
stored in the form set’s DDT files are run.
You can use this rule to handle follow-up tasks after the image and field level DDT rules
are executed.
Syntax ; PostImageDAL;string;
Parameter Description
Although you can use DAL to access almost any form set or image field, keep in mind
those fields may not exist, depending on where you place this rule in the transaction
job rule list. And, unlike the DAL or IF rules, there is no return value from the execution
of a image level DAL script.
Use this form to get extract data if the script is contained in the rule data. You cannot
use this form in external script files.
A = {1,MIS257 138,1}
Where A is a DAL variable you wish to assign. The bracketed {} item can be almost any
standard search mask supported by the Get Record infrastructure. In this case,
1,MIS257 is the search criteria. If the record is found, the system takes the data from
position 138, length 1 as indicated by 138,1.
This method also lets you specify an occurrence of the record by including a hyphen
with a numeric value, such as -n, after the data length. Here is an example:
A = {1,MIS257 138,1-5}
Here the function searches for the 5th occurrence of the 1,MIS257 record. If you omit
the occurrence, the system returns the first one found. If it cannot find the requested
record, the system assigns the variable an empty “” value.
NOTE: To specify multiple DAL statements in the rule data area, separate the DAL
statements using two colons (::). Normally, semicolons separate DAL
statements, but this character is illegal in the rule data area.
This example executes the Chain DAL function which then executes the DAL script
contained in the POSTTRAN.DAL file in the DefLib directory specified in your MRL.
; PostImageDAL;;If HaveGVM("main_address") Then
SetGVM("main_address", "25 Brown St.", , “C”, 20)::End;
In this example, the system checks to see if the GVM variable (main_address) exists. If
not, it creates a character array GVM variable (main_address) 20 characters in length
and stores the character string (25 Brown Street) in the array.
438
PostImageDAL
439
Chapter 5
Image and Field Rules Reference
PowType
Use this field level rule (level 4) to force a transaction to manual batch (WIP). The
PowType rule sets the manual batch flag to true. To edit the field associated with the
PowType rule in the Entry system, you must set the required flag to operator for the
field.
Syntax PowType ( )
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 40
Offset *
Length *
File *
Record *
Required Operator
Rule PowType
Mask *
Data *
In this example, the operator required flag for the INSNAMEREC-INSNAME1 field must
be set if you want this field to be editable in the entry system when it is retrieved from
manual batch (WIP).
440
PowType
Option Description
441
Chapter 5
Image and Field Rules Reference
PreImageDAL
Use this image level rule (level 3) in the DDT file to execute a DAL script on the
PRE_PROC_B message. The PreImageDAL rule executes before image or field level
rules stored in the image’s DDT file.
You can use this rule to handle setup tasks which should occur before image and field
level DDT rules stored in the image’s DDT file are executed.
Syntax ; PreImageDAL;string;
Parameter Description
Although you can use DAL to access almost any form set or image field, keep in mind
those fields may not exist, depending on where you place this rule in the transaction
job rule list. And, unlike the DAL or IF rules, there is no return value from the execution
of a image level DAL script.
Use this form to get extract data if the script is contained in the rule data. You cannot
use this form in external script files.
A = {1,MIS257 138,1}
Where A is a DAL variable you wish to assign. The bracketed {} item can be almost any
standard search mask supported by the Get Record infrastructure. In this case,
1,MIS257 is the search criteria. If the record is found, the system takes the data from
position 138, length 1 as indicated by 138,1.
This method also lets you specify an occurrence of the record by including a hyphen
with a numeric value, such as -n, after the data length. Here is an example:
A = {1,MIS257 138,1-5}
Here the function searches for the 5th occurrence of the 1,MIS257 record. If you omit
the occurrence, the system returns the first one found. If it cannot find the requested
record, the system assigns the variable an empty “” value.
NOTE: To specify multiple DAL statements in the rule data area, separate the DAL
statements using two colons (::). Normally, semicolons separate DAL
statements, but this character is illegal in the rule data area.
This example executes the Call DAL function which executes the DAL script contained
in the POSTIMAGE.DAL file in the DefLib directory in your MRL.
This example sets the internal DAL variable, service _id, to the first eight-characters in
the transaction record that match the search mask:
1,PrePost,22,Elect
Then the Call DAL function executes the DAL script in the POSTIMAGE.DAL file, which
resides in the DefLib sub-directory in your MRL.
442
PreImageDAL
In this example, the system checks to see if the GVM variable (main_address) exists. If
not, it creates a character array GVM variable (main_address) 20 characters in length
and stores the character string (25 Brown Street) in the array.
443
Chapter 5
Image and Field Rules Reference
PrintIf
Use this field level rule (level 4) to determine what text should be placed into the
output buffer. The PrintIf rule compares a character string from the extract record to the
character string specified in the user-defined condition contained in the data field.
This rule does not support comparison of data strings that contain all numeric
characters. This rule does supports overflow.
NOTE: The PrtIfNum rule does support comparison of data strings that contain all
numeric characters.
Flag Description
C Center
R Right justify
The system justifies the data by adding spaces in front of the text. If you are using a
proportional font, do not use these flags to align the data. Use the JustFld rule for that.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 4
Offset 285
444
PrintIf
Length 1
File *
Record *
Required *
Rule printif
Mask *
This will put INCL into the field if record ASBLCPL1 offset 285 length 1 = “Y”, or EXCL if
record ASBLCPL1 offset 285 length 1 = “N”.
NOTE: Separate the record search criteria and the user-defined condition criteria
using a blank space in the data field of the rule.
445
Chapter 5
Image and Field Rules Reference
PrtIfNum
This field level rule (level 4) is similar to the PrintIf rule. The difference is the PrtIfNum
rule compares the data to a number while PrintIf compares data to a character string.
A MoveNum action is performed on the value from the extract record and the resulting
value is compared to the value in the user-defined conditions to determine what text
should be placed in the output buffer. This rule supports overflow processing.
A user-defined condition is comprised of one or more user-defined definitions
separated by a colon (:). A user-defined definition is comprised of these two items
separated by an equal sign (=):
• This item is comprised of a logical operator and numeric value to be used in the
comparison. The logical operators supported are:
Operator Description
= equal to
• Character string (inside quotation marks) to be placed in the output buffer if the
comparison is true.
Here are some examples of user-defined conditions:
=40="He is forty years old."
The logical operator is equal to, the numeric value is 40, and the character string if the
comparison is true is He is forty years old.
>50="He is greater than 50 years old."
The logical operator is greater than, the numeric value is 50, and the character string if
the comparison is true is He is greater than 50 years old.
<30="He is less than 30 years old."
The logical operator is less than, the numeric value is 30, and the character string if the
comparison is true is He is less than 30 years old.
<>20="He is not 20 years old."
The logical operator is not equal to, the numeric value is 20 and the character string if
the comparison is true is He is not 20 years old.
=40.0="Forty years old.":>50="Greater than 50":<30="Less than
30.":<>20.00="Is not 20.":29="29 years old."
This user-defined condition is comprised of five user-defined definitions.
• If the value from the extract record is equals to 40.0, the string Forty years old. is
moved to the output buffer.
446
PrtIfNum
• If the value from the extract record is greater than 50, the string Greater than 50 is
moved to the output buffer.
• If the value from the extract record is less than 30.0, the string Less than 30 is
moved to the output buffer.
• If the value from the extract record is not equal to 20.00, the string Is not 20 is
moved to the output buffer.
• In this definition, the logical operator does not exist so no comparison is made. If
one of the other four user-defined condition is not true, the string 29 years old. is
moved to the output buffer.
NOTE: You must define the MoveNum parameters (format mask) in the PrtIfNum rule
mask field. As a minimum, you must define the MoveNum input numeric format
(X.Y) followed by the output numeric format (X.Y).
If data (offset, length) does not exist for the search mask, the value returned to
PrtIfNum for the comparison is zero (0). Therefore, you may want to include a
zero compare in the user-defined conditions.
For example, suppose you left the No check box blank if the data is three and
an X if the data is a one, two, or four. These user-defined conditions...
=3=” “: <>3=”X”
would not produce the desired results if the data was missing (blank). These
conditions...
Image Editor example If you want a six-character packed decimal located at offset 200 in a record identified
by an XYZ at location 100, and base it on the numeric value, you would do the following:
Offset 1
Length 18
Offset 200
447
Chapter 5
Image and Field Rules Reference
Length 6
File *
Record *
Required *
Rule prtifnum
NOTE: A space separates the record search mask “100,XYZ” and the following logic.
448
PurgeChartSeries
PurgeChartSeries
Use this image level (level 3) rule to remove a series from a chart which contains no
series data. The cleanup performed by this rule affects all charts on the image. If a
series is defined for a chart, but there is no data to fill that series, in most cases you
would not want to include the empty series in the chart.
A series may exist but contain no series data because you may need to add series data
on an as provided basis. For instance, the customer extract data may contain a variable
number of records containing data that goes into a chart. Each of these records may
contain data for a single series.
The FAP file would be designed to accommodate the maximum number of series that
could be included. If the extract data does not contain records to build the maximum
number of series the chart can accommodate, you may want to exclude those series
from the chart. This eliminates white space on the chart.
Syntax ;PurgeChartSeries;;;
Add this rule under the Image Rules section in the DDT file. You typically use this rule
with the CreateChartSeries or FieldVarsToChartSeries rules. Always place this rule
after any rule which gathers chart data.
449
Chapter 5
Image and Field Rules Reference
RemoveWhiteSpace
Use this image level (level 3) rule to remove the white space from between fields. This
rule works similarly to the SetAddr rules, but is not address specific.
Syntax ;RemoveWhiteSpace;FIELD1,FIELD2,FIELD3;.../NoWarning
The parameters to this rule will include a list of fields that should exist on the image.
Because fields are typically not created when no data maps, you must load the image
to make sure the empty fields exist.
Separate the fields in the list with commas. Each subsequent field with data will be
mapped into the earliest named prior field that did not contain data.
This rule moves field data from one field to a prior named field to compress out the
space between the fields. Typically, you would use this rule to compress the vertical
space, as in address lines, but the rule does not really care whether the space is vertical
or horizontal.
Unlike the SetAddr type rules, this rule does not actually map the original data. You
must use field mapping rules, like Move_It, to do that. Also note that only the data
moves between the fields. The location of each physical field remains the same.
Also, unlike the SetAddr rules, you do not have to compress the space up. If you specify
the fields in the reverse vertical order, you can compress the space down.
Using the NoWarning If the system cannot locate the field, you get a warning. If you include the NoWarning
parameter parameter, however, you can suppress the warning. Add this parameter after the last
field in the list. Use a forward slash (/) to separate it from the previous parameter and
end it with a semicolon (;). This parameter is optional. Here is an example:
;RemoveWhiteSpace;PAGE1_FIELD1, PAGE1_FIELD2, PAGE1_FIELD3,
PAGE1_FIELD4/NoWarning;
The warning message includes addition information to help you resolve the problem:
DM10190: Warning in <REMOVEWHITESPACE>: Unable to locate field
<FieldName> in image <ImageName>.
This rule does not work with bar code fields or multi-line text fields.
If the system cannot locate the listed field and the image is a multi-page image and you
omitted the NoWarning parameter, you get message DM10189. If you included the
NoWarning parameter, you get message DM10190. Here are some examples:
DM10189: Warning in <REMOVEWHITESPACE>: Unable to locate field
<FieldName> on page <PageNo> of a multi-page image <ImageName>.
DM10190: Warning in <REMOVEWHITESPACE>: Unable to locate field
<FieldName> in image <ImageName>.
NOTE: Naming the same field to move more than once in the parameters may cause
unreliable results. The final location of a field's data is determined by the last
movement of that field.
Also, this rule does not work with barcode type fields or multi-line text fields.
450
RemoveWhiteSpace
Image Editor example Here is an example. Suppose you have these fields and data:
FIELD_A = ABCDEFG
FIELD_B =
FIELD_C =
FIELD_D = TUVWXYZ
FIELD_A does not move because there is no earlier named field. FIELD_B and FIELD_C
are empty. The data from FIELD_D will move to FIELD_B — the earliest field that is still
empty. The result is:
FIELD_A = ABCDEFG
FIELD_B = TUVWXYZ
FIELD_C =
FIELD_D =
451
Chapter 5
Image and Field Rules Reference
ResetImageDimensions
Use this image level rule (level 3) to reset the top or bottom dimensions of the current
image based on the parameters you specify. This rule makes the objects on the image
fit under the bottom of the header, over the top of the footer, or compresses the image
to the smallest height possible, including all of its objects.
Syntax ;ResetImageDimensions;NewSize;;
Parameter Description
Understanding the System In legacy implementations, where only DDT files were loaded and not FAP files, fields
are the only objects on an image the ResetImageDimension rule recognizes. That
meant image bottoms were most likely being assigned at the last mapped field. In
subsequent releases and because of new features and the new Studio model of
development, FAP files are loaded during batch runs. Therefore, to get behavior similar
to what you had in legacy implementations, you must either change the
ResetImageDimension rules to use the LastField parameter, or use the
RID_LastMapField INI option to change the behavior of the MinHeight parameter.
When you use the LastField option, the bottom of the image is moved to a position
below the lowest mapped field on the image. This is what you want in situations where
the next image should be placed immediately below where the last field was mapped.
For instance, assume you have a small image used for addresses. It can contain up to
eight lines, but depending upon the address only two or three lines might be used and
you would like to set the bottom of the image below where the last field was mapped.
Here is an example:
<Image Rules>
;ResetImageDimension;LastField;
NOTE: Depending upon your print or display method, changing the bottom of the
image with this parameter could mean that any objects below this point will
not be visible and may not print. Or it could mean those objects will simply
overprint the next image in sequence on the same page.
You can also use the RID_LastMapField INI option to change the MinHeight parameter
to work like the new LastField option described above.
< RunMode >
452
ResetImageDimensions
RID_LastMapField = Yes
NOTE: Depending upon your print or display method, changing the bottom of the
image with this option could mean that any objects below this point will not be
visible and may not print. Or it could mean those objects will simply overprint
the next image in sequence on the same page.
Also note that the term last field refers to the lowest field mapped on an image and not
the physical sequence in which the fields are mapped. The lowest field is the one that
is the greatest distance from the top of the image.
This example resets the image dimensions to occupy the least amount of space.
453
Chapter 5
Image and Field Rules Reference
ResetOvSym
Use this image level rule (level 3) to reset an overflow variable during the processing
of a document set. Use this rule on the image level if you can not wait until the job level
rule, ResetOvFlw, resets the entire set of overflow variables.
Parameter Description
OverflowSymbol The name of the overflow symbol defined in the SetOvFlwSym rule.
ImageName The name of the Image that contains the fields on which overflow
processing will occur.
454
SetGroupOptions
SetGroupOptions
Use this image level rule (level 3) to set group options similar to forms. This rule lets
you define the image as a header or footer and lets you specify whether or not the
image should be copied onto the overflow image if overflow occurs.
Parameter Description
CopyOnOverflow Defines the images that are copied to the new page if group
pagination splits the group.
Keep in mind...
• When an image contains both a GroupBegin rule and a SetGroupOptions rule, the
GroupBegin rule must come first.
• When an image contains both a GroupEnd rule and a SetGroupOptions rule, the
SetGroupOptions rule must come first.
• You must set all group pagination image options (footer, header, and
CopyOnOverflow) using the SetGroupOptions rule.
Image Editor example This DDT file excerpt defines this image as the header which should be copied to the
new pages if the group pagination splits the group because of overflow.
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,1142,19718,0,0,0,0;
;SetOrigin;Rel+0,Max+100;
;GroupBegin;GroupPagination();;
;SetGroupOptions;header,copyonoverflow;
This DDT file excerpt defines this image as the footer which should be copied to the
new pages if the group pagination splits the group because of overflow.
/* This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,1142,19718,0,0,0,0;
;SetOrigin;Rel+0,Max+100;
;GroupBegin;GroupPagination();;
;SetGroupOptions;footer,copyonoverflow;
455
Chapter 5
Image and Field Rules Reference
RunDate
Use this field level rule (level 4) to get the run date from the transaction data
(TRNFILE.DAT file) and format that date using the mask you specify.
The mask on the RunDate rule supports the following syntax:
A number (between 1 and 10 for compatibility with prior releases) and this format:
DinFmt:outFmt
The D indicates a date conversion using the new method. Here is a list of the date
formats you can choose:
1 YYMMDD MMDDYY
2 YYYYMMDD MMDDYYYY
3 YYYYMMDD MMDDYY
4 YYMMDD MM-DD-YY
5 YYMMDD MM/DD/YY
6 YYYYMMDD MM-DD-YY
7 YYYYMMDD MM/DD/YY
8 MMDDYY MM-DD-YY
9 MMDDYY MM/DD/YY
10 YYYMMDD MM/DD/YY
D inFmt is one of the standard date outFmt is also a standard date format for
formats which consists of a format the destination field and is separated
character, optional date separator, from the inFmt by a colon (:).
and an optional year size (2 or 4).
For compatibility with prior releases, masks (1 through 10) and the destination formats
with a single letter, such as D, indicate the system will omit leading zeros or spaces.
Also, please note that Month indicates both upper- and lowercase letters are used
while MONTH indicates only uppercase letters are used. Mon indicates the month will
be abbreviated in upper- and lowercase letters.
Using locales If you use one of the standard formats, use the @XXX (without the percent). For
example, D44@CAD is the standard format for Month DD, YYYY in Canadian French. If
you are creating your own format, use %@???. For instance, D%@CAD%B %#d, %Y
yields the same result as the standard format D44@CAD.
Keep in mind that the run date is typically stored in YYYYMMDD format and therefore
does not require any locale information on the input format.
456
RunDate
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 10
Offset *
Length *
File *
Record *
Required *
Rule RunDate
Mask DM-4:44
Data *
The D tells the system what conversion method to use. M-4 indicates the input format
is DD-Mon-YYYY. And 44 indicates the output format is Month D, YYYY.
Or, if you have used the new TRN_FIELDS conversion support to have the GenTrn
program change the RunDate to YYYYMMDD, you can use this mask definition:
DD4:44
Here everything is the same except the input format of D4, which indicates YYYYMMDD
as the format of RunDate.
457
Chapter 5
Image and Field Rules Reference
Offset *
Length 8
Offset *
Length *
File *
Record *
Required *
Rule RunDate
Mask 6
Data *
458
SAPMove_It
SAPMove_It
Use this field level rule (level 4) for a Move_It type of operation on an SAP Raw Data
Interface (RDI) extract file. This rule supports overflow.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 0
Length 10
Offset 173
Length 3
File *1
Record 1 (generally not required unless you are also using overflow)
Required *1
Rule SAPMove_It
Mask *1
Data 42,CAUFVD_P-MATNR
In this example, the rule gets the first occurrence in the extract file of a record matching
the search criteria of CAUFVD_P-MATNR at offset 173. From the extract record, 3
characters (which contains the length of the data that will follow it) are moved to the
output buffer.
The rule then reads the extract record again, this time from offset 176, and copies x
characters (where x is the 3-byte length that was just read) from the extract record to
the output buffer (which in this case is defined to be 10 characters in length).
459
Chapter 5
Image and Field Rules Reference
This example shows the use of a user function and overflow symbol:
Offset 0
Length 10
Offset 173
Length 3
File *1
Required *1
Rule SAPMove_It
Mask *1
Data @GETRECSUSED,S4TOP,S4TOPOVF/42,CAUFVD_P-MATNR
460
SetAddr
SetAddr
Use this field level rule (level 4) to store and retrieve subsequent lines of a multiple line
address. This rule is useful if you are setting up an address which may have three or
four lines of information. For instance, some addresses include a suite or apartment
number. If one of the middle address lines is missing, the SetAddr rule will format the
address to omit any white space or blank lines. This rule supports overflow.
The first time the rule is called, the format mask field must contain an F. This initializes
the function and loads the address lines into an array. The system then returns the first
line of the address data. Subsequent address variable fields should contain an N in the
format mask field and return the next available non blank address line from the array.
The data element of the DDT structure should contain the parameters necessary to
obtain the multiple lines that make up the entire address record. Use of overflow with
this rule only pertains to calls which have the format mask field set to F.
The data field of the DDT has two parts, the first is the search criteria to get the extract
record which contains the address information. The second part, separated from the
first by a space, consists of offset,length pairs of address information.
When the address table is built, if one of the address lines consists of all blanks no
entry is made in the address table. This lets you remove blank lines in an address.
Here are the optional format mask parameters you can use:
Parameter Description
C Converts to sentence style where the first character is capitalized and the
remaining characters are lowercased.
Image Editor example For example, if an address record contained four fields such as name, P.O. Box, city &
state, and ZIP code and these four data items were loaded into the table, if P.O. Box
was empty, only the other three items would be loaded into the table.
When the address table items are retrieved, the first three contain data and the fourth
returns nothing. This lets you print the address on successive lines without having a
blank line in the middle where the P.O. Box would be.
If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
In this field... Enter for field 1... Enter for field 2... Enter for field 3...
Offset 1 1 1
461
Chapter 5
Image and Field Rules Reference
In this field... Enter for field 1... Enter for field 2... Enter for field 3...
Length 50 50 50
Offset * * *
Length * * *
File * * *
Record * * *
Required * * *
Mask F N N
Data 17,ADDRECORD * *
35,40,75,40,115,40
In the DDT file, this information looks like this for the first variable field:
;0;0;REC-ADDRESS1;;;ADDRESS1;1;50;F;SetAddr;17,ADDRECORD
35,40,75,40,115,40;;;;;
The example above fills the address table and copies the first address line to the
destination field. The first record matching the search criteria of 17,ADDRECORD is
obtained and from it three separate entries are made into the address table. The first
is the 40 characters starting at offset 35 of the record, the second for 40 characters
starting at offset 75, and the last for 40 characters starting at offset 115.
To get the second and third address lines from the table, subsequent calls to the
SetAddr rule must be made using format mask N, with nothing in the data field:
;0;0;ADDRESS2;;;ADDRESS2;1;50;N;SetAddr;;;;;;
;0;0;ADDRESS3;;;ADDRESS3;1;50;N;SetAddr;;;;;;
NOTE: In this example, the city, state, and ZIP code are together in the extract file and
would be found by the entry for field 3. If the city, state, and ZIP are not
formatted, see the SetAddr2 rule.
This example shows the use of a user function and overflow symbol:
462
SetAddr
Offset 1
Length 50
Offset *
Length *
File *
Record 1
Required *
Rule SetAddr
Mask F
Data @GETRECSUSED,FORMABC,OVSYM/17,ADDRECORD
35,40,75,40,115,40
463
Chapter 5
Image and Field Rules Reference
SetAddr2
Use this field level rule (level 4) to store and retrieve subsequent lines of a multiple line
address. This rule is similar to the SetAddr rule in that it also omits blank lines from an
address. The SetAddr2 rule, however, also formats the city, state, and postal code and
adds a dash if you have a 10-digit ZIP code (ZIP+4). For instance, this rule automatically
formats the city, state, and ZIP code as follows:
AtlantaGA 30333 (one space between state and ZIP code)
You can also specify additional formatting. For instance '^,','^' in the Data field (where
^ represents a space) tells the system to format the text as shown here:
Atlanta, GA 30333 (one space between the comma and the state, two spaces
between the state and ZIP code)
In addition, you can also specify an S flag in the Data field to tell the system to suppress
the state from the last address line. If you include this flag, the text is formatted as
shown here:
Atlanta, 30333 (state code is suppressed)
The first time you call this rule, the format mask field must contain an F. This initializes
the function and loads the lines of the address into an array. The system then returns
the first line of the address data. Subsequent address variable fields should contain an
N in the format mask field and return the next available non blank address line from the
array.
The data element of the DDT structure contains the parameters necessary to get the
address record. The last three fields (city, state, postal code) are stored in one field.
The various address data element mapping comes from the first DDT record's data
element (after the record mapping). This rule supports overflow.
Here are the optional format mask parameters you can use:
Parameter Description
C Converts to sentence style where the first character is capitalized and the
remaining characters are lowercased.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
In this field… Enter for field 1… Enter for field 2… Enter for field 3…
Offset 0 0 0
464
SetAddr2
In this field… Enter for field 1… Enter for field 2… Enter for field 3…
Length 30 30 25
Offset 45 65 0
Length 20 20 0
File * * *
Record * * *
Required * * *
Mask F N N
Data 11,INSADRREC * *
25,20,45,
20,65,9,75,3,78,10
',',5,’-'
In the DDT file, this information looks like this for the three variable fields:
;0;0;REC-ADDRESS1;45;20;ADDRESS1;0;30;F;SetAddr2;11,INSADRREC
25,20,45,20,65,9,75,3,78,10 ',',5,’-';;;;;
;0;0;REC-ADDRESS2;65;20;ADDRESS2;0;30;N;SetAddr2;;;;;
;0;0;REC-ADDRESS3;0;0;ADDRESS3;0;25;N;SetAddr2;;;;;
The first set of offsets (25,20) is for address line 1. The second set of offsets (45,20) is
for address line 2. The third set of offsets (65,9,75,3,78,10) is for address line 3, which
is normally used for the city (65,9), state or province (75,3), and postal code (78,10).
NOTE: Use a single space to separate the offsets from the format parameters (‘,’,5,’-’).
For the third line of address data, this example uses “11,INSADRREC” as the search
criteria and “65,9,75,3,78,10”as the data mapping parameters. These parameters are
used to format the city, state or province, and postal code: ', ',5,'-'. The comma (,) is
placed between city and state or province. The dash (-) is placed after the 5th position
in the postal code.
If the mapping parameters are: ',','5','-' or ',','5',' ' and the input data from the extract
data contains a ZIP code of nine digits with a dash, then:
Input Output
12345-6789 12345-6789
465
Chapter 5
Image and Field Rules Reference
Input Output
If the mapping parameters are: ',','5','-' or ',','5',' ' and the input data from the extract
data contains a ZIP code of nine digits without a dash, then:
Input Output
123456789 12345-6789
466
SetAddr3
SetAddr3
Use this field-level (level 4) rule to handle a three-line address with six components, as
shown here:
Option Description
F Initializes the function, fills the addr_ln array with the address components,
builds the address lines, and returns the first line from the addr_ln array. The
first time you call this rule the format mask field must contain an F.
N Returns the next available non-blank address line from the addr_ln array. This
mask is required for all subsequent SetAddr3 calls.
The various address data element mappings come from the first field rule record's Data
element (after the record mapping).
The rule expects five fields to be mapped. If one is missing you will receive an error.
This rule also assumes all address components are in the same record.
467
Chapter 5
Image and Field Rules Reference
Parameter Description
C Converts to sentence style where the first character is capitalized and the
remaining characters are lowercased.
Image Editor example Here are some examples based on this sample data:
Component Text
City Atlanta
State GA
ZIP 30326
Element Description
100,30 The field offset and length for the addr2 field
468
SetAddr3
Element Description
130,30 The field offset and length for the addr3 field
160,18 The field offset and length for the city field
178,3 The field offset and length for the state field
181,9 The field offset and length for the ZIP field
', ' The format used between the city and state and between addr2 and addr3
Y The ZIP format flag. If Y and the ZIP field is 9 positions, a dash appears after
the fifth position. If N or the field is not 9 positions, it is mapped as is.
NOTE: The Mask field in the first SetAddr3 rule would contain the character F. The
Data field for this rule would contain the following:
469
Chapter 5
Image and Field Rules Reference
SetCpyTo
Use the image level rule (level 3) to set the value of the SendCopyTo variable to a field
name in the DDT file that definitely contains data.
In this example, if ExampleField contains data, the system will print the text Send copy
to on the form.
470
SetCustChartAxisLabels
SetCustChartAxisLabels
Use this image level rule (level 3) to take data values that have been mapped to
variable fields and use them as custom axis labels on a chart.
Syntax ;SetCustChartAxisLabels;ChartName,FieldNames;;
Parameter Description
FieldNames Names of the variable fields you want to use as custom axis labels
This rule tells you if there are discrepancies in the number of axis labels you create
using this rule and the number the system would create on its own.
NOTE: The system creates place holder labels if you do not specify enough labels and
ignores others if you specify to many.
471
Chapter 5
Image and Field Rules Reference
;0;0;Axis11;71;1;Axis11;0;1;;Move_It;51,GRFMTHYR;N;N;N;N;2886;4326;
16006;
;0;0;Axis12;72;1;Axis12;0;1;;Move_It;51,GRFMTHYR;N;N;N;N;2886;4326;
16006;
;0;0;Axis13;73;1;Axis13;0;1;;Move_It;51,GRFMTHYR;N;N;N;N;2886;4326;
16006;
472
SetImageDimensions
SetImageDimensions
Use this image level (level 3) rule on forms which are made up of floating images. The
system automatically inserts this rule for you if you save your DDT file in Image Editor.
If you later resize the image, go to Image Editor and save the DDT file again to have the
system update the image dimensions.
If you used the SetOrigin rule, the system automatically includes this rule in the image
level rules section of your DDT file.
NOTE: Always let the system take care of this rule for you.
Image Editor example This example shows an excerpt from a DDT file:
/*This image uses these rules */
<Image Rules>
;SetImageDimensions;98,0,298,15965,0,600,0,480;
;SetOrigin;REL+0,MAX+0;
;PaginateBeforeThisImage;;
;ResetImageDimensions;;
;DontPrintAlone;;
473
Chapter 5
Image and Field Rules Reference
SetOrigin
Use this image level rule (level 3) to set the image overlay/page segment X and Y
coordinates. Using this rule, you specify where the page segment will be placed on the
printed page.
NOTE: You can also use the SetOriginI and SetOriginM rules. SetOriginI works just
like SetOrigin except you enter X and Y coordinate information in inches,
instead of FAP units. There are 2400 FAP units per inch.
SetOriginM works just like SetOrigin except you enter X and Y coordinate
information in millimeters. There are approximately 98 FAP units per
millimeter.
Use the SetOrigin rule if you prefer to enter these coordinates in FAP units.
Syntax ;SetOrigin;Fixed,X,Y,Form,Store(),ImageName;;
Parameter Description
FIXED (Optional) Anchors the image at the specified X and Y coordinates. This
must be the first parameter listed. See Fixing an image’s position on page
477 for more information.
Y Sets the Y coordinate for an image. This determines the image’s vertical
position.
Form (Optional) The form name on which the image exists. This parameter lets
you define more than one SetOrigin rule for an image and specify which
one applies based on the name of the form.
Store( ) (Optional) This parameter lets you store the current image coordinates in
prefix-name variables for later use. The syntax is:
Store(prefix-name variable)
For Windows, the coordinates are stored in:
prefix-name.left, prefix-name.right, prefix-name.top,
and prefix-name.bottom
The stored coordinates can be referenced by any subsequent SetOrigin
rule used to place an image on the same form.
The X and Y coordinates are specified using a combination of the following parameter
prefixes plus the addition or subtraction of FAP units. There are 2400 FAP units per
inch. Here are the prefixes you can use:
Prefix Description
Abs Absolute page position based on 2400 units per inch. (supports overflow)
Rel Relative to the last image’s top left coordinate. (supports overflow)
474
SetOrigin
Prefix Description
Max Relative to the last image’s maximum edge. For example, Rel+0,Max+600
would position the current image ¼ inch below the last image. (supports
overflow)
Mpg Relative to any image at the maximum edge. For example, Abs+0,Mpg+600
places the current image ¼ inch below the lowest object currently on the page.
(does not support overflow)
T2T Top edge is placed relative to the last image’s top edge. (Similar to Rel)
T2B Top edge is placed relative to the last image’s bottom edge. (Similar to Max+)
B2T Bottom edge is placed relative to the last image’s top edge. (Similar to Max-)
B2B Bottom edge is placed relative to the last image’s bottom edge.
L2L Left edge is placed relative to the last image’s left edge. (Similar to Rel)
L2R Left edge is placed relative to the last image’s right edge. (Similar to Max+)
R2L Right edge is placed relative to the last image’s left edge. (Similar to Max-)
R2R Right edge is placed relative to the last image right edge.
Ctr X/Y dimensions are centered on the last image’s X/Y dimensions.
This example sets the origin for the image to the X, Y values of 0, 1200.
;SetOrigin;Rel+0,Max+0;;
This example shows you how to set up an image, which will print after the image, which
precedes it. You define the order of the images which make up a form in the FORM.DAT
file using the Form Set Manager. The GenData program reads this information as it
builds the print batches.
For instance, suppose IMAGE_A appears on two separate forms in the form set:
FORM_1 and FORM_2.
;SetOrigin;ABS+0,ABS+0,FORM_1
;SetOrigin;ABS+0,ABS+2400,FORM_2
This example places the image at coordinate 0,0 when it appears on FORM_1 and an
inch (0,2400) down the page when it appears on FORM_2.
Here is another example:
;SetOrigin;Abs+0,Abs+12000,Image1,Store(var1);;
This example sets the origin for Image1 to zero (0) FAP units for the X value (from the
edge of form) and 12000 FAP units for the Y value (5 inches down form the top of the
form). Plus, it stores the image coordinates into the prefix-name variable VAR1.
475
Chapter 5
Image and Field Rules Reference
In this example, the current image would be positioned such that its left edge would be
at the same x coordinate of the previous image's left edge but the top of the image
would be 1/2 inch below the saved coordinates of a previous image—its coordinates
were saved in the variable VAR1 using this rule:
;SetOrigin;x+n,y+n,external form name,Store(var1);;
This example places the current image’s top left corner ¼ inch to the right and ½ inch
up from Img1’s bottom right corner.
Here is another example:
;SetOrigin;Rel+0,Max+300;; (same as L2L+0,T2B+300)
In this example the current image is placed 1/4 inch below the previous image. The
images are aligned with their left edges.
Here is another example:
;SetOrigin;Rel+0(IMG1),Max+300;; (same as L2L+0(IMG1),T2B+300)
In this example the current image is placed 1/4 inch below the previous image. The left
edge of the current image is aligned with the left edge of image IMG1.
Here is another example:
;SetOrigin;Max+600,Rel+0;; (same as L2R+600,T2T+0)
The current image is placed 1/2 inch to the right of the previous image. The images are
aligned with their top edges.
Here is another example:
;SetOrigin;Abs+0,Mpg+600;;
The current image is placed 1/4 inch below the lowest object currently positioned on
the page. The current image is aligned with the left edge of the page.
Here is another example:
;SetOrigin;Ctr+0,Max+0;; (same as Ctr+0,T2B+0)
476
SetOrigin
Fixing an image’s position The SetOrigin rule lets you designate an image as a fixed image. Fixed images cannot
be moved from their set position.
You declare an image to be fixed by including FIXED as the first parameter of the
image's SetOrigin rule. Regardless of when the image is triggered, it will keep the
coordinates assigned to it throughout pagination.
Fixed images can also be designated as CopyOnOverflow images. This will cause the
fixed image to be copied onto subsequent pages at the same coordinates as those
used for the first page.
The SetOrigin rule should always define the X,Y coordinates as an absolute position or
a position relative to an image that will always be on the page. Do not anchor the fixed
image relative to an image that can overflow onto a new page. If you do, the fixed image
will never move to the second page. Instead, it will always appear on the first page with
coordinates that place it below the bottom of the page.
Here is an example of how you would use the FIXED parameter:
;SetOrigin;Fixed,X,Y,Form,Store(),ImageName;;
NOTE: You must use the SetImageDimensions rule when you use this rule.
477
Chapter 5
Image and Field Rules Reference
SetOriginI
Use this image level rule (level 3) to set the image overlay/page segment X and Y
coordinates. Using this rule, you specify where the page segment will be placed on the
printed page.
NOTE: You can also use the SetOrigin and SetOriginM rules. SetOrigin works just like
this rule except you enter X and Y coordinates in FAP units, instead of inches.
There are 2400 FAP units per inch.
SetOriginM works just like this rule except you enter X and Y coordinates in
millimeters. There are approximately 25.4 millimeters per inch.
Syntax ;SetOriginI;Fixed,X,Y,Form,Store(),ImageName;;
Parameter Description
FIXED (Optional) Anchors the image at the specified X and Y coordinates. This
must be the first parameter listed. See Fixing an image’s position on page
477 for more information.
Y Sets the Y coordinate for an image. This determines the image’s vertical
position.
Form (Optional) The form name on which the image exists. This parameter lets
you define more than one SetOrigin rule for an image and specify which
one applies based on the name of the form.
Store( ) (Optional) This parameter lets you store the current image coordinates in
prefix-name variables for later use. The syntax is:
Store(prefix-name variable)
For Windows, the coordinates are stored in:
prefix-name.left, prefix-name.right, prefix-name.top,
and prefix-name.bottom
The stored coordinates can be referenced from any page in the form set.
Prefix Description
Rel Relative to the last image’s top left coordinate. (supports overflow)
Max Relative to the last image’s maximum edge. For example, Rel+0,Max+.25
would position the current image ¼ inch below the last image. (supports
overflow)
478
SetOriginI
Prefix Description
Mpg Relative to any image at the maximum edge. For example, Abs+0,Mpg+.25
places the current image ¼ inch below the lowest object currently on the page.
(does not support overflow)
T2T Top edge is placed relative to the last image’s top edge. (Similar to Rel)
T2B Top edge is placed relative to the last image’s bottom edge. (Similar to Max+)
B2T Bottom edge is placed relative to the last image’s top edge. (Similar to Max-)
B2B Bottom edge is placed relative to the last image’s bottom edge.
L2L Left edge is placed relative to the last image’s left edge. (Similar to Rel)
L2R Left edge is placed relative to the last image’s right edge. (Similar to Max+)
R2L Right edge is placed relative to the last image’s left edge. (Similar to Max-)
R2R Right edge is placed relative to the last image right edge.
Ctr X/Y dimensions are centered on the last image’s X/Y dimensions.
NOTE: For additional example, see the examples for the SetOrigin rule on page 475.
The only difference between this rule and the SetOrigin rule is that you use
inches instead of FAP units.
479
Chapter 5
Image and Field Rules Reference
SetOriginM
Use this image level rule (level 3) to set the image overlay/page segment X and Y
coordinates. Using this rule, you specify where the page segment will be placed on the
printed page.
NOTE: You can also use the SetOrigin and SetOriginI rules. SetOrigin works just like
this rule except you enter X and Y coordinates in FAP units, instead of
millimeters. There are approximately 98 FAP units per millimeter.
SetOriginI works just like this rule except you enter X and Y coordinates in
inches. There are approximately 25.4 millimeters per inch.
Syntax ;SetOriginM;Fixed,X,Y,Form,Store(),ImageName;;
Parameter Description
FIXED (Optional) Anchors the image at the specified X and Y coordinates. This
must be the first parameter listed. See Fixing an image’s position on page
477 for more information.
Y Sets the Y coordinate for an image. This determines the image’s vertical
position.
Form (Optional) The form name on which the image exists. This parameter lets
you define more than one SetOrigin rule for an image and specify which
one applies based on the name of the form.
Store( ) (Optional) This parameter lets you store the current image coordinates in
prefix-name variables for later use. The syntax is:
Store(prefix-name variable)
For Windows, the coordinates are stored in:
prefix-name.left, prefix-name.right, prefix-name.top,
and prefix-name.bottom
The stored coordinates can be referenced from any page in the form set.
Prefix Description
Rel Relative to the last image’s top left coordinate. (supports overflow)
Max Relative to the last image’s maximum edge. For example, Rel+0,Max+1 would
position the current image 1 millimeter below the last image. (supports
overflow)
480
SetOriginM
Prefix Description
Mpg Relative to any image at the maximum edge. For example, Abs+0,Mpg+1 places
the current image 1 millimeter below the lowest object currently on the page.
(does not support overflow)
T2T Top edge is placed relative to the last image’s top edge. (Similar to Rel)
T2B Top edge is placed relative to the last image’s bottom edge. (Similar to Max+)
B2T Bottom edge is placed relative to the last image’s top edge. (Similar to Max-)
B2B Bottom edge is placed relative to the last image’s bottom edge.
L2L Left edge is placed relative to the last image’s left edge. (Similar to Rel)
L2R Left edge is placed relative to the last image’s right edge. (Similar to Max+)
R2L Right edge is placed relative to the last image’s left edge. (Similar to Max-)
R2R Right edge is placed relative to the last image right edge.
Ctr X/Y dimensions are centered on the last image’s X/Y dimensions.
NOTE: For additional example, see the examples for the SetOrigin rule on page 475.
The only difference between this rule and the SetOrigin rule is that you use
millimeters instead of FAP units.
481
Chapter 5
Image and Field Rules Reference
SetRecipFromImage
Use this image level rule (level 3) to conditionally add sections ( images) to the current
form set based on conditions in the SETRCPTB.DAT file. You set up parameters which
instruct the rule to generate a new set of keys (Key1, Key2, and TranID).
A new set of items from the current SETRCPTB.DAT file is generated and those items
are run through the RunSetRcp feature to generate a temporary form set. This
temporary form set is merged with the current form set to create the final form set.
NOTE: With version 11.3, Documaker Studio lets you create subforms. Using subforms
you can include forms within forms which eliminates the need to use the
SetRecipFromImage rule. This simplifies triggering and populating data on
sections (images) when you are processing repeating patterns of hierarchical
or nested data. Previously, you had to use the SetRecipFromImage rule, the
sub extract rules, and overflow symbols to achieve the same result.
Parameter Description
Key1 Value
Key2 Value
AtEnd If you set this parameter to True, the system adds the forms in the order you
listed in your FORM.DAT file. The default is False, which tells the system to
load the form backwards from the way it is referenced in the FORM.DAT file.
The string $(Key1) within value equals the current transaction’s Key1 value. $(Key2)
equals the current transaction’s Key2 value. $(TranID) equals the current transaction
ID.
482
SetRecipFromImage
Within the new Key1/Key2 combination, to which the SetRecipFromImage rule will
jump, three forms are listed: FORM1, FORM2 and FORM3. By omitting the AtEnd
parameter, these forms are added, assuming all forms/images are triggered,
backwards from the way they are referenced in the FORM.DAT file. Therefore, the
POLFILE.DAT will look like this:
;SAMPCO;LOB;GAS BILLS;Gas Light;R;;\
FORM3A|D48<CUSTOMER>/\
FORM3B|D48<CUSTOMER>/\
FORM2A|D48<CUSTOMER>/\
FORM2B|D48<CUSTOMER>/\
FORM1A|D48<CUSTOMER>/\
FORM1B|D48<CUSTOMER>;
;SAMPCO;LOB;GAS BILLS2;Gas Bills2 Desc;R;;\
GASBILLS2|D<CUSTOMER>;
\ENDDOCSET\ 11111-11111-1-11111
If you include the AtEnd parameter and set it to True, as shown here:
;SetRecipFromImage;Key1=SMPCOM1 Key2=SMPLOB1 AtEnd=True;
483
Chapter 5
Image and Field Rules Reference
SetState
Use this field level rule (level 4) to translate a numeric ISO code retrieved from an
extract record into its equivalent state text. This rule supports overflow.
State table
Code State Code State Code State
48 Wisconsin 49 Wyoming
484
SetState
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 30
Offset 30
Length 2
File *
Record *
Required *
Rule SetState
Mask *
Data 17,PMSP0200
This example gets the two characters at offset 30 from the record obtained using the
search criteria specified in the data field. The rule then looks in the table and returns
the associated state text in the output buffer.
485
Chapter 5
Image and Field Rules Reference
SpanAndFill
Use this image level (level 3) rule to take a field and span its width between two other
fields, filling the field with a fill character.
Parameters Description
SpanField Enter the name of the field you want to span. This field must be the first
parameter.
NOTE: This rule does not move the field vertically. Only the width and horizontal
location are changed.
The filler character is used to span the width between the end of the text in the left field
and the beginning of the text in the right field. If either field is empty, the left
coordinate of the field is used.
You can use any rule to map the fill character into the SpanField. For example, you can
use the HardExst rule to map a character such as a period or asterisk. Only the first
character of the mapped data is used as the filler character. If no data is found in the
SpanField, the system uses periods (.) as the fill character.
NOTE: You may want to use the JustFld rule on your right-most field to make sure the
field is right justified.
Keep in mind...
• If you use the Move_It rule, or other rules that support right justification by
padding the data with spaces, your results will be incorrect. This rule calculates
the width of a field based upon the entire contents and will not remove space from
the fields.
• This rule loads the image (FAP or compiled FAP) if it is not already loaded.
• The font ID assigned to the SpanField is used for calculating the number of
characters required to fill the width of the field.
• If there is fractional space remaining, the system place the extra white space to the
left of the SpanField.
486
SpanAndFill
LeftField “ABCDEFG”
RightField “$123.45”
SpanField “.”
Remember the horizontal location of the SpanField is moved to fill the gap between the
left and right fields. The image designer handles the vertical alignment of fields.
487
Chapter 5
Image and Field Rules Reference
StrngFmt
Use this field level rule (level 4) to format a string retrieved from an extract record,
based on a given format string. The StrngFmt rule is useful for formatting Social
Security numbers and phone numbers. This rule supports overflow.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 1
Length 15
Offset 30
Length 9
File *
Record *
Required *
Rule StrngFmt
Mask 3,-,3,**
Data 17,PMSP0200
488
StrngFmt
Offset 1
Length 15
Offset 30
Length 9
File *
Record 1
Required *
Rule StrngFmt
Mask 3,-,3,**
Data @GETRECSUSED,FORMABC,OVSYM/17,PMSP0200
489
Chapter 5
Image and Field Rules Reference
SysDate
Use this field level rule (level 4) to format the system date. Using this rule you can
format the system date for different localities. This rule supports overflow.
The DDT mask area for the SysDate rule takes these values:
• output fetype
• output format mask
NOTE: There are two types of format mask, pre-defined types 1-9 and A-Q and user-
defined format arguments. If the pre-defined formats meet your needs, use
them, otherwise, create a user-defined format. For information on using pre-
defined format types, see Using Pre-defined Date Formats on page 278.
User- defined format arguments consist of one or more codes, each preceded
by a percent sign (%). For more information on user-defined format masks, see
the Setting Up Format Arguments on page 283.
Image Editor example Assume the system date is 03-01-2009, which is a Monday, and the time is 11:57 am.
The DDT format mask of:
d, “4/4
formats the system date using format 4, with month spelled out, such as March 1, 2009.
To produce a Canadian French date, such as mars 1, 2009, use the following DDT format
mask:
DCAD, “4/4
The following format, which uses format arguments, will produce the same output:
dCAD, “%B %#d, %Y
Format arguments let you include the day of the week, hour, minute, second, and so
on. This table shows you the results using various formats:
Format Result
%m-%d-%Y 03-01-2009
%d 01
%#d 1
%A Monday
%>A MONDAY
%b Mar
490
SysDate
Format Result
%<b mar
%p AM
%<>p Am
491
Chapter 5
Image and Field Rules Reference
TblLkUp
Use this field level rule (level 4) to find the record in a table that matches the first
specification. After the system finds that record, it uses the offset you specify to get a
key. The key is used to look up a final record and return the result.
NOTE: The size of a table row is set in the MaxExtRecLen option in the Trn_File control
group. The maximum size is 1024 characters.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 9
Offset *
Length *
File 1
Record *
Required *
Rule TblLkUp
Mask *
492
TblLkUp
NOTE: For this rule, the Mask field specifies a default look up value. It is not a
standard mask like that used in the Move_It rule.
If you want the system to use the table files to look up a final record and return
the result, specify a source file equal to any number except zero (0). If you
leave the Source File field equal to zero (0), the system uses the extract file as
your table.
Keep in mind that all tables you specify in your Tblfile are loaded into memory
sequentially. This table is then used to search for the final record. If your
search mask and key are not unique, you may end up with an incorrect result.
The rule does a search in the extract data for a record that matches the search mask
1,POLDTL. The 61,2 gets the two characters at offset 61 from the record found with the
1,POLDTL search mask.
Assume these characters turned out to be XY. The tables are then searched for a match
on the search mask 1,CO,7,XY. If a matching record is found, the system maps the nine
characters starting at offset 11.
You specify the table file in the Data control group in the FSISYS.INI file as follows:
TblFile=.\deflib\TBLFILE.DAT
In the TBLFILE.DAT file you would see a list of the fields in which the rule will search to
find a match:
.\DEFLIB\AGENCY.TBL
.\DEFLIB\COMPCODE.TBL
To use this rule, the following rules must be in the AFGJOB.JDT file:
;CreateGlbVar;1;TblLstH,PVOID;
;LoadTblFiles;1;;
493
Chapter 5
Image and Field Rules Reference
TblText
Use this field level rule (level 4) to get a text table item based on a key built from the
source field name concatenated with the data retrieved from the source record. This
rule supports overflow. Keep in mind these considerations, which pertain to the
external ASCII text table referenced by this rule.
where KEY is a value of up to 12 characters, padded right with spaces. ENTRY is the text
data associated with the key entry.
NOTE: All support for this rule resides in a single table file. You specify the name of
this file in the FSISYS.INI file in the TEXTTBL option in the Data control group.
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset 0
Length 20
Offset 16
Length 1
File *
Record 1
Required *
Rule TblText
Mask *
Data 17,00,15,A
494
TblText
In this example, a key into the table is formed by concatenating the source field name,
TRANTYPE, with the first character found at offset 16 from the record retrieved using
the search criteria of 17,00,15,A. The source field name comes first in the key. The table
is searched for a key match and the data associated with that key is written to the
destination field TYPE OF POLICY for up to 20 characters.
This example shows the use of a user function and overflow symbol.
Offset 0
Length 20
Offset 16
Length 1
File *
Record 1
Required *
Rule TblText
Mask *
Data @GETRECSUSED,FORMABC,OVSYM/17,00,15,A
495
Chapter 5
Image and Field Rules Reference
TerSubstitute
Use this field level (level 4) rule to emulate TerSub entry functionality. You add this rule
to a multi-line text field that has been designated as one which can grow.
Parameter Description
NOTE: For all parameters, you can use the names of GVM variables instead of actual
values.
The text to include in TerSubstitution is stored in the text areas of the images. The
images are listed in the FORM.DAT file under a dummy Key1, Key2, and FormName. The
rule finds the entry in the FORM.DAT file for the Key1,Key2,FormName parameters and
uses the text from any images with the supplied recipient.
Image Editor example Assume you have the following data defined in your master resource library.
;TerSubA;DataA;FormA;;N;;image1|D<CLIENT(0)>/
image2|D<CUSTOMER(0)>/image3.|D<CLIENT(0),CUSTOMER(0)>/
image4|D<CUSTOMER(0)>/image5|D<CLIENT(0),CUSTOMER(0)>/
image6|D<CUSTOMER(0)>/image7|D<CLIENT(0)>;
;TerSubB;DataB;FormB;;N;;imagea|D<CLIENT(0)>/
imageb|D<CUSTOMER(0)>/imagec.|D<CLIENT(0),CUSTOMER(0)>/
imaged|D<CUSTOMER(0)>/imagez|D<CLIENT(0),CUSTOMER(0)>/
imagef|D<CUSTOMER(0)>/imageg|D<CLIENT(0),<AGENT(0)>;
496
TerSubstitute
• You also have extract file transactions with a record which has a search mask
equal to 11,GVMREC and data at the following offsets and length.
• Each transaction could have different data in the specified record that would cause
each transaction to have different images in the multi-line text area.
Offset,Length
20,10= TerSubA
30,10= DataA
40,10= Customer
50,10= FormA
• A field prior to the multi-line text area that calls an external DAL script
(SELIMAGE.DAL) plus a record (11,FlagRec) in each transaction that has a 1, 2, or 3
at offset 40. Here is an example of the SELIMAGE.DAL script:
flag = (11,FlagRec 40,1);
If flag = 1 Then;
SetGVM(Key1GVM, "TerSub");
SetGVM(Key2GVM, "Data");
SetGVM(FormGVM, "Form1");
SetGVM(RecipGVM, "CLIENT");
ElseIf flag = 2;
SetGVM(Key1GVM, "TerSubA");
SetGVM(Key2GVM, "DataA");
SetGVM(FormGVM, "FormA");
SetGVM(RecipGVM, "CUSTOMER");
ElseIf flag = 3;
SetGVM(Key1GVM, "TerSubB");
SetGVM(Key2GVM, "DataB");
SetGVM(FormGVM, "FormB");
SetGVM(RecipGVM, "AGENT");
End;
497
Chapter 5
Image and Field Rules Reference
only the images (image1, image3, image5, and image7) are placed in the multi-line
text field.
• If your DDT file contains the following and your AFGJOB.JDT file includes the above
rules...
;0;0;SETFIELDTEST;0;0;SETFIELDTEST;0;0;;TerSubstitute;Key1=Key1GVM
Key2=Key2GVM Recipient=RecipGVM
FormName=FormGVM;N;N;N;N;4513;2194;11010;
only the images (image2, image3, image4, image5, and image6) are included in
the multi-line text field.
• If your DDT file contains the following, has a record (11,FlagRec) which has a 3 at
offset 40, and the external DAL script (SELIMAGE.DAL) is in the DefLib directory...
;0;0;SETFIELDTEST;0;0;SETFIELDTEST;0;0;;TerSubstitute;Call("SELIMAG
E.DAL");N;N;N;N;4513;2194;11010;
only the image named imagez is included in the multi-line text field.
498
TextMergeParagraph
TextMergeParagraph
Use this image level rule (level 3) to merge data for embedded variable fields in a text
area with text. The Move_It or MoveNum rules are most often used with this rule to
move data from the extract file into embedded variable fields. The system then rewraps
the text area.
The system writes the FAP information into the NAFILE.DAT file, which is used by the
GenPrint program. If an image includes this rule, the Can Grow attribute setting in the
image’s FORM.DAT file must match the text area’s Can Grow attribute in the FAP file.
NOTE: If you include the Can Grow attribute for a multi-line text field, be aware the
field can both grow and shrink, depending on the data. If you do not want the
text area to change sizes, turn off the Can Grow attribute.
Using this rule can slow performance, so use it only as necessary. If you must use this
rule, it is better not to mix other objects with the text area in this FAP file. The more
objects are mixed, the worse your performance, because all of the information about
these objects will be written to NAFILE.DAT file also. If these objects are separated into
another FAP file, they can be part of the compiled overlay and need not be loaded into
the NAFILE.DAT file.
Performance is affected even more if you include logos in the FAP file and you are
sending the data stream to an AFP printer. This is because the LoadFAPBitmap option
in the RunMode control group is set to Yes and is needed to print the logos. This INI
option also affects performance. Avoid it as much as possible.
NOTE: System variables, such as Send Copy To:, cannot be used as an embedded
variable field text area.
Syntax TextMergeParagraph( )
No parameters are necessary. Only include this rule if your image has embedded
variable fields in a text area.
Keep in mind that if you use this rule and the MoveNum rule, you should left-justify the
data to avoid leading spaces.
499
Chapter 5
Image and Field Rules Reference
UnderlineField
Use this image level rule (level 3) to draw an underline beneath a variable field.
The system does not store the line in the NAFILE.DAT file. Instead, it turns on the
underline attribute (U) in the option field of the NAFILE record. You will not see the
underline in the NAFILE.DAT file.
NOTE: This rule does not work with images which have the copy on overflow attribute
enabled.
500
XDB
XDB
Use this field level rule (level 4) to tell the system the field has been mapped in the XDB
database. Use this rule when you have variable fields which are used on multiple
images.
Syntax XDB
Instead of mapping these identical variable fields, like Name and Address, each time
they are used, you can map them once in the XDB database and then map the individual
fields to the XDB rule. This tells the system to look in the XDB database for the
complete mapping information for those variable fields.
Keep in mind, however, that these fields do not exist in the dictionary:
Mapping You can include an asterisk (*) to tell the system to add a space before it concatenates
the search masks. This makes the XDB and token lookup more flexible and lets you use
XML for parent/child mapping.
The child can also be another search mask or XPath, instead of just being the rule
parameter. To maintain the same search mask for the Child as that shown in the above
example, however, you must add an asterisk (*) in front of the Child's data if it was used
as a rule parameter.
You must also set up a correct search mask (XPath) syntax if a child's parent references
another parent.
Understanding the System The use of an asterisk was added in version 11.0 and patched back to version 10.3. Prior
to this change, the system automatically added a comma for you. To make this work for
all implementations, the system cannot assume a comma is always needed. For
example, an XML implementation would not want a comma added before the two
XPaths are appended together.
501
Chapter 5
Image and Field Rules Reference
Parent1 1,HEADREC
Parent1 !/ABC
For the XDB rule, the source field name would contain this set up without a question
mark. Here is an example:
;0;0;Child/Parent1;0;0;Child;0;20;;XDB;;N;N;N;N;7577;2273;11114;
Parent1 !/ABC
Parent2 !/ABC/DEF
502
XDB
Image Editor example If you make the following entries on the Edit DDT tab of the field’s Properties window
in Image Editor:
Offset *
Length 32
Offset *
Length *
File *
Record *
Required *
Rule XDB
Mask *
Data *
503
Chapter 5
Image and Field Rules Reference
XDD
Use this field level rule (level 4) to tell the system the field has been mapped in the XDD
database. Use this rule when you have variable fields which are used on multiple
images.
NOTE: This rule works with the XDD files created by Documaker Studio. The XDB rule
performs a similar function for the data dictionary in Docucreate.
Syntax XDD
Instead of mapping these identical variable fields, like Name and Address, each time
they are used, you can map them once in the XDD database and then map the
individual fields to the XDD rule. This tells the system to look in the XDD database for
the complete mapping information for those variable fields.
Keep in mind, however, that these fields do not exist in the dictionary:
Studio example You could make the following entries in Studio in the Rules section of the Field Options
panel:
Rule XDD
Destination offset *
Source offset *
File *
Length *
Record *
504
XDD
Required *
Mask *
Data *
505
Chapter 5
Image and Field Rules Reference
506
Appendix A
Using Condition Tables and
the Record Dictionary
In this appendix you will find information about...
507
Appendix A
Using Condition Tables and the Record Dictionary
USING CONDITION Condition tables provide a simple and efficient way to set conditions. The system reads
the conditions from an input file and then uses those conditions to trigger images.
TABLES When the system receives a file of conditions which are used by the rules, it then...
• Enter the path for your table files in the MasterResource control group. Use the
TablePath option to define your table files path:
< MasterResource >
TablePath = \T4\UtilTest\MstrRes\TblLib\
• Enter the name of your Condition table file in the Tables control group. Use the
Conditions option to define the Condition table’s file name:
< Tables >
Conditions = CondTbl.tbl
<Records>
Account = Search(61,02)
MeterRead = Search(61,03) Repeating
Detail = Search(61,18) Repeating
<Variables>
ACSA = Record(Account) Offset(487) Length(10) Type(Zone)
Format(14.2,C)
BMV1 = Record(Message) Offset(159) Length(15) Type(Char)
DTV1 = Record(Detail) Offset(181) Length(18) Type(Zone)
Format(18.2,C)
CustomerType = Record(Detail) Offset(100) Length(1) Type(Char)
BIGTEST = Record(Detail) Offset(253) Length(18) Type(Zone)
Format(18.2,C)
RPN(BIGTEST 5 * 30.55 + DTV3 + DTV5 -)
508
Using Condition Tables
NOTE: The variables used above are defined in the Record Dictionary example.
509
Appendix A
Using Condition Tables and the Record Dictionary
Occurrence Counting
Occurrence counting uses the following format:
OccurName : OCCURRENCE(RecordName,ConditionName) MAX(Count)
Here is an example:
Occur1 : OCCURRENCE(Detail,Cond4)
The record Detail and the condition Cond4 are used above as defined in the previous
examples. The occurrence condition Occur1 is driven by the record named Detail. The
record must be of Repeating type.
The condition Cond4 references the variable CustomerType. CustomerType is defined
on the Detail record. There must be a connection between the record and a variable in
the condition for the occurrence count to work correctly.
<Conditions>
MSG1 : LNPRTY < 10000
MSG2 : LNPRTY >= 10000
MSGTRGR1 : Occurrence(Message, MSG1)
totcurrchrg: DTLSECTION = "01" and LNPRIORITY != 00625
totamtdb : TOTAL >= 0 AND BBFLAG = "N"
env : EDIVERT ="0"
emitgrapha : GRAPHTRUE = "28" AND SCALETRUE = "29" AND BUDBLTRUE =
"N"
*Triggers grouping for Tariff, Rider and Detail records
IAMBDTLA : DTLKeyProd = TARKeyProd and DTLTarSeqNo = TARTarSeqNo
REMAINDER : USAGEREM != 0
REGTARIFF : Occurrence(Tariff, REGBUS)
REGBUS : CDBUS != "0700" and CDBUS != "0100"
Setting a maximum count Include the MAX parameter if you want to set a maximum count to be returned. Here is
to return an example of the format for occurrence counting. Here is an example:
Occur1 : OCCURRENCE(Detail,Cond4) MAX(5)
Assume Cond4 is defined as shown here:
Cond4 : CustomerType = "A"
The occurrence condition Occur1 is driven by the record named Detail. The record must
be of Repeating type.
Condition tables and the One example of using Condition tables is to call the RecipCondition rule. In the
RecipCondition rule SETRCPTB.DAT file, call the rule, as shown here:
;ORACLE;REGION2;REG;;01;;;M0;0;0;0;;RecipCondition;Cond1;
;ORACLE;REGION2;REG;;01;;;M0;0;0;0;;RecipCondition;Occur1;
510
Using the Record Dictionary
USING THE The Record Dictionary adds the functionality of defining and accessing variables easily
and efficiently. Variables are loaded from the extract file according to their definitions
RECORD in the Record Dictionary file.
DICTIONARY The Record Dictionary can be used anytime data is needed from the extract list. Data
can be in a numeric, character, or date format.
The Record Dictionary definitions are loaded from a text file. The variables can be
referenced by name once the dictionary file has been loaded. For instance, used with
Condition tables, any variable in the Record Dictionary can be used in a conditional
evaluation.
• <Records> section
• <Variables> section
Parameter Description
RecordName The name that future references to this record will use.
Repeating (Optional) Can be set for any record that is of repeating type. You must
set this flag when you are using the pointer to reference multiple
records.
511
Appendix A
Using Condition Tables and the Record Dictionary
Parameter Description
VariableName The name future references to this variable will use. A variable name
begins with an alpha character and can consist of up to 30 characters.
RecordName The previously defined record (from the Record section) on which this
variable will be found.
Offset The offset into the record where the data is located.
FormatFlags (Optional) Similar to the flags used with MoveNum rule except the
input flags, such as input length and precision, S, and B, are not
needed.
RuleName (Optional) You can include any field rule such as DateFmt or SetAddr2.
The Move_It and MoveNum rules are inherent to the Record Dictionary,
so you do not need to specify them. If you omit the rule, the Move_It
rule functionality is the default.
RuleData (Optional) Any required rule data for the RuleName entry.
RPN Equation Reverse Polish Notation function. See the RPN Function section below.
512
Using the Record Dictionary
RPN Function
The RPN (Reverse Polish Notation) function handles mathematical operations in the
Record Dictionary. The RPN function is used as a parameter of a variable in the Record
Dictionary. Use Reverse Polish Notation to express your equation. Any variables that
are referenced must be previously defined in the Record Dictionary.
513
Appendix A
Using Condition Tables and the Record Dictionary
Available RPN functions These are the available functions in RPN. When using them, remember to place a “#”
sign in front of the function name. This distinguishes a function name from a variable
name.
Function Description
ABS References the most recent value and returns the absolute value of that
number.
CEIL Returns the next largest integer value of a number (round up).
FLOOR Returns the next smallest integer value of a number (round down).
MAX Compares the top two values on the stack and returns the larger.
MIN Compares the top two values on the stack and returns the smaller.
MOD Performs a division with the top two values on the stack and returns the
remainder.
POW Removes the top two values in the stack. Calculates the first to the power of
the second.
SWAP Removes the top two values in the stack and replaces them in reverse order.
514
Record Dictionary Rules
RECORD You can use the following rules to reference the Record Dictionary and its contents. The
system loads variables from the extract file based on the variable definitions in the
DICTIONARY Record Dictionary file.
RULES You can use the Record Dictionary any time you need data from the extract list. The
data can be in a numeric, character, or date format.
Base_FromDataDictToGVM
Use this rule to copy a Record Dictionary value into a global variable. Place this rule in
the AFGJOB.JDT file.
FromDataDict
Use this rule to get data from variable fields from the Record Dictionary. Place this rule
in the DDT file.
FromDataDictToGVM
Use this rule to copy a Record Dictionary value into a global variable. Place this rule in
the DDT or JDT file.
Image_FromDataDictToGVM
Use this image level rule to copy a Record Dictionary value into a global variable. Place
this rule in the DDT file.
Syntax ;Base_FromDataDictToGVM;;
GVM(GlobalVariableName)DATA(DataDictVariableName);;
Example ;Base_FromDataDictToGVM;;GVM(STATION1)DATA(OMR1);;
515
Appendix A
Using Condition Tables and the Record Dictionary
IncDataDictRecPtr
Use this image level rule to increment to the next occurrence of a Record Dictionary
record. Place this rule in the DDT file.
PosDataDictRecPtr
Use this image level rule to advance the record pointer until the condition is true. Place
this rule in the DDT file.
PostIncDataDictRecPtr
Use this image level rule to increment to the next occurrence of a Record Dictionary
record. Place this rule in the DDT file.
PostPosDataDictRecPtr
Use this image level rule to advance the record pointer until the condition is true. Place
this rule in the DDT file.
PreIncDataDictRecPt
Use this image level rule to increment to the next occurrence of a Record Dictionary
record. Place this rule in the DDT file.
516
Record Dictionary Rules
PrePosDataDictRecPtr
Use this image level rule to advance the record pointer until the condition is true. Place
this rule in the DDT file.
Example ;PrePosDataDictRecPtr;Record(Meter)Cond(CompareMeterTariff);;
ResetDataDictRecPtr
Use this rule to reset the pointer of a Record Dictionary record. Place this rule in the
DDT file.
Syntax ;ResetDataDictRecPtr;RecordName;;
Example ;ResetDataDictRecPtr;Meter;;
517
Appendix A
Using Condition Tables and the Record Dictionary
518
Index
- (minus signs) 419
Symbols
# (octothorp) and the RPN function 514
: (colons) 378
= (equals sign) 287
@GetRecsUsed function 291
£ (British pound sterling) 413, 422
Numerics
2-up printing
BatchByPageCount rule 45
ForceNoImages rule 96
InstallCommentLineCallback rule 148
OMR marks 26, 167
ParseComment rule 174
rules used for 26
A
ABS
and the Record Dictionary 514
AccumulateVariableTotal rule
checksum methods 423
defined 36, 301
519
Index
520
boxes ChkDestLenExceeded option 411
expanding 361 COBOL copybooks 358
GroupBegin rule 361 colons
braces IF rule 378
use of 339, 380 ColumnFormat option 99
British pound sterling 413, 422 columns
BuildExcludeList rule populating 320
defined 69 CompBin rule
BuildFormList rule defined 327
defined 70 CompiledFAP option 326
ImportExtract rule 110 compiling
ImportNAPOLExtract rule 120 FAP and FXR files 326
ImportXMLFile rule 133 ConCat rule
BuildFormList rule rule defined 330
defined 70 ConcatFields rule
BuildMasterFormList rule defined 331
defined 71 condition tables
creating a conditions file 508
FSISYS.INI changes 508
C OMR marks 167
overview 508
Conditions group 301
CallBackFunc option 218
Conditions option
CallbackFunc option 219
Conditions table 508
Can Grow attribute 499
OMR marks 168
Can Grow option 399
ConnectFields rule
CanSplitImage indicator 172 defined 331
CanSplitImage rule ConvertWIP rule
defined 323 defined 73
CEIL InitConvertWIP rule 140
and the Record Dictionary 514 coordinates
century SetOrigin rule 474
cut-off 281 SetOriginI rule 478
charts SetOriginM rule 480
removing a series 449 Copy Row option
SetCustChartAxisLabels rule 471 Master DDT Editor 262
CheckCount option 199 CreateChartSeries rule
check-digits 423 defined 334
CheckImageLoaded rule CreateGlbVar rule
defined 326 defined 74
checksum methods CreateRecordList rule
defined 423 defined 75
CheckZeroFontID rule 72 CreateSubExtractList rule
defined 72 defined 336
521
Index
522
digits Error2Manual control group 90
MoveNum rule 419 ErrorHandler rule
dimensions defined 90
ResetImageDimensions rule 452 errors
DivertOMR option 169 unable to print form set message 180
DivertOpt option 169 European Union 286
DocSetNames control group ExcludeForm option 99
ResetDocSetNames rule 196 Exit option
Documaker Workstation Master DDT Editor 260
ConvertWIP rule 73 export files 128
export files 109 export information
ImportNAPOLExtract rule 119 DocumentExport rule 78
WIP transaction processing 9 Ext option
DocumentExport rule DocumentExport rule 78
defined 78 Ext2GVM rule
Docupresentment defined 91
TicketJobProc rule 235 ResetDocSetNames rule 196
dollar signs 408, 412, 419, 420, 422 UseXMLExtract rule 239
DontPrintAlone rule extract files
defined 347 Ext2GVM rule 91
DumpExtList rule formatting numeric data 419
defined 88 ImportExtract rule 109
DumpExtractListToFile rule ImportNAPOLExtract rule 119
defined 89 maximum record length 40
DUP MoveSum rule 427
and the Record Dictionary 514 retrieving messages 398
duplex printing extract lists
OMR marks 169 CreateSubExtractList rule 336
extract records
Array function 320
MultiArray function 321
E ExtractKeyField control group
ImportExtract rule 109
EBCDIC format 420 ImportNAPOLExtract rule 119
Edit menu ExtrFile option 214
Master DDT Editor 261 ImportExtract rule 109
EjectPage rule ImportNAPOLExtract rule 119
defined 348 ImportNAPOLFile rule 125, 127
equals sign 287 ImportXMLFile rule 135
ErrFile option 214 UseXMLExtract rule 239
ERRFILE.DAT file
AllocDebug rule 39
523
Index
FmtNum Rule
F using the ZeroText option 283
FmtNum rule
FAP files defined 356
and DDT files 254 suppressing decimals 282
FED table 189 following images 200, 202
fetypes 285 font IDs
FfSysDte rule checking 72
defined 349 fonts
field format types (fetypes) 285 AddTextLabel rule 37
field level rules 3 MessageFromExtr rule 399
field rules footers
defined 255 group 200
reference 294 ResetImageDimensions rule 452
Field2GVM rule SetGroupOptions rule 455
defined 351 ForceNoImages rule
FieldErrors option 198 defined 96, 357
FieldRule function 381 ImportNAPOLExtract rule 120
IF rule 379 form candidate list 185
fields Form Description Line fields 97
formatting 361 Form option 11
JustFld rule 385 form set level rules 3
mapping 501, 504 form sets
processing fields used repeatedly 358 extracting from archive 152
removing white space 450 loading 70
rotating 326 PrintFormset rule 24
UnderlineField rule 500 removing forms 92, 94
FieldVarsToChartSeries rule FORM.DAT file
defined 353 TerSubstitute rule 496
File menu FORM.DAT files
Master DDT Editor 259 BuildMasterFormList rule 71
File option RULNestedOverFlowProc rule 200
DocumentExport rule 78 single-step processing 24
FilterForm rule Form_Sched_POL_Type field 154
defined 92 format
FilterRecip rule data 278
defined 94 DDT file 255
floating images 473 format arguments
FLOOR FmtDate rule 355, 490
and the Record Dictionary 514 format masks
FmtDate rule MoveNum rule 419
2-digit years 281 formatting
defined 355 dates with the If rule 382
salutations 383
524
FormDescription rule GetLOB rule
defined 97 defined 102
FormDescTable control group 97 ImportExtract rule 110
FormName option ImportNAPOLExtract rule 120
SetOverflowPaperTray rule 221 GetRCBRec rule
forms defined 103
assigning recipients 159 GetRecord function 290
French Francs 412 GetRecord search criteria
FromDataDict rule 515 GetCo rule 101
FromDataDictToGVM rule 515 GetRunDate
FSISYS.INI file defined 104
and Condition tables 508 GlobalFld rule
and the Record Dictionary 511 defined 358
OMR marks 167 Dictionary rule 77
WIP transaction processing 16 GroupBegin rule
FSIUSER.INI file defined 361
OMR marks 167 GroupEnd rule 373
WIP transaction processing 16 GroupEnd rule
defined 373
GroupBegin rule 361
GroupPagination function
G GroupBegin rule 362
groups
GenArc program codes (MessageFromExtr rule) 399
Archive rule 41 creating nested 361
InitArchive rule 139 defining the first image in a group 361
GenData program footers 200
GVM2GVM rule 105 headers 200
hierarchy of rules 3 setting options 455
MergeWIP rule 160 GVM function
restarting 198, 199 ParseComment rule 174
WIP transaction processing 9 GVM option 130
WIPFieldProc rule 241 GVM variable= operator 287
WIPImageProc rule 242
GVM variables
GenDataStopOn control group defined 351
ErrorHandler rule 90 Field2GVM rule 351
RestartJob rule 198 GVM2GVM rule 105
GENSemaphoreName option 215 InstallCommentLineCallback rule 148
GenWIP program ParseComment rule 174
WIP transaction processing 9 ResetDocSetNames rule 196
GetCo rule WIP transaction processing 10
defined 101 GVM2GVM rule
ImportExtract rule 110 defined 105
ImportNAPOLExtract rule 120 ResetDocSetNames rule 196
525
Index
images
H changing attributes 200, 202
defining the first in a group 361
HardExst rule defining the last in a group 373
defined 374 DelImageOccur rule 346
returning data 376 DontPrintAlone rule 347
SpanAndFill rule 486 following 200
headers ForceNoImages rule 96
group 200 group 200
ResetImageDimensions rule 452 keeping together 361, 364
SetGroupOptions rule 455 multi-page 348
hexadecimal values populating lists 320
date formats 280 positioning 474, 478, 480
SetRecipFromImage rule 482
subordinate 200
WIPImageProc rule 242
I ImpExpCombined control group 78
Import_File option
IF rule ImportFile rule 116
defined 378 ImportNAPOLFile rule 126
FieldRule function 381 ImportXMLFile rule 135
handling salutations 383 ImportExtract rule
overflow 379, 383 defined 109
Trim function 381, 382 ImageMapImportData rule 107
use of colons 378
ImportFile rule
IfRecipUsed rule defined 114
defined 106 ImageMapImportData rule 107
SetOutputFromExtrFile rule 218
ImportNAPOLExtract rule
Image Editor defined 119
and rules 255
ImportNAPOLFile rule
assigning rules 273
defined 124
View Compare Report option 276
ImportXMLExtract rule
View Rules Report option 275
defined 130
Image option 11
ImportXMLFile rule
image rules
defined 132
defined 255
ImportXMLFile_GVM option 136
overview 3
in order insertion 202
reference 294
IncDataDictRecPtr rule 516
Image_FromDataDictToGVM rule 515
inches
ImageErrors option 198
SetOriginI rule 478, 480
ImageMapImportData rule
defined 107
526
IncludeDuplicateForms option 98 Introduction 1
IncludeFormDesc option 99
IncludeFormName option 98
IncludeKey2 option 98 J
IncOvSym rule
defined 384
job level rules 3
OvPrint rule 435
UseXMLExtract rule 240 JobInit1 rule
XMLFileExtract rule 252 defined 149
InitMerge rule
defined 141
InitOvFlw rule K
defined 142
InitPageBatchedJob rule key fields
defined 143 SetRecipFromImage rule 482
InitPrint rule Key option
and the NoGenTranTransactionProc rule 24 ImportExtract rule 109
defined 144 ImportNAPOLExtract rule 119
InitSetRecipCache rule Key1Table control group 101
defined 145
Key2PostInc option 98
inline images 324
Key2Prefix option 98
InlineImagesAndBitmaps rule
Key2Table control group 102
defined 146
KickToWIP rule
Insert Row option
defined 390
Master DDT Editor 262
IF rule 381
InsNaHdr rule WIP transaction processing 22
defined 147
KickToWip rule
InstallCommentLineCallback rule defined 390
defined 148
Internet Document Server 2
PrintFormset rule 180
ServerJobProc rule 214 L
labels
SetCustChartAxisLabels rule 471
languages
spelling out numbers 420
527
Index
528
Master rule MODE parameter
defined 397 errors 386
taking precedence 257 order of 385
MasterResource control group Move menu
and Condition tables 508 Master DDT Editor 263
and the Record Dictionary 511 Move_It rule
MoveSum rule 427 = operator 287
OMR marks 168 BldGrpList rule 320
MAX ConcatFields rule 331
and the Record Dictionary 514 defined 411
MaxExtRecLen option JustFld rule 385
AppendGblToExtr rule 40 MoveNum rule 420, 426
ImportExtract rule 109 SpanAndFill rule 486
ImportNAPOLFile rule 125 TextMergeParagraph rule 499
ImportXMLExtract rule 130 MoveExt rule
ImportXMLFile rule 133 defined 416
TblLkUp rule 492 FieldRule function 379
memory MoveIt rule
AllocDebug rule 39 defined 411
freeing 77 MoveMeToPage rule
MergeAFP rule defined 418
AddTextLabel rule 37 MoveNum rule
defined 158 = operator 287
MergeRecipsFromForm rule BldGrpList rule 320
defined 159 checksum methods 423
MergeWIP rule defined 419
checking dates 161 JustFld rule 385
defined 160 TextMergeParagraph rule 499
ResetDocSetNames rule 196 MoveSum rule
message tags defined 427
MessageFromExtr rule 399 MovTbl rule
MessageFromExtr rule defined 429
defined 398 MsgFile option 214
MIN MultFilePrint callback functionality 181
and the Record Dictionary 514 MultiArray function
minus signs 419, 421 BldGrpList rule 321
Mk_Hard rule example 321
defined 406 MultiDataDict control group 164
SetCpyTo rule 470 MultiFileLog option 218
MNumExt rule MultiFilePrint
defined 408 callback function 218
MOD
and the Record Dictionary 514
529
Index
530
PageRange option 49 POW
pages and the Record Dictionary 514
DontPrintAlone rule 347 PowType rule
position of images 474, 478, 480 defined 440
PaginateAndPropagate rule PreImageDAL rule
CanSplitImage rule 323 defined 442
defined 172 PreIncDataDictRecPt rule 516
FormDescription rule 97 PrePosDataDictRecPtr rule 517
OMRMarks rule 167 PreTransDAL rule
SetOverflowPaperTray rule 221 defined 177
UpdatePOLFile rule 237 print batch names
PaginateBeforeThisImage rule SetOutputFromExtrFile rule 218
defined 437 Print Preview
pagination ConvertWIP rule 73
SetGroupOptions rule 455 Print_Batches control group 49
ParseComment rule PrintData rule
defined 174 defined 179
Path option PrintedOutputFile control group 49
DocumentExport rule 78
Printer option 49
PDF files
printer trays
PrintFormset rule 180
changing 221
PDF format 2
PrinterInfo control group 49
PDFImportDPI option 307
PrintFormset control group 180
percent signs 419
PrintFormset rule
performance defined 180
compiling FAP and FXR files 326 NoGenTranTransactionProc rule 24
InlineImagesAndBitmaps rule 146
PrintIf rule
TextMergeParagraph rule 499
defined 444
performance mode JDT file 8 HardExst rule 375, 376
phone numbers 488 printing
POLFILE.DAT file InitPrint rule 144
DocumentExport rule 78 PrintFormset rule 24
RULNestedOverFlowProc rule 203 unable to print form set message 180
UpdatePOLFile rule 237 processing rules
WriteOutput rule 25, 246 adding 5, 27
Port option 49, 219 adding image and field rules 253
PosDataDictRecPtr rule 516 ProcessQueue rule
PostImageDAL rule defined 182
defined 438 DelImageOccur rule 346
PostIncDataDictRecPtr rule 516 ProcessRecord rule
PostPosDataDictRecPtr rule 516 defined 183
PostTransDAL rule
defined 175
531
Index
532
ResetOvSym rule RULNestedOverFlowProc rule
defined 454 defined 200
Restart control group 199 RULServerJobProc option 215
restarting GenData 199 RULStandardFieldProc rule
RestartJob rule defined 204
defined 198 WIP transaction processing 10
Retrieve option WIPFieldProc rule 241
Master DDT Editor 262 RULStandardImageProc rule
reverse insertion logic 202 DDT files 120
Reverse Polish Notation defined 205
and the Record Dictionary 513 WIP transaction processing 10
row heights WIPImageProc rule 242
adjusting 361 RULStandardJobProc rule
RPDSemaphoreName option 215 defined 206
TicketJobProc 235
RstFile option 199
RULStandardTransactionProc rule
RTF files
defined 207
PrintFormset rule 180
WIP transaction processing 9
RULCheckTransaction rule
RULTestTransaction rule
defined 199
defined 208
rules
run date
assigning rules with the Image Editor 273
GetRunDate rule 104
copying a rule assignment record 262
data definition table 255 RunDate rule
deleting a rule assignment record 262 defined 456
FAP and DDT files 254 RunMode control group 411, 499
field level rules 3 RunSetRcpTbl rule 209
field rules 255 BuildMasterFormList rule 24
for 2-up printing 26 defined 209
for single-step processing 24 DelImageOccur rule 346
form set level rules 3 ImportExtract rule 110
hierarchy 3 ImportNAPOLExtract rule 120
image and field rules reference 293, 294 RULNestedOverFlowProc rule 200
image level rules 3 RunTriggers rule 210
image rules 255 RunUser rule
inserting a rule assignment record 262 defined 211
JDT rules reference 28
job level rules 3
moving a rule assignment 263
retrieving a record from the Data Dictionary 262
S
save rule assignments 259
View Compare Report option 276 salutations 383
view rules report 259 SAPMove_It rule
View Rules Report option 275 defined 459
533
Index
534
StandardFieldProc rule TablesPath field 154
defined 233 TblFile option 392
WIP transaction processing 10 TblLkUp rule
WIPFieldProc rule 241 defined 492
WriteNAFile rule 25 XDD rule 501, 504
StandardImageProc rule TblText rule
defined 234 defined 494
WIP transaction processing 10 temporary extract lists
WIPImageProc rule 242 CreateSubExtractList rule 336
StartFromFirstForm option 99 TerSubstitute rule
state compliance 192 defined 496
state location table 189 Test control group 208
status codes testing
MergeWIP rule 160 RULTestTransaction rule 208
WIP transaction processing 9 text tables 392
StayTogether function 364 TextMergeParagraph rule
StrngFmt rule CheckImageLoaded rule 326
defined 488 defined 499
subordinate images 200 TEXTTBL option 494
sum TicketJobProc option 235
variables 301 TicketJobProc rule
suppressing defined 235
decimals 282 TIFF files
SWAP AddMultiPageTIFF rule 311
and the Record Dictionary 514 top dimensions
symbolic lookup operators 289 ResetImageDimensions rule 452
SysDate rule trailing spaces
defined 490 MoveNum rule 420
system date 490 TransactionErrors option 198
TransErrCode option 163
TranslateErrors rule
T defined 236
tray selection
SetOverflowPaperTray rule 221
table row sizes 492
Trigger2Archive control group
TablePath option
Archive rule 41
and Condition tables 508
InitArchive rule 139
and the Record Dictionary 511
Trigger2WIP control group 10
MoveSum rule 427
DocumentExport rule 78
OMR marks 168
GVM2GVM rule 105
Tables control group
ResetDocSetNames rule 196
and Condition tables 508
triggers
OMR marks 168
assigning recipients 159
535
Index
536
WriteRCBFiles rule XMLFileExtract option
defined 247 XMLFileExtract rule 251
SetOutputFromExtrFile rule 219 XMLFileExtract rule
WriteRCBWithPageCount rule defined 250
defined 248 XMLFileExtractName option
XMLFileExtract rule 251
XMLTags2GVM control group 130, 133
X XPath
UseXMLExtract rule 239
XMLFileExtract rule 251
XDB files
GlobalFld rule 358
MultipleDataDictionaryFiles rule 164
records 358 Y
XDB rule
defined 501 years
XDD rule forcing 2-digit 281
defined 504 length 83
XML files
importing 132
importing transactions 128
PostTransDAL rule 176
Z
UseXMLExtract rule 238
XMLFileExtract rule 250 zero format 282
XMLExtract option ZeroText option 283
UseXMLExtract rule 239 ZIP codes
XMLFileExtract rule 250, 251 OMR marks 167
537
Index
538