Thew values are numeric and as the dataset is in excel when i imported it became character, but somehow it is not working.
attaching new data. ignore the values as it is test data but if visitnum is 1 with same studyid,usubjid,paramcd and aval is missing then the rest of the records for same studyid,usubjid,paramcd chg and pchg should be missing.
data WORK.MYDATA;
infile datalines dsd truncover;
input usubjid:$16. studyid:$3. paramcd:$5. aval:3. ablf:$1. base:3. chg:3. pchg:2. visit:$9. visitnum:32.;
datalines4;
AA1-US1103-S3317,AA1,URIN,.,,,.,.,Visit 1,1,,
AA1-US1103-S3317,AA1,URIN,3.6,,.,.,.,,,,
AA1-US1103-S3317,AA1,URIN,3.6,,.,.,.,Visit 6,6,,
AA1-US1103-S3317,AA1,URIN,3.6,Y,3.6,0,0,Visit 6,6,,
AA1-US1103-S3317,AA1,URIN,4.2,,3.6,.,.,Visit 10,10,,
AA1-US1103-S3317,AA1,URIN,4.2,,3.6,0.6,17,Visit 10,10,,
AA1-US1103-S3317,AA1,URIN,5.6,,3.6,2,56,,,,
AA1-US1103-S3317,AA1,URIN,5.6,,3.6,.,.,Visit 12,12,,
AA1-US1103-S3317,AA1,URIN,5.6,,3.6,2,56,Visit 12,12,,
AA1-US1103-S2317,AA1,PLASM,39,Y,42,-3,-7,Visit 1,1,,
AA1-US1103-S2317,AA1,PLASM,42,,42,0,0,,,,
AA1-US1103-S2317,AA1,PLASM,42,,39,3,8,Visit 5,5,,
AA1-US1103-S2317,AA1,PLASM,42,,42,.,.,Visit 6,6,,
AA1-US1103-S2317,AA1,PLASM,39,,42,-3,-7,Visit 10,10,,
AA1-US1103-S2317,AA1,PLASM,39,,39,0,0,Visit 10,10,,
AA1-US1103-S2317,AA1,PLASM,40,,42,-2,-5,,,,
AA1-US1103-S2317,AA1,URIN,40,,40,0,3,Visit 1,1,,
AA1-US1103-S2317,AA1,URIN,42,,40,0,0,Visit 12,12,,
AA1-US1103-S2317,AA1,URIN,42,,40,-2,8,Visit 12,12,,
;;;;
Sorry for the trouble but somehow it is mystery why it is not working.
... View more