Hello,
I received this notes and I don't know how to solve it. I don't like the red line into the log.
data class;
set sashelp.class;
run;
filename dest1 "/finsys/bicoe/BICOE/CR_SR_Prj/LEGO_2358_Qualtrics/test/json_class.txt";
%macro test;
DATA _NULL_;
file print PS=32767;
set class end=lastrec;
if _N_ eq 1 then do;
put '{';
end;
put '{ "Name" :"' Name +(-1)'",'@;
put ' "Sex" :"'Sex +(-1)'",'@;
put ' "Age" :"'Age +(-1)','@;
put ' "Height" :"'Height +(-1)'",'@;
put ' "embeddedData" : {'@;
put '}'@;
put '"Weight":"'Weight +(-1)'",'@;
if lastrec eq 1 then do;
put '}';
end;
else do;
put ',';
end;
RUN;
%mend test;
%test;
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space
between a quoted string and the succeeding identifier is recommended.
How to solve that issue ?
I believe we have suggested a time or two to post the LOG when you have questions that involve the content of the log.
Like this:
404 %macro test; 405 DATA _NULL_; 406 file print PS=32767; 407 set class end=lastrec; 408 if _N_ eq 1 then do; 409 put '{'; 410 end; 411 put '{ "Name" :"' Name +(-1)'",'@; 412 put ' "Sex" :"'Sex +(-1)'",'@; ----------- 49 413 put ' "Age" :"'Age +(-1)','@; ----------- 49 414 put ' "Height" :"'Height +(-1)'",'@; -------------- 49 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 415 put ' "embeddedData" : {'@; 416 put '}'@; 417 put '"Weight":"'Weight +(-1)'",'@; ------------ 49 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 418 if lastrec eq 1 then do; 419 put '}'; 420 end; 421 else do; 422 put ','; 423 end; 424 RUN; 425 %mend test; NOTE: The macro TEST completed compilation without errors. 7 instructions 528 bytes. 426 %test;
Place a space between any closing quote and any character immediately after unless using 'd (date) 'dt (datetime) 't (time) or 'n (name literal indicator). That is what the message is about. Currently your code has 'A 'S 'H 'W each of these triggering the warning that there may be a chance that the next release of SAS code might treat those differently than the result when you used them this time.
With the change:
427 %macro test; 428 DATA _NULL_; 429 file print PS=32767; 430 set class end=lastrec; 431 if _N_ eq 1 then do; 432 put '{'; 433 end; 434 put '{ "Name" :"' Name +(-1)'",'@; 435 put ' "Sex" :"' Sex +(-1)'",'@; 436 put ' "Age" :"' Age +(-1)','@; 437 put ' "Height" :"' Height +(-1)'",'@; 438 put ' "embeddedData" : {'@; 439 put '}'@; 440 put '"Weight":"' Weight +(-1)'",'@; 441 if lastrec eq 1 then do; 442 put '}'; 443 end; 444 else do; 445 put ','; 446 end; 447 RUN; 448 %mend test; NOTE: The macro TEST completed compilation without errors. 7 instructions 532 bytes. 449 %test;
No warnings.
And results:
{ { "Name" :"Alfred", "Sex" :"M", "Age" :"14, "Height" :"69", "embeddedData" : {}"Weight":"112.5",, { "Name" :"Alice", "Sex" :"F", "Age" :"13, "Height" :"56.5", "embeddedData" : {}"Weight":"84",, { "Name" :"Barbara", "Sex" :"F", "Age" :"13, "Height" :"65.3", "embeddedData" : {}"Weight":"98",, { "Name" :"Carol", "Sex" :"F", "Age" :"14, "Height" :"62.8", "embeddedData" : {}"Weight":"102.5",, { "Name" :"Henry", "Sex" :"M", "Age" :"14, "Height" :"63.5", "embeddedData" : {}"Weight":"102.5",, { "Name" :"James", "Sex" :"M", "Age" :"12, "Height" :"57.3", "embeddedData" : {}"Weight":"83",, { "Name" :"Jane", "Sex" :"F", "Age" :"12, "Height" :"59.8", "embeddedData" : {}"Weight":"84.5",, { "Name" :"Janet", "Sex" :"F", "Age" :"15, "Height" :"62.5", "embeddedData" : {}"Weight":"112.5",, { "Name" :"Jeffrey", "Sex" :"M", "Age" :"13, "Height" :"62.5", "embeddedData" : {}"Weight":"84",, { "Name" :"John", "Sex" :"M", "Age" :"12, "Height" :"59", "embeddedData" : {}"Weight":"99.5",, { "Name" :"Joyce", "Sex" :"F", "Age" :"11, "Height" :"51.3", "embeddedData" : {}"Weight":"50.5",, { "Name" :"Judy", "Sex" :"F", "Age" :"14, "Height" :"64.3", "embeddedData" : {}"Weight":"90",, { "Name" :"Louise", "Sex" :"F", "Age" :"12, "Height" :"56.3", "embeddedData" : {}"Weight":"77",, { "Name" :"Mary", "Sex" :"F", "Age" :"15, "Height" :"66.5", "embeddedData" : {}"Weight":"112",, { "Name" :"Philip", "Sex" :"M", "Age" :"16, "Height" :"72", "embeddedData" : {}"Weight":"150",, { "Name" :"Robert", "Sex" :"M", "Age" :"12, "Height" :"64.8", "embeddedData" : {}"Weight":"128",, { "Name" :"Ronald", "Sex" :"M", "Age" :"15, "Height" :"67", "embeddedData" : {}"Weight":"133",, { "Name" :"Thomas", "Sex" :"M", "Age" :"11, "Height" :"57.5", "embeddedData" : {}"Weight":"85",, { "Name" :"William", "Sex" :"M", "Age" :"15, "Height" :"66.5", "embeddedData" : {}"Weight":"112",}
Add spaces before your "at" characters in your program on PUT statements. Example:
put '{ "Name" :"' Name +(-1)'",' @;
Same issue:
data class;
set sashelp.class;
run;
filename dest1 "/finsys/bicoe/BICOE/CR_SR_Prj/LEGO_2358_Qualtrics/test/json_class.txt";
%macro test;
DATA _NULL_;
file print PS=32767;
set class end=lastrec;
if _N_ eq 1 then do;
put '{';
end;
put '{ "Name" :"' Name +(-1)'",';
put ' "Sex" :"'Sex +(-1)'",';
put ' "Age" :"'Age +(-1)',' ;
put ' "Height" :"'Height +(-1)'",' ;
put ' "embeddedData" : {' ;
put '}';
put '"Weight":"'Weight +(-1)'",' ;
if lastrec eq 1 then do;
put '}';
end;
else do;
put ',';
end;
RUN;
%mend test;
%test;
I believe we have suggested a time or two to post the LOG when you have questions that involve the content of the log.
Like this:
404 %macro test; 405 DATA _NULL_; 406 file print PS=32767; 407 set class end=lastrec; 408 if _N_ eq 1 then do; 409 put '{'; 410 end; 411 put '{ "Name" :"' Name +(-1)'",'@; 412 put ' "Sex" :"'Sex +(-1)'",'@; ----------- 49 413 put ' "Age" :"'Age +(-1)','@; ----------- 49 414 put ' "Height" :"'Height +(-1)'",'@; -------------- 49 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 415 put ' "embeddedData" : {'@; 416 put '}'@; 417 put '"Weight":"'Weight +(-1)'",'@; ------------ 49 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 418 if lastrec eq 1 then do; 419 put '}'; 420 end; 421 else do; 422 put ','; 423 end; 424 RUN; 425 %mend test; NOTE: The macro TEST completed compilation without errors. 7 instructions 528 bytes. 426 %test;
Place a space between any closing quote and any character immediately after unless using 'd (date) 'dt (datetime) 't (time) or 'n (name literal indicator). That is what the message is about. Currently your code has 'A 'S 'H 'W each of these triggering the warning that there may be a chance that the next release of SAS code might treat those differently than the result when you used them this time.
With the change:
427 %macro test; 428 DATA _NULL_; 429 file print PS=32767; 430 set class end=lastrec; 431 if _N_ eq 1 then do; 432 put '{'; 433 end; 434 put '{ "Name" :"' Name +(-1)'",'@; 435 put ' "Sex" :"' Sex +(-1)'",'@; 436 put ' "Age" :"' Age +(-1)','@; 437 put ' "Height" :"' Height +(-1)'",'@; 438 put ' "embeddedData" : {'@; 439 put '}'@; 440 put '"Weight":"' Weight +(-1)'",'@; 441 if lastrec eq 1 then do; 442 put '}'; 443 end; 444 else do; 445 put ','; 446 end; 447 RUN; 448 %mend test; NOTE: The macro TEST completed compilation without errors. 7 instructions 532 bytes. 449 %test;
No warnings.
And results:
{ { "Name" :"Alfred", "Sex" :"M", "Age" :"14, "Height" :"69", "embeddedData" : {}"Weight":"112.5",, { "Name" :"Alice", "Sex" :"F", "Age" :"13, "Height" :"56.5", "embeddedData" : {}"Weight":"84",, { "Name" :"Barbara", "Sex" :"F", "Age" :"13, "Height" :"65.3", "embeddedData" : {}"Weight":"98",, { "Name" :"Carol", "Sex" :"F", "Age" :"14, "Height" :"62.8", "embeddedData" : {}"Weight":"102.5",, { "Name" :"Henry", "Sex" :"M", "Age" :"14, "Height" :"63.5", "embeddedData" : {}"Weight":"102.5",, { "Name" :"James", "Sex" :"M", "Age" :"12, "Height" :"57.3", "embeddedData" : {}"Weight":"83",, { "Name" :"Jane", "Sex" :"F", "Age" :"12, "Height" :"59.8", "embeddedData" : {}"Weight":"84.5",, { "Name" :"Janet", "Sex" :"F", "Age" :"15, "Height" :"62.5", "embeddedData" : {}"Weight":"112.5",, { "Name" :"Jeffrey", "Sex" :"M", "Age" :"13, "Height" :"62.5", "embeddedData" : {}"Weight":"84",, { "Name" :"John", "Sex" :"M", "Age" :"12, "Height" :"59", "embeddedData" : {}"Weight":"99.5",, { "Name" :"Joyce", "Sex" :"F", "Age" :"11, "Height" :"51.3", "embeddedData" : {}"Weight":"50.5",, { "Name" :"Judy", "Sex" :"F", "Age" :"14, "Height" :"64.3", "embeddedData" : {}"Weight":"90",, { "Name" :"Louise", "Sex" :"F", "Age" :"12, "Height" :"56.3", "embeddedData" : {}"Weight":"77",, { "Name" :"Mary", "Sex" :"F", "Age" :"15, "Height" :"66.5", "embeddedData" : {}"Weight":"112",, { "Name" :"Philip", "Sex" :"M", "Age" :"16, "Height" :"72", "embeddedData" : {}"Weight":"150",, { "Name" :"Robert", "Sex" :"M", "Age" :"12, "Height" :"64.8", "embeddedData" : {}"Weight":"128",, { "Name" :"Ronald", "Sex" :"M", "Age" :"15, "Height" :"67", "embeddedData" : {}"Weight":"133",, { "Name" :"Thomas", "Sex" :"M", "Age" :"11, "Height" :"57.5", "embeddedData" : {}"Weight":"85",, { "Name" :"William", "Sex" :"M", "Age" :"15, "Height" :"66.5", "embeddedData" : {}"Weight":"112",}
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.