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


Please Help Members By Posting Answers For Below Questions

How you can read the variables that you need?

647


Can you suggest us materials for sdtm mapping?

4028


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

606


What does the trace option do?

660


Explain how you can debug and test your SAS program?

561






Mention what is PROC in SAS?

595


how many display types available in sas bi dashboard? : Sas-bi

624


What are the ways to do a “table lookup” in sas?

585


What is program data vector (pdv)?

627


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

537


how do you pull data from equifax?tell me the process?

1371


What are the differences between sum function and using “+” operator?

568


What are the difficulties u faced while doing vital signs table or dataset?

1922


What do you code to create a macro? : sas-macro

566


Give e an example of..

1642