DATA Step, Macro, Functions and more

Redesigning SAS Dataset

Reply
New Contributor
Posts: 2

Redesigning SAS Dataset

[ Edited ]

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
Super User
Posts: 5,254

Re: Redesigning SAS Dataset

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
New Contributor
Posts: 2

Re: Redesigning SAS Dataset

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

Super User
Posts: 10,466

Re: Redesigning SAS Dataset

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.

 

 

Ask a Question
Discussion stats
  • 3 replies
  • 230 views
  • 0 likes
  • 3 in conversation