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

What is the role of administrative users? : sas-grid-administration

663


what is intially documentation in sas?

4335


Are you involved in writing the inferential analysis plan? Tables specfications?

1748


explain the main difference between the nodup and nodupkey options? : Sas-administrator

694


What is data _null_?

700






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?

1167


what is the use of proc contents and proc print in sas? : Sas-administrator

608


Do you know the features of sas?

598


explain the use of % includes a statement in sas? : Sas-administrator

552


Which are the statements whose placement in the data step is critical?

764


What system options would you use to help debug a macro? : sas-macro

643


what are the considerations when picking a SAS/STAT procedure?

2905


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 ...

946


Tell e how how dealt with..

1775


What is the basic structure of the SAS base program?

692