How do you download a flat file from Mainframe to your
local PC using SAS?
Answer Posted / paul
A flat file from mainframes generally have data values assigned with the variable names.
eg: cards;
name=XXX Age=XX Gender=XXXX
name=XXX Age=XX Gender=XXXX
name=XXX Age=XX Gender=XXXX
name=XXX Age=XX Gender=XXXX
;
so to read such data into SAS we simply use named input method.
data flat;
infile 'flatfile.csv';
input var1= $ var2= var3= :ddmmyy10. var4= ;
run;
/*here i specified var1 as char, var3 with date informat
rest are numeric vars */
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the role of administrative users? : sas-grid-administration
what is intially documentation in sas?
Are you involved in writing the inferential analysis plan? Tables specfications?
explain the main difference between the nodup and nodupkey options? : Sas-administrator
What is data _null_?
How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?
what is the use of proc contents and proc print in sas? : Sas-administrator
Do you know the features of sas?
explain the use of % includes a statement in sas? : Sas-administrator
Which are the statements whose placement in the data step is critical?
What system options would you use to help debug a macro? : sas-macro
what are the considerations when picking a SAS/STAT procedure?
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
Tell e how how dealt with..
What is the basic structure of the SAS base program?