Hi!
Please, help.
I have to start code from example
But have error
ERROR: Compilation error.
ERROR: No package or extension for type package json.
proc ds2;
data _null_;
method init();
dcl package json j;
dcl double dblVal;
dcl int rc;
dcl nvarchar(30) jsontxt;
j= _NEW_ JSON( );
rc = j.createWriter();
if rc=0 then rc = j.writeArrayOpen();
if rc=0 then rc = j.writeString( ' Hello World! ' );
if rc=0 then rc = j.writeClose();
j.writerGetText( rc, jsontxt );
put rc= jsontxt=;
end;
enddata;
run;
quit;
@Liliya95 wrote:
9.04.01M1P120413
So there we have the culprit: you are using 9.4m1, but json-package was added to ds2 in m3. So you need to updating your sas install is afaik the only way to solve the problem.
Which sas-version is in use? No error appears with 9.4m5.
"9,4" is to short to be useful. Please post the result of
%put &=SYSVLONG;
9.04.01M1P120413
@Liliya95 wrote:
9.04.01M1P120413
So there we have the culprit: you are using 9.4m1, but json-package was added to ds2 in m3. So you need to updating your sas install is afaik the only way to solve the problem.
Thanks!
I suggest you contact tech support on this.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.