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.
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!
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.