lexjansen / dataset-json-sas

Dataset-JSON SAS Implementation
MIT License
15 stars 7 forks source link

Do not try to create a variable label when not defined in Dataset-JSON #6

Closed lexjansen closed 1 year ago

lexjansen commented 1 year ago

Having no label in Dataset-JSON results in:

proc datasets library=work noprint nolist nodetails; change IG_CLASS_ITEMDATA = CLASS; modify CLASS (label = "Student Data"); rename element1=ITEMGROUPDATASEQ element2=Name element3=Sex element4=Age element5=Height element6=Weight; label ITEMGROUPDATASEQ= "Record Identifier" Name= "" Sex= "" Age= "" Height= "" Weight= ""; quit;

correct is:

proc datasets library=work noprint nolist nodetails; change IG_CLASS_ITEMDATA = CLASS; modify CLASS (label = "Student Data"); rename element1=ITEMGROUPDATASEQ element2=Name element3=Sex element4=Age element5=Height element6=Weight; label ITEMGROUPDATASEQ= "Record Identifier"; quit;