Hello, I read this post. I have a similar issue. Could you please review and let me know the proper syntax for this operation. DATA PASS_STR FAIL_STR; SET PREVDATA; MATCH='Y'; ARRAY ASTR(*) _CHARACTER_; CW=COUNTW(ACTIVE_ING,';'); DO C=1 TO CW BY 1 WHILE(MATCH='Y'); ASTR=SCAN(ACTIVE_ING,C,';'); F=INDEX(STRENGTH,TRIM(ASTR(C))); IF F=0 THEN MATCH='N'; PUT C CW F MATCH ASTR(C) STRENGTH; END; IF MATCH='Y' THEN OUTPUT PASS_STR; IF MATCH='N' THEN OUTPUT FAIL_STR; The result I get is the following. As you can see as soon as the program starts reading the second array component it fails to find the ASTR(2). 1 4 15 Y 1.23 1.25MG;1.25MG;1.23MG;1.25MG 2 4 0 N 1.25 1.25MG;1.25MG;1.23MG;1.25MG 1 4 1 Y 1.875 1.875MG;1.875MG;1.875MG;1.875MG 2 4 0 N 1.875 1.875MG;1.875MG;1.875MG;1.875MG 1 4 1 Y 2.5 2.5MG;2.5MG;2.5MG;2.5MG 2 4 0 N 2.5 2.5MG;2.5MG;2.5MG;2.5MG When I take the SCAN process outside of the above DO loop and run it in its own DO loop I am not able to populate beyond ASTR(2). I get zero values for ASTR(3) and ASTR(4) values DO C=1 TO CW BY 1; ASTR(C)=SCAN(ACTIVE_STRENGTH,C,';'); END; Can you please review the situation above and assist.
... View more