First, most of us will not download Microsoft Office attachments, they can be security threats. I personally will not download any attachment. If you want us to see something, paste it into your message rather than attaching a file. If you want to provide us with a SAS data set, please follow these instructions and examples.
Second, code should be pasted into the "code box", which is the window that appears when you click on the "little running man" icon.
Your problem of why all of this random numbers generates a constant results is that you have these lines in your code (see I have pasted the code into the code box)
random_PD = max(0, min(random_PD, 1));
random_LGD = max(0, min(random_LGD, 1));
On the lines before, you randomly generate random_PD and random_LGD. The minimum of your random_PD and 1 is always 1, so that's what you get. Similarly, the minimum of random_LGD and 1 is always 1.
Perhaps you want to use the uniform distribution, which can force the randomly generated numbers to the range 0 and 1, and no need to adjust them further to be between 0 and 1. That's a guess on my part, you didn't explain the problem you are working on (which you should always do), and then we would understand what you are trying to do and we wouldn't have to guess (which is never a good thing for us to do).
... View more