It is possible to assign data to an XPAC database using an XCM. Typically the XCM will read a file and then place data from the file into records and data fields in the database, specified by you. This process may be used for a number of reasons.
• | You may plan to regularly update the reserves data, so to make this process as smooth as possible, an XCM is used to read the data file. |
• | The file containing the data may be in a non-standard format which the XPAC import facility cannot accept. |
It is always possible to manipulate non-standard data files in spreadsheets or text editors and to then use the Import facility to get the data into XPAC. This manipulation process is manual, however, and is therefore prone to errors. If the data files are being regularly updated, then the manual manipulation of the file also becomes tedious. Whilst it may initially take longer to write an XCM than to manipulate the file, the XCM can be used many times over and modified if the data file changes.
If you require information or assistance with writing such an XCM, please contact RPMGlobal.
If you are willing to try writing an XCM to assign data yourself, then the following commands and functions should be referenced:
Open - opens a data file so that it can be read. This should only be done once so it is usually placed within either the IsFirstInRange or IsLastInRange test.
Line Input - reads sequential lines from a specified file, into a string variable.
GetRecNum - returns a record number greater than zero if the specified record already exists.
CreateRecord - used to create a record in the database, given its position in level numbers and names.
DbWriteValue - writes a value to a specified record in a database.
Close - closes a data file after it has been read. This should only be done once so it is placed within either the IsFirstInRange or IsLastInRange test.
It is also possible to read data from and write data to any program that conforms to the Microsoft OLE standards. This includes Microsoft Excel. Contact RPMGlobal for more information. |