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.

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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