How to do user inputs and command line arguments in SAS? D&B

Answers were Sorted based on User's Feedback



How to do user inputs and command line arguments in SAS? D&B ..

Answer / segu

we can pass the paramters at run time.
here is an example which passes three parameters( 3 dates)
to a program calles pgm_name:

>sas pgm_name -sysparm "01aug95 05aug94 10jan60"

Is This Answer Correct ?    2 Yes 1 No

How to do user inputs and command line arguments in SAS? D&B ..

Answer / rupesh

we can input values in dataset runtime using WINDOW statement:


data temp;
length name $20;
length sex $1;

window start

#3 @5 'enter the name' +1 name attr=underline
#4 @5 'enter the age' +2 age attr=underline
#5 @5 'enter the sex' +2 sex attr=underline

#7 'when complete type end in cmd';

display start;
run;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming

0 Answers  


i have a dataset with var1,var2,var3; i want to upload the titles for the variables . How can we?

1 Answers   GSK,


How would you define the end of a macro?

0 Answers  


In which format does Date stores in sas..? What is the use of DATE in SAS.?

3 Answers   TCS,


what is the difference between proc means and proc tabulate?

3 Answers   Cognizant, CTS,


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

0 Answers   CTS,


How you can read the variables that you need?

0 Answers  


What SAS statements would you code to read an external raw data file to a DATA step?

10 Answers   NIIT,


How do you specify the number of iterations and specific condition within a single do loop?

0 Answers  


How to test the debugging in sas?

0 Answers  


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

0 Answers  


If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?

0 Answers  


Categories