Hello Everyone, I am trying to create a three-dimensional array from the following data: Warehouse Locations Product_Line Product_Grp_ID Product_Cat_ID Warehouse 21 0 0 A2100 21 0 1 A2101 21 1 0 A2110 21 1 1 A2111 21 2 0 A2120 21 2 1 A2121 22 0 0 B2200 22 0 1 B2201 22 1 0 B2210 22 1 1 B2211 22 2 0 B2220 22 2 1 B2221 So I am supposed to produce a program that is supposed to pull the warehouse number from a three-dimensional array. This is my program so far: data warehouse_locations (keep=Product_ID Product_Name Product_Line Product_Grp_ID Product_Cat_ID Warehouse); drop PL PG PC; /*set few_warehouses;*/ format Warehouse $6.; array wrhse{21:22,0:2,0:1} (21,0,0, 21,0,1, 21,1,0, 21,1,1, 21,2,0 21,2,1, 22,0,0, 22,0,1, 22,1,0, 22,1,1, 22,2,0, 22,2,1); Product_Line=input(substr(Prod_ID,1,2),2.); /*Using substr function to extract the number of the Product Line*/ Product_Grp_ID=substr(Prod_ID,4,1); /*Using substr function to extract the number of the Group_ID*/ Product_Cat_ID=substr(Prod_ID,12,1); /*Using substr function to extract the Catalog ID*/ PL=Product_Line; /*Setting temp variable PL to Product_Line*/ PG=Product_Grp_ID; PC=Product_Cat_ID; /*Setting temp variable PC to Product_Cat_ID*/ do until(last.warehouse); set few_warehouses; by warehouse; Warehouse=wrhse{PL,PG,PC}; end; run; In the log, I get the following message: WARNING: Too many values for initialization of the array wrhse. Excess values are ignored. However, my data does run, but it does not pull the warehouse numbers like I need. Could someone look at my code and let me know what is wrong with it? Thanks, Alisa
... View more