How do you download a flat file from Mainframe to your
local PC using SAS?
Answers were Sorted based on User's Feedback
Answer / sastechies
I would use FileName FTP statement...
FILENAME FILE2 FTP 'PDSNAME' HOST='host'
CD= "'dir'"
user='user'
pass='pass'
lrecl=256
debug;
data _NULL_;
infile FILE2 lrecl=26095;
file "file.txt" lrecl=3000 pad;
input;
put _infile_;
run;
Any other method....
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / poojavaibhav
A "flat file" is a plain text or mixed text and binary file which usually contains one record per line[2] or 'physical' record (example on disc or tape). Within such a record, the single fields can be separated by delimiters, e.g. commas, or have a fixed length. In the latter case, padding may be needed to achieve this length. Extra formatting may be needed to avoid delimiter collision. There are no structural relationships between the records.
You can use Import wizard or import procedure or infile statement to create sas dataset and then use file statement to write file in log.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
What is the difference between an informat and a format. Name three informats or formats.
What type of tables you are using in YOUR reporting..???
2 Answers GSK GlaxoSmithKline,
How to Rename Library?
Are you involved in writing the inferential analysis plan? Tables specfications?
how many display types available in sas bi dashboard? : Sas-bi
sas implimented companies in hyderabad
What is the difference between order and group variable in proc report?
What are the special input delimiters used in SAS?
what do you mean by data staging area? : Sas-di
Which is the best training institute for SAS in hyderabad.
112 Answers Stansys Software Solutions,
What SAS statements would you code to read an external raw data file to a DATA step?
What do the put and input function do?