How to get the input from the user in sas programming?
As much as I know, when a user uses SAS Enterprise Guide, the program is kept on the server, it runs on the server (not on the user's PC) and the input file should be on a device accessible to the server - it can be on a remote computer.
The user need be able to update the FILENAME statement to point at the desired file and then submit the program to run.
In what situation?
1.Assigning values directly in a program.
2.Specifying a value using a cards statement.
3.Use %WINDOW statement to display a dialog and reflect user input to the program (like a command prompt).
4.Others?
@sas_it wrote:
How to get the input from the user in sas programming?
Sorry, but this is not enough information. The answer depends on the client used to execute the code. The %window-macro, mentioned by @japelin will only work, if you are using SAS Display Manager and not when Enterprise Guide or SAS Studio is used. Both have their own way of defining parameters.
Clarification needed about the situation:
- Should the program run On Line or Batch?
- Should the program run on the user's PC or on differen PCs ?
- What sas platform is used? SAS EG? other?
- How much information the user needs to deliver to the program?
short parameter? a long string? a file?
Program should run in batch on use's PC using SAS enterprise guide. The large amount of information will be read from the file.
As much as I know, when a user uses SAS Enterprise Guide, the program is kept on the server, it runs on the server (not on the user's PC) and the input file should be on a device accessible to the server - it can be on a remote computer.
The user need be able to update the FILENAME statement to point at the desired file and then submit the program to run.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.