Problem Note 63342: BY-group processing for a DATA step that runs in SASĀ® Cloud Analytic Services (CAS) against a view can generate an incorrect number of observations
Using BY-group processing in a DATA step running in CAS to conditionally generate observations from a view can result in an incorrect number of observations in the output data set.
Using the FIRST. or LAST. variables to conditionally output observations from a view that is running in CAS can create an incorrect number of observations. The number of observations can change with each execution of the code.
In the following example, CASUSER.CARSVIEW is a view that is located in the CASUSER caslib. The view was created from the SASHELP.CARS data set. Running the following DATA step in CAS then results in more observations than the expected 38 observations:
data casuser.viewoutput;
set casuser.carsview;
by make;
if first.make;
run;
The workaround is to create a data set from the view before using BY-group processing to subset the data.
data casuser.carsdata;
set casuser.carsview;
run;
data casuser.finaloutput;
set casuser.carsdata;
by make;
if first.make;
run;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS Viya | Linux for x64 | 3.4 | 3.5 | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When observations are conditionally written, BY-group processing in a DATA step running in CAS against a view creates an incorrect number of observations in the output data set.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2019-02-19 13:23:41 |
Date Created: | 2018-12-07 09:42:28 |