Use route_vrec() to send data to the SFM and to a route, or to send data through all production objects when the reserved keyword “ENGINE” is used.
If the transaction ID argument (TranID) has a value of “ENGINE:”
The SFM checks the transaction’s form and content against all production objects available to it:
The form of the data must match at least one field object set available to the current SFM.
The data must match the datatypes assigned to the field object definitions (for example, a field defined as a numeric datatype may not include alphabetic characters).
The field data must pass any non-optional qualification objects attached to the field objects.
The field data must pass any non-optional qualification objects attached to the production object.
If the transaction passes these tests for one or more production objects, the SFM writes it to the transaction log file and returns a value of 1 to the acquisition AIM to indicate that it received the transaction successfully.
If the transaction does not pass any of these tests, the SFM writes the transaction to its unrouteable log file and returns a value of -6 to the acquisition AIM.
If the transaction ID argument (TranID) has a value other than “ENGINE,” the SFM checks its configuration for a corresponding route, and routes the transaction to delivery AIMs identified by the route. If the SFM does not find a route record, it writes the data into its unrouteable log file, and returns a value of -2 to the acquisition AIM.
route_vrec(int [flavor] Flavor, string [in] SRCRef, string [in] TranID, {string | blob} [in] Data);
Parameter |
Description |
---|---|
Flavor |
The flavor assigned to the SFM module that should receive the data. If you are running only one copy of the SFM, use a value of zero in this argument. |
SRCRef |
The Source Reference Name. A user-supplied reference name for the current Acquisition AIM. Allowable characters include A – Z, a – z, 0 – 9. The string datatype is required. |
TranID |
A transaction ID reference for the particular record type carried in the current Data argument. The SFM uses this transaction ID to route the transaction to the correct delivery AIM. A value of “ENGINE” routes the data through all available production objects. A custom engine allows you to group multiple production objects into one engine routing package.
|
Data |
A blob or string field that contains the transaction’s data. |
Integer.
Value |
Description |
---|---|
> 0 |
The SFM has accepted the record and has written it to the transaction log file. |
0 |
General error. Check the error log and the standard UNIX “errno” field. |
-1 |
A transaction could not be passed to the SFM. Your program should check the unrouteable error log to find out why this occurred. |
-2 |
The SFM could not find the names of the route (also known as the transaction ID) in its configuration file. |
-3 |
The SFM could not process the transaction because the log file was full. |
-4 |
The SFM received a transaction larger than the log file’s transaction size. |
-5 |
The SFM refused the record because it is in Refuse mode. |
-6 |
The transaction data did not pass the field object validation or production object qualification checks in the referenced production objects. |
-7 |
There are no valid destinations for the production objects for which the transaction qualified. Occurs when the production objects use the setDestName and/or the setDestNameData dynamic routing built-ins to override the production object’s configured destinations, but the built-ins do not specify valid destinations. |
-8 |
The SFM could not process the transaction because an invalid destination was specified with a dynamic routing built-in filter function. |
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |