1) provide a definition or link of what a "truncated Cmax" may be and what your terms mean in relation to that definition.
2) Since any calculation is data dependent provide example of your data that expect the value to be calculated from.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.