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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 976 views
  • 0 likes
  • 2 in conversation