usubjid ARMCD ARM 7959011 GPRTNKYKNSLWPCJEHGKG ACCUVE1\ACCUVE2\ACCUVE3\ACCUVE4\ACCUVE5\ACCUVE6\ACCUVE7\ACCUVE8\ACCUVE9\ACCUVE10
I want to split above single record into 10 records and each record should contains subjid, armcd and arm and each record should populate respected ARM and ARMCD accordingly. By using the delimeter '\' successfully I have spatted ARM variable into 10 records but I am unable to split ARMCD accordingly with below program. Can anyone please help on this. ARMCD has 20 characters and each 2 chars are belongs to 1 treatment. GP = ACCUVE1 RT = ACCUVE2 NK = ACCUVE3.....
In final dataset I need usubjid ARMCD ARM 7959011 GP ACCUVE1 7959011 RT ACCUVE2 7959011 NK ACCUVE3................
Thanks in advance.
MY PROGRAM: %let p = 0;
data trtp_bi_test; set t58;
do i = 1 to 10; length trtpval $200; trtp = "TRT"||put(i,z2.)||"P"; trtplbl = "Planned Treatment for Period "||put(i,z2.); trtpval = scan(armf,i,"\");
j=0; trtpcdval = substr(armcd, i+j, 2); j+1; output; end; run;
... View more