Hi all,
I'm sure there must be a simple answer but right now throwing a blank.
How do I use DSD but also instruct SAS to read the data "as-is" without ever removing quotes.
In below sample what do I need to change so variable snippet stores the value 'alfred' in quotes?
data control.rule_instances;
attrib
rule_type length=$30 informat=$30.
libref length=$8 informat=$8.
table length=$32 informat=$32.
column length=$32 informat=$32.
snippet length=$500 informat=$500.
;
infile datalines4 dsd truncover dlm='|';
input
rule_type
libref
table
column
snippet
;
datalines4;
Not Null|work|sample|name
Not Null|work|sample|sex
In a List|work|sample|sex|'F','M'
Not In a List|work|sample|name|'alfred'
Not In a List|||demo|'alfred'
;;;;
Thanks,
Patrick
Thank you!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.