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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 818 views
  • 0 likes
  • 3 in conversation