data have;
input product_code product_1 product_id;
datalines;
1011/1234 abc 99
1011 def 88
1023/4098/7778/8989 gcj 76
;
run;
data want;
input product_code product_1 product_id;
datalines;
1011 abc 99
1234 abc 99
1011 def 88
1023 gcj 76
4098 gcj 76
7778 gcj 76
8989 gcj 76
;
run;
You need
69 data have; 70 input product_code product_1 product_id; 71 datalines; NOTE: Invalid data for product_code in line 72 1-9. NOTE: Invalid data for product_1 in line 72 34-36. REGEL: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0 72 1011/1234 abc 99 product_code=. product_1=. product_id=99 _ERROR_=1 _N_=1 NOTE: Invalid data for product_1 in line 73 39-41. 73 1011 def 88 product_code=1011 product_1=. product_id=88 _ERROR_=1 _N_=2 NOTE: Invalid data for product_code in line 74 1-19. NOTE: Invalid data for product_1 in line 74 26-28. 74 1023/4098/7778/8989 gcj 76 product_code=. product_1=. product_id=76 _ERROR_=1 _N_=3
As a very important learning experience, fix this first.
You need
Thanks a ton
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.