-
Notifications
You must be signed in to change notification settings - Fork 48
/
Import_HOME_EQUITY.sas
85 lines (58 loc) · 2.3 KB
/
Import_HOME_EQUITY.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*******************************************************************************/
/* Copyright © 2022, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. */
/* SPDX-License-Identifier: Apache-2.0 */
/*******************************************************************************/
/*********************************************/
/* Read the home_equity.csv sample data from */
/* the SAS Support Example Data website */
/* and create WORK.HOME_EQUITY. */
/*********************************************/
filename data TEMP;
proc http
method="GET"
url="https://support.sas.com/documentation/onlinedoc/viya/exampledatasets/home_equity.csv"
out=data;
run;
/* Import edu_hmeq.csv and create WORK.HOME_EQUITY */
proc import file="data" dbms=csv out=work.t_home_equity replace;
guessingrows=5960;
run;
data work.home_equity;
set work.t_home_equity;
label APPDATE="Loan Application Date"
BAD="Loan Status"
CITY="City"
CLAGE="Age of Oldest Credit Line (months)"
CLNO="Number of Credit Lines"
DEBTINC="Debt to Income Ratio"
DELINQ="Number of Delinquent Credit Lines"
DEROG="Number of Derogatory Reports"
DIVISION="Division"
JOB="Job Category"
LOAN="Amount of Loan Request"
MORTDUE="Amount Due on Existing Mortgage"
NINQ="Number of Recent Credit Inquiries"
REASON="Loan Purpose"
REGION="Region"
STATE="State"
VALUE="Value of Current Property"
YOJ="Years at Present Job";
format APPDATE date9.
CLAGE comma8.1
LOAN MORTDUE VALUE dollar12.
DEBTINC 8.1
BAD CITY CLNO DELINQ DEROG DIVISION JOB NINQ REASON REGION STATE YOJ;
informat _all_;
run;
proc datasets lib=work nolist;
delete t_home_equity;
run;
proc contents data=work.home_equity;
run;
filename data clear;
/*****************************************************************************/
/* Create a default CAS session and create SAS librefs for existing caslibs */
/* so that they are visible in the SAS Studio Libraries tree. */
/*****************************************************************************/
cas;
libname casuser cas caslib="casuser";