header

Script to find the PeopleSoft process status through sqlplus

Create Unix shell script or the batch file with below commaind
sqlplus sysadm/*****@HRMS @process.sql -S

Create a script Process.sql script to the all the process status from sql

set linesize 300;
set pagesize 0;
select a.name||','||prcsinstance||','||rtrim(ltrim(prcsjobname))||','||prcstype||','||
prcsname||','||servernamerun||','||to_char(rundttm,'DD-MON-YYYY-HH:MM:SS')||
','||decode(runstatus,1,'Cancel',
2,'Delete',3,'Error',4,'Hold',5,'Queued',6,'Initiated',7,'Processing',
8,'Cancelled',9,'Success',10,'Not Successful',11,'Posted',12,'Unable to Post',
13,'resend',14,'Posting',15,'Content Generated',16,'Pending',17,'Success with Warning',
18,'Blocked',19,'Restart')||','||
decode(diststatus,0,'None',1,'Scheduled',2,'Processing',3,'Generated',4,'Unable to Post',
5,'Posted',6,'Delete',7,'Posting (stuck)')
from v$database a,
psprcsrqst b
where oprid in ('admin')
and to_char(rundttm,'DD-MON-YYYY')=to_char(sysdate,'DD-MON-YYYY')
and runcntlid in ('IVT','ivt','test')
/
quit

No comments: