BookmarkSubscribeRSS Feed
izaan
Calcite | Level 5

How can use sas code to convert the following data:

V-1V-2P-LP-HModelListOrderCScoreV-LV-HFscoreRuleNo
ALBALDWIN0999999999P101000001000000101
ALELMORE0999999999V1931000001000000.

2

 

to:

RuleNoSeqV-1V-2P-LP-HPrice-AVMPrice-FraudVariablesServiceCountModel
11ALBALDWIN099999999900 1P
12      S-C 0
13      F-C 0
14      Fscore 10
15      VALUE RANGE 100000-1000000
21ALELMORE099999999900 1V
22      

S-C

 0
23      F-C 0
24      CScore 93
25      VALUE RANGE 100000-1000000
3 REPLIES 3
LinusH
Tourmaline | Level 20

Your "want" layout is a report, not a data storage one.

Where does "Variables" and "ServiceCount" come from?

Once you got them into place, this looks like a proc print to me.

Data never sleeps
izaan
Calcite | Level 5

Service count will always be 1 for each rule. Variables is the new column of row variables introduced as required by the template.

ballardw
Super User

I do no see an obvious source for Price-AVM, Price-Fraud or where a Model Value comes from for S-C or F-C.

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 793 views
  • 0 likes
  • 3 in conversation