07-21-2017 12:32 PM
I'm trying to write a DS2 arbitration code to manage the output list of treatment in the reply node on SAS RTDM 9.4.
I'm building a SAS Process to arbitrate treatments from a particular set of decision treatment campaigns.
My idea is to change the order of treatments with a particular logic ( for example to sort by one of the custom detail of the treatment).
Should I use the following Treatment packages(Treatment, Treatment_Custom, Treatment_Custom_List)?
How could i recall a particular custom detail of the treatment in the DS2 Code to sort in ascending order?
07-21-2017 04:51 PM
You don't really have to write DS2 for such a simple logic as sorting by a treatment custom detail. Just assign a "custom detail tag" to this custom detail, and then enable the regular sort-based arbitration based on this tag value, in the treatment assignment window.
But if the logic is more complicated, there is an example DS2 code in SAS RTDM Administration Guide 6.5 - page 173, chapter "Example: Reverse-the-Order Custom Arbitration Process"
Also if your treatments are large (have many custom attributes) and multiple of them are assigned, you should pay attention "Processing Large Amounts of Data in Arbitration" section at page 256 to avoid errors.
Good luck with your SAS RTDM journey!
07-24-2017 03:54 AM
Thank you for your kind reply,
I would sort by one of the custom detail of the treatment using personal code on SAS process but I don't know how using Treatment packages(Treatment, Treatment_Custom, Treatment_Custom_List) in the code.
Do you have any example of this kind of DS2 arbitration? I need it because I'd like to go on on more complex logics.
Thanks in advance,
07-24-2017 11:26 AM
Hi Angela, this was actually in my first response - I pointed you to a specific page in the SAS RTDM Admin Guide document. It has the example code. Can't you find it there?
07-24-2017 11:58 AM
I found the example DS2 code in SAS RTDM Administration Guide 6.5 - "Example: Reverse-the-Order Custom Arbitration Process" - it is useful but it makes a simple reverse order based on row_count.
I need to order by some of the custom details. Can you help me with an example?