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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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