Use the following steps as a guide to setting up a NOF interface when your System initiates transactions for output to your NOF program.
Defining Message Layout
To define the format of the message string, create an <<Ispec>> class with
IsExternal set to True and AutomaticEntryCapable set to True.
For example, an <<Ispec>> class INOF might have the following attributes:
Name | Primitive | Length | Decimal |
---|---|---|---|
Custcode | Number | 4 | |
Bal | Number | 8 | 2 |
Status | String | 1 | |
InMessage | String | 80 |
Customizing the NOF Skeleton Program
In customizing the NOF skeleton program for Agile Business Suite-initiated transactions, you will have to consider the same modifications as for NOF program-initiated transactions.
Naming the NOF Program
The COMS program name of your NOF program should be limited to 17 characters.
Defining Logic
The following logic is required in the sending Ispec:
Define NOF as the destination for the output by moving NON.FORMAT to Glb.Destination. If Glb.DestNoForm is not set, the COMS/CONFIG/NOF file must be loaded before the COMSTP program starts.
Identify the NOF program by moving the COMS program name of the NOF program receiving the Automatic Entry to Glb.DestNoForm.
If Glb.DestNoForm is not set, it defaults to windowNOF. In addition, the COMS configuration file COMS/CONFIG/NOF must be loaded before starting any COMSTP program that sends Automatic Entries to the NOF program.
Include the logic commands that writes to the <<ispec>> class instance being used as the Automatic Entry Buffer. The message string is not sent to the NOF program until the Store() method is invoked.
Test the value of Glb.Status.
The application waits for a response from the NOF program. Your logic should test Glb.Status for the conditions listed in the following table.
If the value of Glb.Status is … | Then the AUTO was … |
---|---|
spaces | Successful, but no data was returned. |
DATA | Successful, and data is returned. |
***** | Unsuccessful. The NOF program encountered an error. |
NODB | Unsuccessful. The NOF program was not available. |
TOUT | A timeout period defined in the NOF program was exceeded. |
BLOCK | The NOF transaction was sent, but the NOF program is now unavailable. The status of the transaction is unknown. |
BUSY | NOF program had insufficient resources to process the AUTO. |
Move Data from the Automatic Entry Buffer.
Unformatted data from the NOF program is sent to the formatted Automatic Entry Buffer. In your logic, move data from the Automatic Entry buffer to attributes or Group attributes for use in your subsequent logic. For example, an <<Ispec>> class INOF might have the following attributes:
Name | Primitive | Length | Decimal |
---|---|---|---|
Custcode | Number | 4 | |
Limit | Number | 8 | 2 |
InMessage | String | 15 |
Customer codes and credit limits are sent to an intelligent external terminal by a NOF program named NOFPRO to identify delinquent Customer Accounts. For each delinquent account, the following data is returned to the application:
Customer code
A status flag (for example, EXCEEDED)
Age of the account
The following logic executes this process:
Assume that the logic has access to the following <<Group>> attribute, SDMSG
Owner | Attribute Name | Primitive | Length | Decimal |
---|---|---|---|---|
SDMSG | SDSTATUS | String | 10 | |
SDMSG | SDAGE | Number | 4 | 0 |
GLB.DESTINATION := "NON.FORMAT" GLB.DESTNOFORM := "NOFPRO" INOF_Auto.initialize() INOF_Auto.CUSTCODE := CUST.CUSTCODE INOF_Auto.LIMIT := CUST.LIMIT INOF_AUTO.Store() If GLB.STATUS = "DATA" SDMSG := INOF_Auto.INMESSAGE If SDSTATUS = "EXCEEDED" AND SDAGE > 90 <Other logic> End End