0% found this document useful (0 votes)
79 views1 page

Calling Sqrprocess From Peoplecode

This document provides code to call an SQR process from PeopleCode. The code creates a process request, sets properties like the process name, type, run control ID, location, and output destination. It then schedules the process and checks the status, returning the process instance if successful.

Uploaded by

sendram1
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views1 page

Calling Sqrprocess From Peoplecode

This document provides code to call an SQR process from PeopleCode. The code creates a process request, sets properties like the process name, type, run control ID, location, and output destination. It then schedules the process and checks the status, returning the process instance if successful.

Uploaded by

sendram1
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Description:

This code is used to call SQR Process from peoplecode.

Code:

Function sqrprocess()

&prqstInvProcess = CreateProcessRequest();
&prqstInvProcess.ProcessName = "hjk009";
rem &prqstInvProcess.JobName = &strJobName;
&prqstInvProcess.ProcessType = "SQR Process";
&prqstInvProcess.RunControlID = &RUN_CNTL_ID;
SQLExec("SELECT SERVERNAME FROM PS_serverdefn WHERE OPSYS ='4'", &serverName)
;
&prqstInvProcess.RunLocation = &serverName;
&prqstInvProcess.RunDateTime = %Datetime;
&prqstInvProcess.OutDestType = "6";
&prqstInvProcess.OutDestFormat = "2";
rem &prqstInvProcess.OutDest = &OutDest;
&prqstInvProcess.Schedule();
&nbrStatus = &prqstInvProcess.Status;
If &prqstInvProcess.Status = 0 Then
&nbrPrcsInstance = &prqstInvProcess.ProcessInstance;
Else
Error (MsgGet(65, &PRCSSTATUS, "Process could not be scheduled"));
End-If;
End-Function;

You might also like