BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Liliya95
Fluorite | Level 6

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

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

View solution in original post

7 REPLIES 7
andreas_lds
Jade | Level 19

Which sas-version is in use? No error appears with 9.4m5.

Liliya95
Fluorite | Level 6
sas rtdm 6.3 platform 9.4
andreas_lds
Jade | Level 19

"9,4" is to short to be useful. Please post the result of

%put &=SYSVLONG;
Liliya95
Fluorite | Level 6

9.04.01M1P120413

andreas_lds
Jade | Level 19

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

Liliya95
Fluorite | Level 6

Thanks!

BrunoMueller
SAS Super FREQ

I suggest you contact tech support on this.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

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.

 

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1893 views
  • 0 likes
  • 3 in conversation