What do you feel about hardcoding?

Answer Posted / saurabh gupta

It's a best practice not to hardcode values in code until
or unless it's not very necessary. Always try to use
dynamic variables in your code it will increase the
felxibility of the code.

Ex let say you have to run one of your code every year and
one of your condition needs a date which is begning of the
year and you hardcoded your value like this
%Let YBEG = '2007-01-01'

Then every year when you have to run this code you have to
change the date but if you use daynamic variable it will
resolve automatically.
ex YBEG = Y_BEG_0.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to read the variables in sas? : Sas-administrator

547


How to include or exclude specific variables in a data set?

630


What is the function of Stop statement in a SAS Program?

638


how can you put a "trace" in your program? : Sas programming

570


Compare sas with other data analytics tools.

572






How will you use the WHO Drug Dictionary for Reporting Clinical Trials?

1873


what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

623


What are the five ways to do a table lookup in sas? : sas-grid-administration

584


what is star schema? : Sas-di

635


Explain what is the use of proc gplot?

692


If a variable contains only numbers, can it be a character data type?

604


Intern stastical programmer written test

276


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1337


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

620


How are numeric and character missing values represented internally?

1130