It is a good idea to adopt a systematic naming scheme for a hierarchy of XMM-Newton directories in which to store and distinguish raw ODF data, pipeline PPS products, and in this case RGS files of your own making. For example, when dealing with the Mkn421 observation with ID 0136540101 in revolution 259 appropriate directories might be called
/data/XMM/0136540101/ODF
/data/XMM/0136540101/PPS
/data/XMM/0136540101/RGS
These directories will be used in some examples below. After your XMM-Newton data have been downloaded from the archive, the contents of the data package should be verified with reference, should the need arise, to the XMM-Newton Data File Handbook [27] which contains details of the structure of all XMM-Newton files.