当测试一个不引用任何SQC文件的SQR程序时,可能会报这个错:
查看消息日志:
Process Request shows status of 'INITIATED' or 'PROCESSING' but nolonger running
主要原因就是该程序并不是API Ware的SQR程序。
Ref:
When you run an SQR, the status that you see in Process Monitor is controlled by the RUNSTATUS field of PSPRCSRQST. Different pieces of PeopleSoft control the flow as follows:
1) User clicks the Run button and schedules the process. PeopleSoft inserts a row into PSPRCSRQST with a RUNSTATUS of Queued.
2) Process scheduler wakes up, queries PSPRCSRQST for queued processes and finds the process. It builds the command line and launches the SQR. Process Scheduler changes RUNSTATUS to Initiated, and updates PSPRCSRQST with the Operating System's Process ID so it can keep track of the process as it runs.
3) The SQR launches and immediately changes its own status to "Processing" since the developer coded it to be "API Aware". When the SQR completes, it'll change its own status to "Success" or "Error" depending on whatever programming logic exists.
4) One of the things Process Scheduler does every 15 seconds or so besides looking for new queued processes is to check up on all of the processes that are in an Initiated or Processing status. It'll query the Operating System to make sure those Operating System Process ID's are still running. If they are not running, you'll get the "Process request shows status of initiated or processing but no longer running".
Usually the error happens in custom SQR's when the developer doesn't include the correct sqc's to make the program API Aware (i.e. update it's RUNSTATUS to Success when it's done).
Otherwise, anything that will cause an SQR to not run at all or to bomb out after it starts will result in this error.
I've seen instances when the SQR wasn't able to connect to the database because of a bad ODBC setup on a MS SQL Server platform, so it bombed out. The SQR MUST be able to connect to the database or you'll get that error.
Of course, if SQR isn't installed at all that can cause the problem. If the OS can't start any other programs, if you run out of resources like disk space or memory, if process scheduler isn't configured for SQR appropriately can all cause the error.