This function returns a 2-vector (shape and scale in that order) with the two parameters for a gamma distribution which has a requested mean and standard deviation. The gamma can be used as a prior for a model parameter which has support on the positive reals (such as a variance), though the inverse gamma (http://www.estima.com/forum/viewtopic.php?f=7&t=1448) is a more common choice.
Because it's a function (not a procedure), you need to do a SOURCE instruction on the file before you can use it in a RATS program.
target VECTOR=%GammaParms(mean,sd)
Example
source gammaparms.src (needs to be done once)
compute gparms=%gammaparms(2.5,1.0)
set test 1 1000 = gparms(2)*%rangamma(gparms(1))
set logg 1 1000 = %loggammadensity(test,gparms(1),gparms(2))
will create a series named TEST with gammas with (population) mean 2.5 and standard deviation 1.0 and the log density (in LOGG) at each drawn value.