Source variable or literal to move into the array. Numeric variables, literals, and database columns can be put into number (decimal, float, integer) fields. String variables, literals, and database columns can be put into char, text, or date fields. Date variables can be put into date, char, or text fields.
When a date variable or column is moved into a text or char array field, the date is converted to a string according to the following rules:
For DATETIME columns and Production Reporting DATE variables, Production Reporting uses the format specified by SQR_DB_DATE_FORMAT. If not set, Production Reporting uses the first database-dependent format in Table 61, Default Formats by Database.
For DATE columns, Production Reporting uses the format specified by SQR_DB_DATE_ONLY_FORMAT. If not set, Production Reporting uses the format in Table 62, DATE Column Formats.
For TIME columns, Production Reporting uses the format specified by SQR_DB_TIME_ONLY_FORMAT. If not set, Production Reporting uses the format in Table 63, TIME Column Formats.
When a string variable, column, or literal is moved to a date array field, the string must be in the format specified by SQR_DB_DATE_FORMAT, one of the database-dependent formats in Table 61, Default Formats by Database, or the database-independent format 'SYYYYMMDD[HH24[MI[SS[NNNNNN]]]]'.
If array fields are listed, data is placed into each field in the sequence it is listed, in the occurrence specified of that field.
If array fields are not listed, data is placed into consecutive fields in the order they were defined in CREATE-ARRAY; data is copied into occurrence zero of each field of the element specified in the array.
Array element and field occurrence numbers can be numeric literals (123) or numeric variables (#j).
If no occurrence is specified, occurrence zero is used.
Columns retrieved from the database and Production Reporting variables or literals can be moved into an array. The array must have been created previously using CREATE-ARRAY.
In the following example, the four variables &name, #count, $date1, and $code is placed into the first four fields defined in the names array. The data is put into the #j'th element of the array.
put &name #count $date1 $code into names(#j)
The following command places #j2, #j3, and #j4 into the zero through 2nd occurrences of the tot field in the #j'th element of the totals array.
put #j2 #j3 #j4 into totals(#j) tot(0) tot(1) tot(2)
The following command copies #count into the #j2'th occurrence of the count field in the #j'th element of the states array.
put #count into states(#j) count(#j2)