20.07.2014 Views

DOC1 Programmer's Guide

DOC1 Programmer's Guide

DOC1 Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Programming PCE<br />

call userexit<br />

Function Calls an external program via the user exit feature.<br />

Syntax<br />

[let result = ] call userexit id [with parameter in cell...];<br />

Parameters result a variable to accept a return value<br />

id<br />

text; indicates a user exit identifier<br />

parameter a variable or array element containing text or a page of output datastream<br />

cell<br />

integer; indicates a PCE memory cell.<br />

Effects<br />

The user defined program specified by the identifier id in the User Exit Control File assigned<br />

in the PCE initialization file is executed. The program can be passed one or more optional<br />

parameters values using the defined PCE memory cell.<br />

Comments<br />

If a value is returned by the user exit program will be stored in result if this is coded.<br />

User exits of type PRINTSTREAM should return a self-contained segment of output<br />

datastream. This can be included within an existing page using the insert object command.<br />

Parameters can only contain a STRING or PAGE data types; NUMBER and DATE data<br />

types are not supported. The PCE memory cell for the parameter must be in the range 9900–<br />

9998 and must match the appropriate number specified in the <strong>DOC1</strong> Engine Data Exchange<br />

API function being used with the user program. The result value, if used, will always be of<br />

type STRING.<br />

Refer to the “User Exits” on page 191 in this guide for more information about the<br />

communication process between PCE and user programs, returning AFP image objects and<br />

coding the User Exit Control File.<br />

Example ...<br />

let = "Customer_Name";<br />

let = "Customer_Number";<br />

call userexit "WriteName" with in 9900;<br />

let = call userexit "GetAddress" with in 9901;<br />

let = substring 2 5;<br />

change DIJelement<br />

Function<br />

Syntax<br />

Updates the value of an element of an entry in a <strong>DOC1</strong> Interchange Journal (DIJ).<br />

change DIJelement<br />

{Name|AddrLine1...AddrLine6|City|Region|PostalCode|Country|Phone|<br />

NumberOfPages|SkippedPages} value to value in dijRecord ;<br />

Parameters value text; the value with which the DIJ element is updated<br />

dijRecord a variable containing a DIJ record.<br />

34

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

Saved successfully!

Ooh no, something went wrong!