/* OS Processes */
SELECT prc.PROC_ID,
	   prc.PV_ID AS PROD_ID,
	   prc.PROC_NAME,
	   prc.PROC_DESCRIPTION,
	   prc.RUN_AS,
	   pc.PKG_HEALTH_TAG,
	   pc.CMD_INTERFACE,
	   pkg.PKG_NAME,
	   pv.PKG_VERSION
  FROM PROCESSES prc,
  	   OS_CONTENTS osc,
	   (
	   	SELECT pc.*
		  FROM PROCESSES_CONFIG pc
		 WHERE pc.OS_ID = :OS_ID
	   ) pc,
	   PACKAGES pkg,
	   PACKAGE_VERSIONS pv
 WHERE prc.PV_ID = osc.PROD_ID
   AND pc.PROC_ID (+)= prc.PROC_ID
   AND osc.OS_ID = :OS_ID
   AND pv.PKG_ID = pkg.PKG_ID
   AND prc.PV_ID = pv.PV_ID
ORDER BY UPPER(pkg.pkg_name), UPPER(pv.PKG_VERSION), UPPER(prc.proc_name) 

