header image
Home arrow PeopleSoft Tricks arrow Query arrow PeopleSoft Tips General arrow Finding the SQR Output Directory
Finding the SQR Output Directory Print E-mail
Written by David Vandiver   

When using SQR through the process scheduler, there are times where you need to create a new file in the same folder as the other output files (like the PDF). 

At www.peoplesoftguys.com, I found the answer; use the PSPRCSPARMS table.  Below is the code I built to find the output folder:


!*****************************************************************************************
!  Procedure Name : Z-Find-Output-Directory
!  Description    : Find the output directory, using the PSPRCSPARMS table.
!  Input(s)       : Process Instance
!  Output(s)      : $actual_path       Output directory to use for outbound files (such as CSV)
!                  
! You can query PSPRCSPARMS table for PRCSOUTPUTDIR field for your $prcs_process_instance and substitute
!     output value as your file path
! Technique found at http://www.peoplesoftguys.com/category/sqr/
!*****************************************************************************************
begin-procedure Z-Find-Output-Directory($prcs_process_instance, :$actual_path)

begin-select
PRCSOUTPUTDIR
   let $actual_path = &PRCSOUTPUTDIR
FROM PSPRCSPARMS
WHERE PRCSINSTANCE = $prcs_process_instance
end-select

end-procedure

<Previous   Next>
Login Form
Username

Password

Remember me
Password Reminder
No account yet? Create one