BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shoin
Lapis Lazuli | Level 10

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

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
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


 

View solution in original post

2 REPLIES 2
ballardw
Super User

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.

Reeza
Super User
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


 

sas-innovate-white.png

Missed SAS Innovate in Orlando?

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.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1089 views
  • 4 likes
  • 3 in conversation