Few posts back, I wrote about how to call a UNIX script from PeopleCode. In this post, I will provide a sample code to call a UNIX script from an SQR program.
We can write a XLS file using PeopleCode and SQR. We will be simply writing a XLS file using HTML tags.
Below is the SQR code.
Here is the piece of code you can use to send email with attachments in SQR.
BEGIN-PROCEDURE sendmail
let $subject = 'Subject of the Email Here'
let $to_list = 'email@email.com'
let $ReportID = 'G:\PeopleSoft\Reports\Report_Name.pdf'
let $alias ='Attachment File Name Alias including the file extension'
let $enter = chr(10)chr(13)
The SQR handbook will hold tips and tricks as well as some How to posts.
Here is some SQR code that will enable you to read a file. The code will also track # of records being read and will print out how many records have been rejected as well as total records read.
Here is an SQR code to close a file that has been opened for reading. Check my other article if you would like to see how to open a file for reading using SQR.
Here is a good sample of how to launch an SQR from within PeopleCode. You can use the peoplecode function called “ScheduleProcess”. Here is the example:
Here is some SQR to help you validate a date format. You can modify the code to fit your own needs and date format you desire.
Here is some SQR code that will open a file for reading:
| Title | Under | Posted on |
|---|---|---|
| Regarding Error "SQR 6002) CANNOT OPEN THE PRINTER FILE: " in SQR | PeopleSoft Technical | 11/21/2008 - 1:17am |
| Pay calendar Setup | PeopleSoft Functional | 11/18/2008 - 5:30pm |
| Issue linking to Excel 2007 from PS HRMS 8.8 | PeopleSoft Technical | 11/17/2008 - 9:48am |
| Spreadsheet-Based Control System Analysis and Design | Programming | 11/11/2008 - 5:10am |