Special Features of PROIV Files |
DEVELOPER |
Special Features of PROIV Files
PROIV's standard record format for files is variable length records and variable length fields (file variables). This minimizes disk utilization and increases flexibility during development since record layout and field length may be modified with minimal impact.
Every record is uniquely identified by one or more file variables, which make up the key of the record.
Two special fields may appear in a key:
-
company/division code (CO/DIV)
-
auto sequence number
Company/Division Code
PROIV can restrict access so that records pertaining to a subdivision of a company are only accessible through terminals or users assigned to that subdivision. Specifying a file as a CO/DIV file causes all records written to that file to automatically contain the company/division code as the first part of the key (the specified key length must include three characters for the company/division code). Records written in this manner are only retrievable if the CO/DIV assigned to a user matches that of the record.
Auto-Sequence Number
This is a one-to-five digit number with limit 32,767; that is appended to the end of the keys of records in an auto-sequenced file. The auto-sequence number has a user defined field name and must be defined as the last key variable in the record layout.
In an auto-sequenced paging screen that uses an auto-sequenced file, special provision is made for insertion or deletion of records so that the auto-sequenced field is re-numbered to maintain continuity.
For example auto-sequenced files might be used for invoice detail lines, the key being the invoice number and the auto-sequence number supplying the detail line numbers. Detail lines may be added, inserted, or deleted and line numbers will remain consecutive.
Topic ID: 730015