data ds; infile datelines; input num; cards; 1234567891 12345678901 run; in above data I have observation length 10 but when I am use if condition not work . like ex: data ds2 ds3; set ds; if length(num) eq 10 then output ds2; else output ds3; run; above data if condition not work anyone can explain me , above data by default length take best12. how to find exact length .
... View more
I want find the correct protocol format my protocol format is first letters 3 alphabets,4th position is underscore, 5th to 6th position is alphabets,7th position backward slash , after 7th to 12th position value values after 13th position '-' , 14th to 15th position value. eg (apc_ec/01234-43), how to verify each value in protocol variable , anyone can please me .
... View more
Read only correct format of protocol_id . eg: cds_ap/01234-3 this the correct format of protocol a1s_ap/01234-3 this the wrong format of protocol 123_ap/01234-3 this the wrong format protocol length is same in every observation , but format is incorrect , protocol format is wrong kept into another dataset . how verify the format wrong or correct .
... View more
in my data I am verify format like data ds; infile datalines; input Protcol_ID/NO$ 14. Site ID Subject Id; datalines ; ONC_AP/01234-1 102. aaa ONC_AP/01234-7 103. abc ON1_AP/01234-2. 105. bbc O1C_AP/01234-2. 108. ccd ; run; in my data cam verify 1 .length above 15 char 2.protocal id must be 15 charcter charcter 3.first starting 3 letters must be charcter only 4.first 3 letters a numerical values its an error 5.first 3 letters a combination alphabets and numeric values it's an error how too verify right protocol format , how test length position values specification , any can please help how test the protocol using if conditions first 3 letters no special charcter and spaces its an error
... View more
above data i have 15 char observation only output ,remaining more than 15 char or below 15 char should be deleted please help me on that .
... View more
data ds ; infile datalines ; input name$ 15; cards; abc_11234567898 abc_112345678989 ; run; in above data I have 15 characters length observation only only , above 15 character length I don't. please anyone help me how to remove above 15 char length variable.
... View more