/*------------------------------------------------------------*
* program:     cdisc80.sas                                     *
* Description: Case #80. Unknown CO For CO domains, this identifies CO domain reference to an unknown related domain.*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** Create some data to be selected ***;
data templib.co(label="Comments");
 attrib STUDYID  	 label="Study Identifier" length=$100;
 attrib  DOMAIN  	 label="Domain Abbreviation" length=$100; 
 attrib  RDOMAIN  	 label="Related Domain Abbreviation" length=$100;
 attrib  USUBJID  	 label="Unique Subject Identifier" length=$100;
 attrib  COSEQ  	 label="Sequence Number" length=8;
 attrib  IDVAR  	 label="Identifying Variable" length=$100;
 attrib  IDVARVAL  	 label="Identifying Variable Value" length=$100; 
 attrib  COREF  	 label="Comment Reference" length=$100;
 attrib  COVAL  	 label="Comment" length=$100;
 attrib  COEVAL  	 label="Evaluator" length=$100;
 attrib  CODTC  	 label="Date/Time of Comment" length=$100;
 STUDYID  ='test'; DOMAIN  ='test'; RDOMAIN  ='DV'; USUBJID  ='test'; COSEQ  =1; IDVAR  ='test'; IDVARVAL  ='test'; COREF  ='test'; COVAL  ='test'; COEVAL  ='test'; CODTC  ='test';
 output;
 STUDYID  ='test'; DOMAIN  ='test'; RDOMAIN  ='DS'; USUBJID  ='test'; COSEQ  =1; IDVAR  ='test'; IDVARVAL  ='test'; COREF  ='test'; COVAL  ='test'; COEVAL  ='test'; CODTC  ='test';
 output;
 STUDYID  ='test'; DOMAIN  ='test'; RDOMAIN  ='AE'; USUBJID  ='test'; COSEQ  =1; IDVAR  ='test'; IDVARVAL  ='test'; COREF  ='test'; COVAL  ='test'; COEVAL  ='test'; CODTC  ='test';
 output;
 STUDYID  ='test'; DOMAIN  ='test'; RDOMAIN  ='LB'; USUBJID  ='test'; COSEQ  =1; IDVAR  ='test'; IDVARVAL  ='test'; COREF  ='test'; COVAL  ='test'; COEVAL  ='test'; CODTC  ='test';
 output;
 STUDYID  ='test'; DOMAIN  ='test'; RDOMAIN  ='INV'; USUBJID  ='test'; COSEQ  =1; IDVAR  ='test'; IDVARVAL  ='test'; COREF  ='test'; COVAL  ='test'; COEVAL  ='test'; CODTC  ='test';
 output;
 STUDYID  ='test'; DOMAIN  ='test'; RDOMAIN  ='SE'; USUBJID  ='test'; COSEQ  =1; IDVAR  ='test'; IDVARVAL  ='test'; COREF  ='test'; COVAL  ='test'; COEVAL  ='test'; CODTC  ='test';
 output;
run;
%cdisc(datlib=templib,datname=co);
