


Apart from loading constants instead of file values as described in the preceding section, it is possible to load the special values STAMP, USER, USERGROUP, DATE, TIME, TIMESTAMP, TRUE, and FALSE.
For this purpose, one of the above mentioned keywords must be provided instead of a position indication.
Example:
DATALOAD TABLE item
modified_by USER
modified_on DATE
modified_at TIME
itno 01-08
descr 09-39 NULL IF POS 09-11 = ' '
stock 40-43 INTEGER NULL IF POS 40-43 INTEGER < '0'
INFILE ...
The keyword USER designates the current user name. If the current user belongs to a usergroup, then USERGROUP designates the name of this group. Otherwise, USERGROUP is equivalent to USER. The column to be loaded with one of these values must have the type CHAR (n) with n >= 8.
The keyword DATE designates the current date and the keyword TIME, the current time and the keyword TIMESTAMP, the current timestamp. The column to be loaded with one of these values must have the corresponding type.
The keyword STAMP designates a unique value generated by ADABAS. This value can only be loaded into a column having the type CHAR (n) BYTE with n >= 8.
TRUE and FALSE can be specified to set a BOOLEAN column to a constant value.
It is also possible to load user-generated sequence numbers with optional initial values and distances.
Example:
DATALOAD TABLE item
itno SEQNO 10000 5
descr 09-39 NULL IF POS 09-11 = ' '
stock 40-43 INTEGER NULL IF POS 40-43 INTEGER < '0'
INFILE ...
The keyword SEQNO indicates that sequence numbers are to be generated. The first number after SEQNO is the initial value (and the first value to be loaded), the second number indicates the distance between the values to be loaded. Both numbers may be negative.
If only one number is specified after SEQNO, it is increased by 1 for every step. If no number is specified after SEQNO, the sequence of numbers begins with 0 and is increased by 1 for every step.
The computable range of numbers is regarded as cyclical; i.e., the value succeeding the greatest representable value is the smallest representable value. In this way, as many sequence numbers can be generated as needed, and these numbers may be repeated several times, if need be. One column with the type FIXED (10) is sufficient to store these numbers.
If the input file is empty, special constants are also not loaded.
Note that in SQLMODE ANSI, only the function USER is allowed.
In SQLMODE DB2, USER and CURRENT SQLID are mapped to USER, CURRENT DATE is mapped to DATE, CURRENT TIME is mapped to TIME, and CURRENT TIMESTAMP generates a timestamp value.
In SQLMODE ORACLE, the functions USER, SYSDATE (generating a timestamp value), and UID (generating a unique user identification) are available.


