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 order of evaluation of the comparison && logical && relational operators:?
what are several options for creating reports in web report studio? : Sas-bi
What do the put and input function do?
In which format does Date stores in sas..? What is the use of DATE in SAS.?
How would you code the criteria to restrict the output to be produced?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
What is univariate n where it can be used n how...?
i have a null dataset with 20 variables. i want to upload the variables which contain name like a or k or anything in another dataset.how can we create the dataset?
Name statements that are execution only?
How would you determine the number of missing or nonmissing values in computations?
Can you excute a macro within a macro? Describe.
differnce between 8.2 and 9.1.3