SAS 9.4, TS1M7 on WIN x64
In BASE SAS, ROC IMPORT inserts a underscore if there is space in a variable name, for example, 'end date' after proc import will be 'end_date' (the single tick for emphasis). If the job is scheduled using SAS schedule manager, OSS server, that does not work. Is there an option, or a workaround?
Thank you in advance for your time
Shoin
options validvarname=v7;
Check your option settings for validvarname, it's likely set to ANY when you run in batch. Setting it at the top of your program to V7 will override that and you should get the desired behaviour.
@shoin wrote:
SAS 9.4, TS1M7 on WIN x64
In BASE SAS, ROC IMPORT inserts a underscore if there is space in a variable name, for example, 'end date' after proc import will be 'end_date' (the single tick for emphasis). If the job is scheduled using SAS schedule manager, OSS server, that does not work. Is there an option, or a workaround?
Thank you in advance for your time
Shoin
Describe "does not work". Not at all clear.
BTW reliance on Proc Import for any sort of production job is dangerous because you do not have much control over what happens. If this "import" involves any sort of text file you would be way better off to write a data step to read the data and avoid any form of changing properties and have actual control over all of the variable names.
options validvarname=v7;
Check your option settings for validvarname, it's likely set to ANY when you run in batch. Setting it at the top of your program to V7 will override that and you should get the desired behaviour.
@shoin wrote:
SAS 9.4, TS1M7 on WIN x64
In BASE SAS, ROC IMPORT inserts a underscore if there is space in a variable name, for example, 'end date' after proc import will be 'end_date' (the single tick for emphasis). If the job is scheduled using SAS schedule manager, OSS server, that does not work. Is there an option, or a workaround?
Thank you in advance for your time
Shoin
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.