|
38 | 38 | %goto exit_macro;
|
39 | 39 | %end;
|
40 | 40 |
|
41 |
| - %* Spoecify either jsonpath or jsonfref; |
| 41 | + %* Specify either jsonpath or jsonfref; |
42 | 42 | %if %sysevalf(%superq(jsonpath)=, boolean) and %sysevalf(%superq(jsonfref)=, boolean) %then %do;
|
43 | 43 | %put ERR%str(OR): [&sysmacroname] Both jsonpath and jsonfref are missing. Specify one of them.;
|
44 | 44 | %goto exit_macro;
|
45 | 45 | %end;
|
46 | 46 |
|
47 |
| - |
48 |
| - %* Spoecify either jsonpath or jsonfref; |
| 47 | + %* Specify either jsonpath or jsonfref; |
49 | 48 | %if %sysevalf(%superq(jsonpath)=, boolean)=0 and %sysevalf(%superq(jsonfref)=, boolean)=0 %then %do;
|
50 | 49 | %put ERR%str(OR): [&sysmacroname] Specify either jsonpath or jsonfref, but not both.;
|
51 | 50 | %goto exit_macro;
|
|
54 | 53 | %* Check for non-existing jsonpath;
|
55 | 54 | %if %sysevalf(%superq(jsonpath)=, boolean)=0 %then %do;
|
56 | 55 | %if not %sysfunc(fileexist(&jsonpath)) %then %do;
|
57 |
| - %put ERR%str(OR): [&sysmacroname] JSON file jsonpath=&jsonpath does not exist.; |
| 56 | + %put ERR%str(OR): [&sysmacroname] JSON file &=jsonpath does not exist.; |
| 57 | + %goto exit_macro; |
| 58 | + %end; |
| 59 | + %end; |
| 60 | + |
| 61 | + %* Check for non-assigned jsonfref; |
| 62 | + %if %sysevalf(%superq(jsonfref)=, boolean)=0 %then %do; |
| 63 | + %if %sysfunc(fileref(&jsonfref)) gt 0 %then %do; |
| 64 | + %put ERR%str(OR): [&sysmacroname] JSON file reference &=jsonfref is not assigned.; |
| 65 | + %put %sysfunc(sysmsg()); |
| 66 | + %goto exit_macro; |
| 67 | + %end; |
| 68 | + %if %sysfunc(fileref(&jsonfref)) lt 0 %then %do; |
| 69 | + %put ERR%str(OR): [&sysmacroname] JSON file referenced by &=jsonfref (%sysfunc(pathname(&jsonfref))) does not exist.; |
58 | 70 | %goto exit_macro;
|
59 | 71 | %end;
|
60 | 72 | %end;
|
61 | 73 |
|
62 | 74 | %* Check if datalib has been assigned ;
|
63 | 75 | %if %sysevalf(%superq(datalib)=, boolean)=0 %then %do;
|
64 | 76 | %if (%sysfunc(libref(&datalib)) ne 0 ) %then %do;
|
65 |
| - %put ERR%str(OR): [&sysmacroname] datalib library &datalib has not been assigned.; |
| 77 | + %put ERR%str(OR): [&sysmacroname] datalib library &=datalib has not been assigned.; |
| 78 | + %put %sysfunc(sysmsg()); |
66 | 79 | %goto exit_macro;
|
67 | 80 | %end;
|
68 | 81 | %end;
|
69 | 82 |
|
70 | 83 | %* Check if metadatalib has been assigned ;
|
71 | 84 | %if %sysevalf(%superq(metadatalib)=, boolean)=0 %then %do;
|
72 | 85 | %if (%sysfunc(libref(&metadatalib)) ne 0 ) %then %do;
|
73 |
| - %put ERR%str(OR): [&sysmacroname] metadatalib library &metadatalib has not been assigned.; |
| 86 | + %put ERR%str(OR): [&sysmacroname] metadatalib library &=metadatalib has not been assigned.; |
| 87 | + %put %sysfunc(sysmsg()); |
74 | 88 | %goto exit_macro;
|
75 | 89 | %end;
|
76 | 90 | %end;
|
77 | 91 |
|
78 | 92 | %* Rule: dropseqvar has to be Y or N *;
|
79 | 93 | %if "%substr(%upcase(&dropseqvar),1,1)" ne "Y" and "%substr(%upcase(&dropseqvar),1,1)" ne "N" %then
|
80 | 94 | %do;
|
81 |
| - %put ERR%str(OR): [&sysmacroname] Required macro parameter dropseqvar=&dropseqvar must be Y or N.; |
| 95 | + %put ERR%str(OR): [&sysmacroname] Required macro parameter &=dropseqvar must be Y or N.; |
82 | 96 | %goto exit_macro;
|
83 | 97 | %end;
|
84 | 98 |
|
85 | 99 | %* Rule: savemetadata has to be Y or N *;
|
86 | 100 | %if "%substr(%upcase(&savemetadata),1,1)" ne "Y" and "%substr(%upcase(&savemetadata),1,1)" ne "N" %then
|
87 | 101 | %do;
|
88 |
| - %put ERR%str(OR): [&sysmacroname] Required macro parameter savemetadata=&savemetadata must be Y or N.; |
| 102 | + %put ERR%str(OR): [&sysmacroname] Required macro parameter &=savemetadata must be Y or N.; |
89 | 103 | %goto exit_macro;
|
90 | 104 | %end;
|
91 | 105 |
|
|
0 commit comments