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
How you can read the variables that you need?
Can you suggest us materials for sdtm mapping?
If a variable contains only numbers, can it be a character data type?
What does the trace option do?
Explain how you can debug and test your SAS program?
Mention what is PROC in SAS?
how many display types available in sas bi dashboard? : Sas-bi
What are the ways to do a “table lookup” in sas?
What is program data vector (pdv)?
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
how do you pull data from equifax?tell me the process?
What are the differences between sum function and using “+” operator?
What are the difficulties u faced while doing vital signs table or dataset?
What do you code to create a macro? : sas-macro
Give e an example of..