READFIELDS
Usage
TIBCO iProcess Workspace (Windows)
This function is also used with batch-oriented broker applications. For example, a TIBCO BusinessWorks service running as an iProcess broker via SSO use READFIELDS (in the step Initial script) on a file stored in SWDIR.
Read values of selected fields from a file.
Syntax
READFIELDS (filename, fieldlist, excluding, delete, srcfmt)
where:
| • | filename is a text string specifying the input file as a pathname or simple filename. |
The following environment variables may be used in a pathname:
| — | TEMP, the temporary directory on the client. |
| — | HOME, the user’s queue directory on the server, SWDIR\queues\username. |
| — | SWDIR, the iProcess system directory where the TIBCO iProcess Engine is installed. |
| • | fieldlist is a text string specifying the list of fields to be read, separated by commas. (Wildcard characters * and ? may be included.) |
| • | excluding is a text string specifying the list of fields not to be read, even though selected in fieldlist. |
| • | delete is a numeric value specifying which files to delete after reading data: |
|
Value |
File(s) to delete |
|
0 |
Delete no files |
|
1 |
Delete memo files |
|
4 |
Delete input file |
|
5 |
Delete both memo files and input file |
| • | srcfmt is a numeric value which is ignored in a standard installation (set to 0). |
Returns
One of the following numeric values:
|
Value |
Description |
|
0 |
Error |
|
1 |
Success |
The input file is a text file in abox format, i.e. each line consists of a fieldname, followed by a comma, followed by the field value in characters. Variables in the input file must be in uppercase.
Examples
TIBCO iProcess Modeler:
This (Windows) example reads all field values from abox file DATA in the directory specified by the TEMP environment variable, deleting any memo files and the abox file after completion.
READFIELDS("%TEMP%\DATA","*","",5,0)
SWDIR\logs\sw_warn is not updated).TIBCO Business Studio:
IPEEnvironmentUtil.READFIELDS("%TEMP%\\DATA","*","",5,0);