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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.

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