Dear everyone,
Let's assume I have 2 Datasets (Dataset1 and Dataset2), same size, variables, but with some values different.
After doing these changes in some values, I have runned some other code that runs on these Datasets, and the result on the both datasets is different. One of the difference i found is that before (using some code) the value .was being transformed to 0, and now this doesnt happen.
For that i have done a proc contents of the table and I have realized the following:
the variables charset and sorted are different among datasets.
(1) Can charset and sorted affect later other code on the data??,
(2) How can I define this to being equal in dataset1 and dataset2 being equal to the format of dataset2?, can i copy formats generally ??
Thank you for you time in advanced,
Proc contents describes the structure of the data set. Changing any of the value is done by recreating the data set to have a different structure.
If you want to set the SORTED flag, you can for example sort the data with PROC SORT.
If you want to change the encoding, you can for example use the ENCODING= data set option.
Note that none of this modifies the data held by the data set. If the . is now a zero, something else (the data, not the data set structure) has changed. Maybe the value was overwritten, or option MISSING was altered.
How would you define the encoding to appear as blank ??
Im not finding it.
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.
Ready to level-up your skills? Choose your own adventure.