![]() File Variable and Date Handling |
![]() Virtual Machine |
![]() |
This area discusses how File Variables and dates are handled by PROIV and Reality:
When a File Variable that is not explicitly referenced, the corresponding record field is unaltered, or is set empty for new records that are added to the file. This is true for all File Variables regardless of their type.
DATE File Variables have a Display Mask of DATE4 set on the Variable Properties window. Click here for more information about the Variable Properties window.
The following table illustrates how these Date File Variables are handled.
Data Read from Reality file |
Resultant value of DATE File Variable |
Display code DATE shows |
Data written to Reality File |
‘’ |
|
‘’ |
|
‘0’ |
61360 |
31/12/1967 |
‘0’ |
‘-61359’ |
1 |
01/01/1800 |
‘-61359’ |
‘-61360’ |
0 - The following error message is generated: '190 - Date Outside Supported Range In Reality File - filename' |
no output |
‘-61360’ |
‘-61391’ |
-31 - The following error message is generated: '190 - Date Outside Supported Range In Reality File - filename' |
no output |
‘-61361’ |
Reality uses a different base date to PROIV when storing dates (31st December 1967 for Reality and 31st December 1799 for PROIV). However, numeric fields that are identified by the DATE display code in the File Definition are automatically adjusted to take account of this.
Zero is not currently a valid date value in PROIV and appears as a blank field if a display code of DATE is used.
If a null date in Reality is to be displayed as a blank field in PROIV, and a date field for which no value has been input is to be stored as a null, then REALNODATE should be set to zero (see below).
![]() |
If the value chosen for REALNODATE corresponds to a valid date, that date value cannot be written back to a Reality file because a null is written instead. For example, if REALNODATE is set to 0, it is not possible to write the date 31/12/1799 to a Reality file. It is written as a null. |
PROIV cannot handle dates prior to 1st January 1800 and any attempt to read an item where such a date is referenced results in a non-fatal error.
Reality dates outside the range supported by PROIV (i.e. prior to 1/1/1800 (day 1)) cannot be displayed or input by PROIV but can be read and written successfully provided their processing is restricted to adding or subtracting a number (of days) from the value.
To do this, zero and negative numbers must become valid dates, and at that time, zero will no longer be suitable as the resultant value for an empty date field. For this reason, application logic should not attempt to detect empty date fields by testing for zero, but should test for &#@NODATE instead.
The following table illustrates how these File Variables are handled.
Data Read from Reality file |
Resultant value of File Variable |
Data written to Reality file |
'' |
0 |
'0' |
'0' |
0 |
'0' |
![]() |
Empty attributes, values, or subvalues within a record or subrecord are treated as zero when read into an active non-DATE numeric File Variable. If this is likely to cause problems (for example, in the case of a date, or a credit limit) then define the File Variable as a DATA TYPE 'A' field in PROIV so that the values ' ' and '0' can be distinguished. |
Empty values are treated as non-existent subrecords in Subfiles.
Topic ID: 720104