These IDL routines can be used to transform ra, dec, distance and the error on distance for any number of stars to XYZ coordinates and their errors, as well as ra, dec, distance, proper motion and radial velocity to UVW coordinates and their errors. This package includes a modification on the glactc.pro astrolib routine that is significantly faster with large sets of objects (see individual .pro files for more details).
Please refer to Gagné et al. 2014 (see link) when using these routines.