The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in
a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?
A. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification' dsd = ',';
put idnum sales_date : mmddyy10.;
run;
B. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification' dlm = ',';
put idnum sales_date : mmddyy10.;
run;
C. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy10. dlm = ',';
run;
D. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy10. dsd = ',';
run;
Click Comment link to get answer
B
ReplyDeleteB
ReplyDeleteB
ReplyDeletedlm = ',';
sales_date : mmddyy10.;
I feel the answer should be A, Because assuming that the data might have any missing value. DSD option in the file statment will use ',' as the delimiter and will write two commas if it finds any missing value which dlm option cannot do..!!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteDSD = ',' is invalid because by default DSD is a comma. If you use DSD alone it would work.
ReplyDeleteb?????
ReplyDeleteAfroz;
ReplyDeleteYou should not think beyond the norm of the question I mean do not drag yourself with what if ? ( no hidden agenda ), As VAL said with dsd would have work without comma.
what is the final answer? why not C?
ReplyDeletebecoz the dlm is to be specificied after file specification
Deleteval is correct
ReplyDeleteFirst, in put statement, $ sign for character variable, Idnum is not needed.
ReplyDeleteThe correct answer is: B
Ans, A is not correct as the default delimeter (,) for DSD is defined as dsd = ','. It is correct if it was used as: DSD
Ans C and D are not correct because of using the options dlm and dsd in PUT statement. They are the INFILE options.
The answer is B, but try it for your self. Just copy and paste the answers and put in a valid 'file-specification'. No need for libname- I used work lib.
ReplyDeletedata jan_sales;
input idnum $ date mmddyy10.;
cards;
5001 02/01/2013
5002 03/25/2013
;
This comment has been removed by the author.
ReplyDeleteIf you seek for a perfect writing, editing, and proofreading answer, you ought to attempt victimisation this descriptive linguistics & structure Checker technology. Writing is being employed daily by most folks for a large vary of assignments - finding new jobs, writing personal or business Emails, writing essays and articles etc. visit the site
ReplyDeleteThis comment has been removed by the author.
ReplyDeletePerfecting one's literary genre will be like creating a replacement dress. you'll get material, a pattern, thread, scissors, textile machine, pins, needles and every one of the remainder of the equipment so work, work, work till your dress is formed. stylewriter usa
ReplyDeleteIn my article, "Where's the standard in Your Article?", I discerned four forms of article writers. i assumed it might be wise follow up with tips. The third kind of article author I named is that the Regurgitating Ink thrower. more
ReplyDeleteNice Blog.
ReplyDeleteThere are many words exists in the writing. In writing there are many meaningful and useful words. There are many words in writing which we use in writing. We know the right use of a word in your writing. For originality checker free good site
ReplyDeleteWell... That is a very critical question. But i think the answer should be B. Though i am not good in mathematics.
ReplyDeleteGood work and on time delivery can be quite favorable especially with all the variety of choices to the students on education level. Writing essay service customarily offers to execute good essay help writing PhD Proposal Example
ReplyDelete