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


 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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