UPDATE
Updates a flat file record during Enrichment processing.
Note: LOOKUP must be successfully performed (on a file, not a table) before UPDATE can take place.
The updated file will always be sorted by the key. Any empty records in the update file will be deleted.
The updated record will be padded with spaces if the updated record value is shorter than the original record.
Syntax
UPDATE(filename,string)
Arguments
Argument | Description | Default |
---|---|---|
filename | The name of the LOOKUP file to update. Enrichment opens the file before processing the document. This file cannot be used for any other operations except LOOKUP. filename may be up to 255 characters in length. | None |
string | Record to update in the file. | None |
Result
Result | Description | |
---|---|---|
Return | A null string (''). | |
%%RC | One of the following: | |
0 | No error. | |
1 | No record has been looked up with the LOOKUP function to update. | |
2 | Data would exceed record length in the LOOKUP file. | |
3 | LOOKUP file open failed or file empty. | |
4 | Attempted to change key. | |
%%RM | A null string (''). | |
%%RV | Always set to 0. |
Example
Function Call | Return | %%RC |
---|---|---|
UPDATE(DD:input1, %%bob) Looked up record is updated. |
'' | 0 |