20.07.2014 Views

DOC1 Programmer's Guide

DOC1 Programmer's Guide

DOC1 Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Running PCE<br />

Creating an initialization file<br />

A PCE initialization file (INI) is a text file that can<br />

be created using any standard text editor.<br />

The file format consists of several distinct sections in<br />

which can be coded a range of keywords and their<br />

associated parameters. Section names are enclosed<br />

in angle brackets. All code following a section name<br />

is considered to belong to that section until the next<br />

section name is encountered. For example:<br />

<br />

CustomerName="SA Loans"<br />

;keycode passed as a symbol<br />

Keycode=%pcekey%<br />

<br />

Messages=messages.dat<br />

Input=doc1\pce\scripts\job1.txt<br />

TranslationTable=c:\doc1\doc1ttab.ett<br />

TextSubs=c:\doc1\resource\myets.ets<br />

HIP=c:\doc1host\billjob.hip<br />

<br />

AsciiToAfpds=27<br />

;other System values in this include file<br />

#include doc1static.ini<br />

<br />

DisableColor=DOWNGRADE<br />

<br />

Day1=Dimanche<br />

Sections and keywords within sections can be coded<br />

in any order. Most keywords have default parameters<br />

that are used if the keyword is not coded in the file.<br />

Parameters are normally coded as literal values but<br />

can be specified dynamically if required by defining<br />

them wholly or partly as symbols. Values can be<br />

assigned to such symbols when starting the<br />

<strong>DOC1</strong>PCE program. Within the INI file symbols<br />

are referenced by coding the name to be used within<br />

percentage signs as in the example above. Symbol<br />

names can also be referenced within the PCE script<br />

itself by using the symbol command.<br />

You can also use an #include statement to add the<br />

contents of an existing INI file to another. This<br />

allows you to reuse common INI settings. The<br />

contents of an include file are added at the point<br />

where the #include statement is encountered.<br />

<br />

IF SECTIONS OR KEYWORDS ARE REPEATED WITHIN AN<br />

INI FILE OR #INCLUDE FILES THE LAST ELEMENT TO BE<br />

ENCOUNTERED WILL BE USED (WORKING<br />

TOP-TO-BOTTOM).<br />

Text following a semi-colon up to the start of the<br />

next line is as a comment.<br />

At minimum a PCE INI must contain:<br />

• a section with both<br />

CustomerName and Keycode keywords<br />

• a section with at least the Messages and<br />

Input keywords<br />

• a section with at least the<br />

PrintStream and Resolution keywords<br />

If your script uses functions that return regional<br />

information (such as date, day or monthname) you<br />

may often want to create one or more <br />

sections to indicate how the values are to be<br />

formatted. You may include up to 10 different<br />

sections: , …<br />

.<br />

If your script adds presentation objects to existing<br />

pages the INI will also often contain a section that<br />

allows you to customize some aspects of the output<br />

datastream being manipulated (for instance<br />

or ) and/or a <br />

section for non-standard environment settings.<br />

The following pages provide a reference for all<br />

available INI sections and their associated keywords.<br />

100

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!