You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

running from sqr in peoplecode callappengine function

1 reply [Last post]
Guest's picture
Guest

Hi guys,

I am running sqr from peoplecode callappengine function the following error will come"unable to open fileindex" can anyone help..

Regards
Guest

raj.psoft's picture
User offline. Last seen 2 years 23 weeks ago. Offline
Joined: 03/25/2010
Posts: 26
Re: running from sqr in peoplecode callappengine function

You can try this:.....

Running an SQR from within your PeopleCode program

Therefore, the best and safest way to launch an SQR program is to use the People Code functions CreateProcessRequest() and Schedule(). The CreateProcessRequest function allows you to create a Process Request object. Remember, you should be coding your People Code programs using the Object Oriented methods. Once you’ve created your object, you can assign values to its properties and use the Schedule method to submit the process request for scheduling. The CreateProcessRequest function takes 2 arguments. The Process Type and the Process Name.

REM Declare your Variables;
Local ProcessRequest &MYRQST;
Local String &MySQR;

&MySQR = “DDDAUDIT”

REM Create My Process Request Object;
&MYRQST = CreateProcessRequest(”SQR Process”, &MySQR);

REM Set Properties of My Process Request Object;
&MYRQST.RunControlID = “MYRUNCNTRL_ID”

REM Set Properties of My Process Request Object;
&MYRQST.SetOutputOption(”Web”, “PDF”, “”, &MySQR);

The above example creates a ProcessRequest object for the DDDAUDIT SQR named &MYRQST. You will notice that I also specified Run Control ID and the output options. I can now take this Object and use the Schedule() method agains it to Schedule the SQR. Here is an example.

&MYRQST.Schedule();
If &MYRQST.Status = 0 then /* The process was Schedule successfully.*/
Else /* Process was not scheduled, do to an error processing */
End-If;

That’s how you run an SQR program from within your PeopleCode program. Now, if you want to run any other type of program that is not an SQR, AppEngine, or Crystal I would highly suggest that you first setup a Process Definition for the type of application you are running and run it through the process scheduler.

Raj

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
4 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.