SASUnit Examples  Version 1.5.0
_render_assertforeignkeyrep.sas
Go to the documentation of this file.
1 
26 %macro _render_assertForeignKeyRep (i_assertype =
27  ,i_repdata =
28  ,i_scnid =
29  ,i_casid =
30  ,i_tstid =
31  ,o_html = 0
32  ,o_path =
33  );
34 
35  %local l_path dsid cnt rc;
36 
37  TITLE;FOOTNOTE;
38 
39  %_getTestSubfolder (i_assertType=assertForeignKey
40  ,i_root =&g_target./tst
41  ,i_scnid =&i_scnid.
42  ,i_casid =&i_casid.
43  ,i_tstid =&i_tstid.
44  ,r_path =l_path
45  );
46 
47  LIBNAME _afkLib "&l_path";
48 
49  %IF (&o_html.) %then %do;
50  ODS HTML4 FILE="&o_path/_&i_scnid._&i_casid._&i_tstid._foreignkey_rep.html" stylesheet=(url="css/SAS_SASUnit.css")
51  encoding="&g_rep_encoding.";
52  %END;
53 
54  TITLE "&g_nls_reportForeignKey_011";
55  TITLE2 "&g_nls_reportForeignKey_013.";
56  %IF %sysfunc(exist(_afkLib.keyNotFndLookUp)) %THEN %DO;
57  %LET dsid=%sysfunc(open(_afkLib.keyNotFndLookUp));
58  %LET cnt =%sysfunc(attrn(&dsid,nlobs));
59  %LET rc =%sysfunc(close(&dsid));
60  %IF &cnt ne 0 %THEN %DO;
61  PROC PRINT DATA=_afkLib.keyNotFndLookUp;
62  RUN;
63  %END;
64  %ELSE %DO;
65  DATA _null_;
66  FILE PRINT;
67  PUT "&g_nls_reportForeignKey_012.";
68  RUN;
69  %END;
70  %END;
71  %ELSE %DO;
72  DATA _null_;
73  FILE PRINT;
74  PUT "&g_nls_reportForeignKey_015.";
75  RUN;
76  %END;
77  TITLE;
78  TITLE2 "&g_nls_reportForeignKey_014.";
79  %_reportFooter(o_html=&o_html.);
80  %IF %sysfunc(exist(_afkLib.keyNotFndMstr)) %THEN %DO;
81  %LET dsid=%sysfunc(open(_afkLib.keyNotFndMstr));
82  %LET cnt =%sysfunc(attrn(&dsid,nlobs));
83  %LET rc =%sysfunc(close(&dsid));
84 
85  %IF &cnt ne 0 %THEN %DO;
86  PROC PRINT DATA=_afkLib.keyNotFndMstr;
87  RUN;
88  %END;
89  %ELSE %DO;
90  DATA _null_;
91  FILE PRINT;
92  PUT "&g_nls_reportForeignKey_015.";
93  RUN;
94  %END;
95  %END;
96  %ELSE %DO;
97  DATA _null_;
98  FILE PRINT;
99  PUT "&g_nls_reportForeignKey_012.";
100  RUN;
101  %END;
102 
103  %IF (&o_html.) %then %do;
104  %_closeHtmlPage;
105  %END;
106 
107  TITLE; FOOTNOTE;
108 %MEND _render_assertForeignKeyRep;