Hello everybody, I have problems merging two the next information:
I have 9 tables with the next structure (CCF1-CCF9)
product util_rank due credit_limit CCF1
A 1 0 1 any value
A 1 0 2
A 1 0 3
A 1 0 4
A 1 0 5
A 1 1 1 any value
A 1 1 2
A 1 1 3
A 1 1 4
A 1 1 5
B 1 0 1 any value
B 1 0 2
B 1 0 3
B 1 0 4
B 1 0 5
And so on with any combination of A, B, C or D products, the due can be from 0-4 and credit limit from 1-5 (adjoint at this question is the example of the table).
On the other side, I have a table (Credit_table) with the next information:
CTA_CVE due util_rank credit_limit
10551212 2 1 2
56488971 1 0 3
65468447 2 4 4
...
I'm making a merge of the first table sorting it by due, util_rank and credit limit, and sorting the second one by the same variables and the merging them by the four keys, but I know there is a better way using arrays to merge that information.Here's my work so far:
DATA CRUCE_PD_CCF; MERGE CRUCE_PD_ord man2.CCF1_ord man2.CCF2_ord man2.CCF3_ord man2.CCF4_ord man2.CCF5_ord man2.CCF6_ord man2.CCF7_ord man2.CCF8_ord man2.CCF9_ord man2.CCF10_ord ; BY product Util_Rank Due Lim_Cred; IF A; RUN;
But I'm validating the information and there are no accts where there must be information of CCF.
What i'm doing wrong or how can I use arrays in order to be sure of the information is merging?
Thanks in regards!!
1. Supply your data as data steps
2. Many people -like me- will not download MS office files
3. Variable A is not given a value in your code:
if A;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.