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
PROC Star

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.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 137 views
  • 0 likes
  • 2 in conversation