66 data finalReport;
67 length ProdName $ 20;
68 merge stock product;
69 by product_id;
NOTE: There were 3 observations read from the data set WORK.STOCK.
NOTE: There were 3 observations read from the data set WORK.PRODUCT.
NOTE: The data set WORK.FINALREPORT has 3 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
The first attribute seen for a variable is the one used in the DATA step. Given that the Work.Stock dataset is positioned first on the MERGE statement, the variable ProdName would have a format of $CHAR15. in the new dataset Work.finalReport. The LENGTH statement only gives the variable ProdName a predefined maximum length (but does not change the format).
This is visible by running PROC CONTENTS for the merged dataset, work.FinalReport:
The one and only FREE resource for general SAS online training as well as study guides for the SAS Base Certification. My goal is to create the SAS Certification prep guide that I never found but always wanted. This should also be a place to come if you are new to the language but are simply looking for online SAS training.