Flat file using LoadRequest
Use LoadRequest.exe to load a fixed length text file of request data. In this file, each Relais field is mandatory. The number of spaces for each field is indicated below in the Relais Length column.
Campo | Lunghezza |
---|---|
first line: |
The first line of the file contains an 8 digit, zero-filled record count of the number of requests in the file, excluding header and trailer records. If no requests are sent the count is 0. This line must end with a carriage return (0D) and line feed (0A). |
data: |
Each request is represented by 2 lines of text. Line 1 is for bibliographic information, line 2 for requester (patron or library) information. The data elements for line 1 and line 2 are defined in the attached spreadsheet. All occurrences of "\n", "\t" or "\r" within the text must be replaced or removed. Both lines must end with a carriage return (0D) and line feed (0A). |
last line: | The last line of the file contains the trailer record: ZZZZZZZZ (these must be uppercase) This line must end with a carriage return (0D) and line feed (0A). |
Sample file (with 2 requests):
00000002
Line 1..…
Line 2..…
Line 1..…
Line 2..…
ZZZZZZZZ
When using line 2 to send patron information the following assumptions are made:
- The patron record does not need to exist in Relais at the time the requests are loaded.
- The library symbol of the library to whom the patron belongs must be included in line 1 (column 371). In addition, a library record must exist in Relais for this library symbol.
- LoadRequest uses PATRON_ID (line 2, column 1554) to determine whether a patron record already exists:
- if no - the data in line 2 of this request is used to create a patron record.
- if yes - the data in line 2 of this request is used to replace the existing patron record.
- Where the tables in the attached spreadsheet indicate ID_LIBRARY or ID_PATRON, the data is used to populate the corresponding field in ID_PATRON if the PATRON_ID exists in line 2 of the data, else it is used to populate ID_LIBRARY.
- If PATRON_ID exists do not use any of the data to overwrite the corresponding library record.