Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要你对 SAS Studio 的帮助,我得到了这个包含 20000 种产品的变量,每个产品都有这个 ID,这个 ID 以 001,002,003....200 开头,如何将这个超级变量拆分为每个产品的变量
使用数组存储 200 个产品,遍历变量bigvar并scan()关闭每个产品,存储到相应的数组元素中。
bigvar
scan()
数据要; 设置有; 数组 prd{*} prod1-prod200 ; nprod = countw(bigvar,',') ; 做 i = 1 到 nprod ; prd{i} = scan(bigvar,i,',') ; 结尾 ; 放入 nprod ; 跑 ;