BookmarkSubscribeRSS Feed
DivyaA
Calcite | Level 5

Hi All, 
I'm Trying to export SAS Dataset to JSON Object but the Variable Labels are missing in the output file. 
Please throw some light on how to fix this?
Regards,
DivyaA

 

1 REPLY 1
Quentin
Super User

How are you exporting the data, proc JSON?

 

This answer replaced variable names with labels during the export:

https://communities.sas.com/t5/SAS-Programming/How-do-I-use-a-Variable-Label-in-JSON-key-PROC-JSON-E...

 

Is that what you want?  Or do you want a separate json object listing the variables and labels?  If the latter, perhaps run PROC CONTENTS and output that to a SAS dataset, then export that dataset to JSON.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

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
  • 1 reply
  • 342 views
  • 0 likes
  • 2 in conversation