If you specify the CODE= option in an UPDATE statement and there are uninitialized variables in the SAS® program, PROC IMSTAT updates every record in the target table. To avoid unintended updates, you should initialize all variables introduced in the user supplied SAS program. To initialize a variable, use a FORMAT statement, a LENGTH statement, or an assignment statement. (This does not apply to variables already in the active table being updated.)
Failure to initialize a variable can result in all records being updated. There are no notes in the SAS Log to indicate this has happened.
Here is an example. Suppose we load the SAS data set Sashelp.cars to LASR and run the following,
where pgm1 is a fileref to a text file. Suppose the text file includes the following line of code:
Since MANUFACTURER does not exist in Sashelp.cars, the value of ORIGIN is updated to "Japan" in every record of Lasr.cars.
To avoid this problem, initialize the variable MANUFACTURER in the SAS program using any of the following methods:
For related notes about using the CODE= option in the UPDATE statement in PROC IMSTAT, see Problem Note 55419 and Problem Note 55420.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS LASR Analytic Server | Microsoft® Windows® for x64 | 9.4 TS1M2 | 9.4 TS1M3 |
64-bit Enabled AIX | 9.4 TS1M2 | 9.4 TS1M3 | ||
64-bit Enabled Solaris | 9.4 TS1M2 | 9.4 TS1M3 | ||
Linux for x64 | 9.4 TS1M2 | 9.4 TS1M3 | ||
Solaris for x64 | 9.4 TS1M2 | 9.4 TS1M3 |