Retrieves data from an array and places it into a date, string, or numeric variable.
Dates, strings, or numeric variables (not database columns) can be destination variables. Numeric variables (decimal, float, integer) are copied from number fields. String variables are copied from char, text, or date fields. Date variables are copied from char, text, or date fields.
When a date field is copied to a string variable, Production Reporting converts the date to a string in 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.
If the destination is a date variable, the string extracted from the source must be in the format specified by SQR_DB_DATE_FORMAT, one of the database-dependent formats (see Table 61, Default Formats by Database), or the database-independent format 'SYYYYMMDD[HH24[MI[SS[NNNNNN]]]]'.
If the array's field names are listed, Production Reporting takes the values from the fields and occurrences specified. If the array's field names are not listed, the values are taken from consecutively defined fields in the array.
Array element and field occurrence numbers can be numeric literals (such as 123) or numeric variables (such as #j). If no field occurrence is stated, occurrence zero is used.
The following example copies $name, $start_date, and #salary from the first three fields in the #j'th element of the emps array.
get $name $start_date #salary from emps(#j)
The following example copies #city_tot and #county_tot from the fields cities and counties in the #j'th element of the states array.
get #city_tot #county_tot from states(#j) cities counties
The following example copies $code from the #j'th occurrence of the code field in the #n'th element of the codes array.
get $code from codes(#n) code(#j)