What do you feel about hardcoding?
Answers were Sorted based on User's Feedback
Answer / phani
hardcoding is explicitly stating the value of a symbolic
object or variable in a program
hardcoding is a bad proctice bcoz of 2 reasons:
1) it over rides the database controls in the clinical data
management systems and the CFR 21 Part 11 controls may be
compromised.
2) data often change in a trial over time and the hadcode
that is written today may not be valid in the future.
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / 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 |
Answer / pnprasad
Hardcoding example:
data endstudy;
set endstudy;
if subjid = “xxxxxx” then
discterm = “Death”;
run;
it is known from non-database sources that at study
termination, subject
“xxxxxx” died.
With hardcoding there is no clear audit trail of data
change and CFR 21 – Part 11 controls might be considered
compromised.
Improved Hardcoding example;
data endstudy;
set endstudy;
**** HARDCODE APPROVED BY DR."nnn" AT SPONSOR ON 02/02/2008;
if subjid = “xxxxxx” and “&sysdate” <= “01MAY2005”d then
do;
discterm = "Death";
put “Subject “ subjid “hardcoded to termination reason”
discterm;
run;
For instance, there may be an upcoming data safety
and monitoring board (DSMB) or independent data monitoring
committee (IDMC)meeting where the clinical trial must be
monitored for safety information using the best
available data.
Is This Answer Correct ? | 3 Yes | 1 No |
What's the difference between VAR A1 - A4 and VAR A1 - A4?
Hi... this is chandu, did MSc Microbiology, trying to get job in SAS tool, PLZ Tell me whether IT industries will give consider my education to gain a job....?
Explain translate function?
what is data access? : Sas-di
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
How would you keep from overlaying the a SAS set with its sorted version?
how we can call macros with in data step?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we need to pick the observations random order like 100obs,500obs,1020obs,1890obs,2565obs like that i need 100 obs in random order? how can we create this one?
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
i have a data set with 20 observations i want label from 8 to 15 observations ? how you create this one.