30
Understanding the HRMS System There are three PeopleSoft information systems in use at JMU: Finance, Student Administration (SA) and Human Resources (HRMS). This documentation references the HRMS system and the reporting tools made available to users: specifically PeopleSoft query and BI publisher reports. Reporting tools are used to extract data from the HRMS system in ad hoc yet predefined ways. While several offices have access to write queries, the Manager of Reporting creates and maintains hundreds of reporting objects for various offices. Use this document as the primary source for these reporting objects. For additional information related to extracting data out of your HRMS system, contact: Pete DeSmit [email protected] phone: 8-3605 Page 1 of 30 Last updated by Pete DeSmit on 10/18/2017

Instructions and FAQ's for HR Queries

Embed Size (px)

Citation preview

Page 1: Instructions and FAQ's for HR Queries

Understanding the HRMS SystemThere are three PeopleSoft information systems in use at JMU: Finance, Student Administration (SA) and Human

Resources (HRMS).

This documentation references the HRMS system and the reporting tools made available to users: specifically PeopleSoft query and BI publisher reports. Reporting tools are used to extract data from the HRMS system in ad hoc yet predefined ways.

While several offices have access to write queries, the Manager of Reporting creates and maintains hundreds of reporting objects for various offices. Use this document as the primary source for these reporting objects. For additional information related to extracting data out of your HRMS system, contact:

Pete [email protected]: 8-3605

Page 1 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 2: Instructions and FAQ's for HR Queries

Table of ContentsLogging into the HRMS System to run reports................................................................................................................3Tips/rules which apply to all query objects.....................................................................................................................3Introduction to reporting in your HRMS System.............................................................................................................4Electronic Personnel Acquisition Request (ePar)............................................................................................................4JMU Applications............................................................................................................................................................6Facilities Management....................................................................................................................................................7Working with scheduled queries....................................................................................................................................8Running a BI PUBLISHER report with bursting the first time.........................................................................................12Level 1 create query access..........................................................................................................................................13Level 2 create query access..........................................................................................................................................14Reporting Guidelines when a member of IS performs research/work..........................................................................15Troubleshooting queries...............................................................................................................................................16Advanced query techniques.........................................................................................................................................17

Page 2 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 3: Instructions and FAQ's for HR Queries

Logging into the HRMS System to run reports

Log into the HRMS system by following this URL: https://hrweb.jmu.edu/psp/hprd/?cmd=login&languageCd=ENG&

Log in using your userid and password. Navigate as follows to begin using the queries: Reporting Tools, Query Viewer.

Navigate as follows to begin using BI publisher reports: Reporting Tools, BI publisher. BI publisher reports can be viewed or scheduled, follow the appropriate path.

Tips/rules which apply to all query objects

To search for a prompted value (if there is a magnifying glass icon to the right of a field), place your cursor in the field and press ALT-5 TWICE. This will allow you to search by various values.

If prompted for the institution, always use a value of JMDSN. Once you’ve entered prompted values, press the View Results button. When the results appear, you can send

the results to an Excel spreadsheet, or CSV text file by following the appropriate hyperlink. Once your results are in Excel, you may sort, subtotal, save the results using various formats etc.

If a query has fewer prompts than you need (for example, you need to obtain data for 7 departments and the query only allows four) you may run the query multiple times and combine the results in Excel using cut/paste. If this activity is performed on a regular basis, contact the manager of reporting to request a customized query.

Dates can be entered in several formats; all of the following are acceptable formats for November 7, 2014: 11/07/2014 OR 11072014 OR 110714

If prompts include the word OR in their description, unless otherwise noted, it means you should enter data into one or the other prompt, but not both.

Queries have the results sorted in a specific order, which varies by query. If you desire results in a different order, send the results to Excel and use the sorting features available within Excel.

Queries contain data which need to be handled in accordance with university policies and procedures, including (but not limited to) FERPA.

The Family Educational Rights and Privacy Act of 1974, as amended (also sometimes referred to as the Buckley Amendment), is a federal law regarding the privacy of student records and the obligations of the institution, primarily regarding the release of information from the records and the access provided to these records. Generally the law provides that, with some exceptions, no information, applications, forms, letters, records, transcripts, etc. may be released, whether orally or in writing, without prior written consent, dated and signed by the student, specifying the records to be released, the reasons for release and the person to whom the records are to be released.

As a JMU employee, you are bound by various policies and procedures, one of which is data stewardship. The University's policy on data stewardship can be found here: http://www.jmu.edu/JMUpolicy/1205.shtml

If a query is described as returning aggregate (aka summary) results, it means there will be no employee identifiable data returned. Aggregate query results are usually defined by a range of dates, actions, departments or other fields which will be presented as prompt values when the query is run.

As of date prompt. One of the primary records in your HRMS system is named JOB. It contains a key field known as an effective date. An effective dated record allows the system (and users running reports) to “turn the calendar” either forward or backwards. Doing so will allow the data returned by the report to be “as of” the date entered by the user at run time. When a report includes such a prompted field, entering the as of date is required. You may choose any valid date, and the results will be returned as of the date you entered. Want to know which employees were in your department as of 1/1/2000? Run the appropriate query, enter the date 1/1/2000 in the as of date prompt, and the results will be returned. Although used less frequently, you may also

Page 3 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 4: Instructions and FAQ's for HR Queries

enter a future date. Payroll, for example, future dates PAR data for employees. Adjunct faculty have their termination date entered by payroll at the same time as their hire date. The termination row is future dated, and such, will not become effective until that future date arrives. Returning future dated results does not differ from using any other valid date. Simply key in the future date, and the report results will reflect this value.

Introduction to reporting in your HRMS System

One could describe your HRMS system as robust, meaning it has a lot of features. One of the side affects of such a robust system is the challenge to get meaningful/useful data out in an easy (very relative term, like user friendly) fashion. Two of the general purpose tools which come bundled in all PeopleSoft applications are the PeopleSoft Query and BI publisher reporting tools. All of the data in the HRMS system is stored in objects referred to as “records”, which can be thought of as a filing cabinet with lots of folders of information. In your HRMS system, there are literally thousands (75,687 as of the last count) of these records where data is stored in fields 687,275 of them). Using the query and BI publisher reporting tools, we’ve predefined some of the more common questions asked of the data and stored them in query and BI publisher definitions.

I am always eager to find/develop new ways to make JMU employees lives easier as it relates to the HRMS data. Before embarking on a labor intensive task related to HRMS data, why not drop me an email ([email protected]) or give me a call (8-3605) as I might just be able to make your data analysis chore a lot easier!

Electronic Personnel Acquisition Request (ePar)

Queries whose name begins with jepar. Primary contact is Jason McClain [email protected]. These queries were developed for users with access to the Gideon Taylor developed Electronic Personnel Acquisition Request system (epar). All of the aggregate queries contain a date range labeled “From EPAR origin date” and “To EPAR origin date”. Both are required fields and refer to the date of the origin of the epar form. Of special note; the jepar01-08 queries, unless otherwise specified, return data for ALL departments and account codes, NOT just the epar forms for the departments for which the individual user running the query has been granted access. For the queries which return employee identifiable data, the data returned is based upon the 6 digit department id numbers to which you have been granted access. IF an employee is missing from the results, it may be because you have not been granted access to the underlying 6 digit deptid. You may run the query named jepar11a to determine which departments you have access to. Contact the Information Systems security team at [email protected] to determine your current access. Section last updated 10/3/2016.

1. Jepar01: Epar counts by status. Returns aggregate data based upon a prompted for epar origin date range. In this context, status is defined as the epar form status values.

2. Jepar02: Epar counts by div/status. Returns aggregate data based upon a prompted for epar origin date range. In this context, status is defined as the epar form status values as well as the division to which the underlying 6 digit department id belongs as defined within the HRMS system. The “other” column includes all epar form data for divisions other than AA (Academic Affairs), SA (Student Affairs), UA (University Advancement), Presidents (the office of the President) and A&F (Administration and Finance).

3. Jepar03: Epar counts by deptid/status. Returns aggregate data based upon a prompted for epar origin date range. Data is returned for all divisions and 6 digit department id’s (which are also the default sort order). You may send the results to excel and ignore the rows of data not applicable to your division/departments.

4. Jepar04: Epar counts by deptid/condition. Returns aggregate data based upon a prompted for epar origin date range. Data is returned for all divisions and 6 digit department id’s (which are also the default sort order). You

Page 4 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 5: Instructions and FAQ's for HR Queries

may send the results to excel and ignore the rows of data not applicable to your division/departments. In this context, the “condition” field refers to the type of form used. Values such as student, graduate student, non-student, etc.

5. Jepar05: epar avg open to close days. Returns aggregate data based upon a prompted for epar origin date range. Data is returned for all 6 digit department id’s (which is also the default sort order). In this context, the “Avg days to process P to E” field refers to the number of calendar days it took (on average) for all of the epars for a particular department to reach the fully executed (status=E) from the initiated (status=P) status.

6. Jepar06: epar avg by division. Similar to jepar05, but aggregated by the division of the underlying child department.

7. Jepar07: Avg wait times; SWEC, HR Payroll. Returns aggregate data based upon a prompted for epar origin date range. Data is returned based upon the average number of hours each epar was waiting in each of the three primary areas of SWEC, HR and Payroll. These areas were chosen due to the predominate routing of epars thru these three offices across campus.

8. Jepar08: Avg wait times; by role. Returns aggregate data based upon a prompted for epar origin date range. Data is returned based upon the average number of hours each epar was waiting in each role area.

9. Jepar08a: Avg wait times; by status. Returns aggregate data based upon a prompted for epar origin date range. Data is returned based upon the average number of hours each epar was waiting in each of the different form action values.

10. Jepar09: ePAR hire form data. Returns detail data for the employees to which you have been granted access based upon their JOB 6 digit deptid. Prompts for a date range, and three optional (can be left blank which means the value will not be used for selecting the data) prompts. Acct code, deptid and whether or not you desire those employees whose account codes are considered salaried ('112800','112130','112140','112160') included in the results. The query contains 29 employee identifiable fields. An employee is only returned IF they had an epar hire form action of HIR (hire), REH (rehire) or XFR (transfer to/from another department). If you desire additional fields for your employees, contact Jason McClain in the office of the provost of academic affairs. The default sort for the results is by the employee id#, you may send the results to excel to perform additional selection and sorts.

11. Jepar09a: ePAR hire form data w/ACA hrs. Returns the same 29 fields as jepar09 with three additional fields. Start date, end date and projected hours. These fields are specific to the Affordable Care Act (ACA) data keyed into the par form. The query will only return data for your employees who have had ACA hours keyed into their epar form.

12. Jepar09b: ePAR hire form: future dates. Contains the exact same prompts as jepar09. As of 5/7/2015, there is an anomaly for a very specific population of employees who are hired. IF the employee is being hired for the first time ever, AND you are keying the epar in the future, that employees data will NOT be returned by the jepar09 or jepar09a query. We are researching a more permanent solution, but have no date at this time if/when it may be fixed. So, IF you run jepar09 and are missing some records which you know you keyed, you are encouraged to run jepar09b using a date range which includes the future dated hire date. ALL of the records returned by jepar09 should also be returned by jepar09b, as well as the first time future dated employees as just described.

Page 5 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 6: Instructions and FAQ's for HR Queries

13. Jepar10: ePAR Empl Verify Form. The results of this query are meant to be run as a BIP report. Navigation to that report is as follows: Reporting tools, BI Publisher, Query Report Viewer. You may also run this underlying query which will return the underlying data which is used when the BIP report is run. In addition to the same five prompts as those contained in jepar09, this query/report can be run for a single emplid. Use this method if you desire to print a single employee verification report. Each employee selected by the BIP report will yield a single page in the final results with a page break by the emplid#.

14. Jepar11: List of employees by dept. Prompts for an as of date and an optional 6 digit deptid. Returns 17 fields (again, contact Jason McClain if you desire additional fields) for all of the employees to which you have been granted access.

15. Jepar11a: List of deptids you can access. Prompts for an as of date. Returns aggregate data of the number of employees with the listed 6 digit deptid you have been granted access to by IS Security.

16. Jepar11b: List of account codes. Contains no prompts, returns a list of valid account codes whose values you may need to run other jepar queries.

17. Jepar11c: Active departments. Contains no prompts, returns a list of active 6 digit department id numbers (aka org codes) whose values you may need to run other jepar queries.

18. Jepar12: Avg wait; by role your deptids. Is similar to jepar08, but this version only returns data for the epars of those employees who you have been granted access to by means of their 6 digit department id numbers. Returns aggregate data based upon a prompted for epar origin date range.

19. Jepar13: Avg wait; by sts your deptids. Is similar to jepar08a, but this version only returns data for the epars of those employees who you have been granted access to by means of their 6 digit department id numbers. Returns aggregate data based upon a prompted for epar origin date range.

20. Jepar14: JOB changes. This query is built over a primary HRMS record named JOB which contains a row of data for each employee and the various actions (and actions reasons) which affect their employment activities. Although each and every ePAR task which you key for any of your employees can be returned by this query, the primary purpose of this query is not necessarily tied to ePAR activity. You must provide a date range related to when the JOB changes took place. The other three prompts are all optional. BE VERY CAREFUL if leaving any/all of the last three prompts blank, as the number of rows of data returned by the query COULD be numbered in the thousands depending upon the number of departments you can access. The third prompt if for a single action code, use the magnifying glass to look up the values if you are unfamiliar with them. Likewise, the last two prompts (emplid and deptid) are optional. ePAR data is keyed into at least three records based upon the actions. If applicable, the corresponding ePAR form ID value is returned with the row of employee data. If there are no values in any of the three ePAR form ID fields, it means the row of data was not keyed into the ePAR system.

21. Jepar15: Contract end date stdn workers. Contains no prompts. Returns active student wage workers (those whose account code begins with 114) and their future termination row of data (aka contract end date). When you key an epar with a contract end date for a student wage employee, it is keyed into the HRMS system as a future dated termination row of data. The field returned in this query, labeled contract end date, will be one day AFTER the actual contract end date. Use results of this query to determine if you desire to extend a student wage workers contract by entering the appropriate epar form. IF the contract is allowed to expire, you must then submit a brand new epar to rehire that same student.

22. Jepar16: Position history by deptid. Prompts for a single 6 digit department id and an optional 8 digit position number. Returns data related to everything which has ever occurred on the given position sorted in descending

Page 6 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 7: Instructions and FAQ's for HR Queries

order by the action date. Returns a list of employees who have ever been assigned to the given position number and their CURRENT employee status.

JMU Applications

This section contains a list of reporting objects whose path from the main menu in the HRMS system was originally JMU Applications. Rather than have separate sections, all such reporting and data analysis objects can be found in this section. These reports were originally written using a reporting tool called Crystal reports. Crystal reports are no longer supported in future PeopleTools releases, so the reports were all rewritten using BI Publisher. IF the path to a report includes BI Publisher (BIP), you may also desire to run the PeopleSoft query which is used as the data source to return the raw data to multiple file formats such as MS Excel. All BIP reports (unless otherwise noted) use PeopleSoft query as their data source whose query name is the same as the BIP report name. Section last updated 10/19/2017.

1. jbu002: Budget Expenditure Report. The original path to this Crystal report was: JMU Applications>JMU Budget>Budget Expenditure Report. The replacement report can be run by navigating from the main menu: Reporting Tools>BI Publisher>Query Report Viewer. This path will allow the BIP report to be run interactively by searching for a report named JBU002, selecting the View Report hyperlink, and entering the appropriate values in the prompts. You may also desire to schedule the report using the Query Report Scheduler. The advantages of scheduling a BIP report are numerous.

a. Although it requires that you create a run control the first time you run the BIP report, subsequent runs allow you to select the already created run control which can save time.

b. You may use the distribution hyperlink available on the process scheduler request panel to have the results of the report emailed to yourself and other users.

c. . Scheduled reports can be set to recur (run daily, weekly, custom date series, etc.)

2. jpy029: Payroll Expenditure Report. The original path to this Crystal report was: JMU Applications>JMU HR>Employee Inquiry>Personnel Expenditures Report. The replacement report can be run by navigating from the main menu: Reporting Tools>BI Publisher>Query Report Viewer. This path will allow the BIP report to be run interactively by searching for a report named JPY029, selecting the View Report hyperlink, and entering the appropriate values in the prompts. You may also desire to schedule the report using the Query Report Scheduler. The JPY029 BIP report was designed in a manner for those users who desired the exact same format as the previous Crystal report. For users who desire the raw data, it is suggested you run either of the PeopleSoft queries whose name begins with JPY029. The JPY029A version allows the user to enter a range of pay run ids, and an optional deptid prompt. If the deptid prompt is left blank, the query will return data for all deptids to which you have been granted access. By sending the query results to excel, you are free to perform additional data analysis such as the use of Excel pivot tables, reformatting, resorting and subtotals, etc. etc.

3. jpy030: Payroll rpt by fiscal year. Can be run as a query (Reporting Tools, Query Viewer) or as a BIP Report (Reporting Tools, BI Publisher, Query Report Viewer. This report is hard coded to return all payroll data for the CURRENT fiscal year. The only optional prompt is the deptid. IF you desire results for all department id numbers to which you have been granted access, leave this prompt blank, else enter a single deptid to which you have access.

4. jpy030a: Rpt by pay end date range. Can only be run as a query. Prompts for a single optional deptid and a date range corresponding to the date range of the payroll cycles desired in the results. The results are then aggregated by the month.

5. jhrbip01: Authorized Signers by Dept Report. The original path to this Crystal report was: JMU Applications>JMU Payroll>Signature Authorization>Auth Signers by Dept Report. The replacement report can be run by navigating from the main menu: Reporting Tools>BI Publisher>Query Report Viewer. This path will allow the BIP report to be run interactively by searching for a report named JHRBIP01, selecting the View Report hyperlink, and entering the appropriate values in the prompts. You may also desire to schedule the report using the Query Report Scheduler.

Page 7 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 8: Instructions and FAQ's for HR Queries

6. jhrbip02: Authorized Signers by Empl Report. The original path to this Crystal report was: JMU Applications>JMU Payroll>Signature Authorization>Auth Signers by Empl Report. The replacement report can be run by navigating from the main menu: Reporting Tools>BI Publisher>Query Report Viewer. This path will allow the BIP report to be run interactively by searching for a report named JHRBIP02, selecting the View Report hyperlink, and entering the appropriate values in the prompts. You may also desire to schedule the report using the Query Report Scheduler.

7. jhr_xml008: Training session roster. The original path to this Crystal report was: JMU Applications>JMU HR>Training Session Roster Report. The replacement report can be run by navigating from the main menu: Reporting Tools>BI Publisher>Query Report Scheduler. This path will allow the BIP report to be scheduled. The first time you run this report, you will need to add a new run control which I suggest you name the same as the underlying BIP report, jhr_xml008. To add a new run control, type the name and press Add. Use the drop down box to select the data source as a connected query named jhr_xml008 and press the search icon. You will be prompted for the data you desire to be returned, enter appropriate values and press OK. This report will require you enter the same data three separate times, this due to the nature of the report. Once you have entered all of the appropriate data, you will be returned to the Query Report Scheduler page. Press the Save button to save your run control values, then press the Run button to advance to the Process Scheduler page. On the process Scheduler Page, select PSUNX as the server. The type and format options determines WHERE the actual report output will reside. IF you desire the results be emailed to you, select email as the type, leave the format at PDF. You may want to follow the Distribution hyperlink to supply an email subject and message text, otherwise, the email will arrive in your inbox with a blank subject line and message text. When you have finished entering data on the Process Scheduler Request page, press the OK button to schedule the report. For subsequent runs, you can search for the run control you just saved vs. having to rekey all of the data. There is another version of this report named jhr_xml017 which may also be run, it’s format is a bit different is all. It’s data source is a connected query named jhr_xml017 which you will need to provide when you schedule the BIP report.

8. jhr_xml007: Training course stats. The original path to this Crystal report was: JMU Applications>JMU HR>Training Course Stats Report. The replacement report can be run by navigating from the main menu: Reporting Tools>BI Publisher>Query Report Scheduler. This path will allow the BIP report to be scheduled. The first time you run this report, you will need to add a new run control which I suggest you name the same as the underlying BIP report, jhr_xml007. To add a new run control, type the name and press Add. Use the drop down box to select the data source as a connected query named jhr_xml007 and press the search icon. You will be prompted for the data you desire to be returned, enter appropriate values and press OK. This report will require you enter the same data three separate times, this due to the nature of the report. Once you have entered all of the appropriate data, you will be returned to the Query Report Scheduler page. Press the Save button to save your run control values, then press the Run button to advance to the Process Scheduler page. On the process Scheduler Page, select PSUNX as the server. The type and format options determines WHERE the actual report output will reside. IF you desire the results be emailed to you, select email as the type, leave the format at PDF. You may want to follow the Distribution hyperlink to supply an email subject and message text, otherwise, the email will arrive in your inbox with a blank subject line and message text. When you have finished entering data on the Process Scheduler Request page, press the OK button to schedule the report. For subsequent runs, you can search for the run control you just saved vs. having to rekey all of the data.

Facilities Management

Queries whose name begins with jfm. Primary contact for the lock shop queries is Sherry Reed [email protected] The jfm001-xxx series was originally written to be run by a facilities management landscaping employee. They are now run by HR representatives for FM (Courtney Lear, Jason Saunders, Deanna Glass) whose row level deptid access has been granted to just FM deptids, so this series ORIGINALLY did NOT include any deptid logic. However, in 2015, Deanna Glass requested that the entire series be changed to include specific hard coded deptids as documented. Section last updated 10/18/2017.

Page 8 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 9: Instructions and FAQ's for HR Queries

1. jfm01: All employee data for lock shop. Runs daily at 10 PM and emails results to the lock shop email address. Selects new employees based upon the system date. Used for importing data into the lock shop system used to track keys on campus. Do not alter fields as lock shop system expects data in a specific format. Uses a recurrence definition=jfm01.

2. jfm01_terms: Terms for lock shop. Similar to jfm01 in logic, but this version selects termination rows so lock shop can determine if they need to contact employee to return keys.

3. Jfm001: ALL FM employees. Contains one prompt for as of effective date. Is hard coded to return the following deptids: ('100224','100232','100238','100250','100254','100255','100258','100259','100264','300129','300130','300131','300132','300195','300259','300293','100252','400210','300128')

4. Jfm001a: FM supervisor emails. Contains the same as of date prompt as jfm001. This version returns just the names and JMU email addresses of the supervisors in the 19 hard coded deptids listed above.

5. jfm002: FM leave balances. Contains one prompt for as of effective date. Returns Leave balances for active FM employees in two deptids (for landscaping) ('100258','300130').

6. jfm003: FM leave transactions. Returns leave transactions for active FM employees in the landscaping deptids 100258 or 300130 between the prompted date ranges.

7. jfm004: FM 1500 hour data. Contains one prompt for as of effective date. If you desire employees for just one FM deptid, send results to excel and sort/delete as necessary. Returns 1500 hour data for active FM employees in the 19 deptids listed above.

8. jfm005: FM training. Contains one prompt for as of effective date. If you desire employees for just one FM deptid, send results to excel and sort/delete as necessary. Returns ALL training data for active FM employees in the 19 deptids listed above.

9. jfm006: FM HIR/REH/XFR/TER. Contains no prompts. Designed to be run by Deanne Glass as a recurring scheduled query using a recurrence definition of JFM01 which runs daily at 10 PM. Deanna uses the results to email specific users who need to know that an FM employee has a specific action of XFR, HIR, REH or TER. Hard coded to return data for just the system run date. When scheduling the query, make sure to set the server name=PSUNX, type=Email and format=XLS. Click the distribution hyperlink to add an appropriate email subject and body as well as add the necessary eids to receive the attached spreadsheets which results when the scheduled queries run each day at 10 PM. Is hard coded to only return data for the 19 deptids listed above. The jfm006a and jfm006b versions return specific JOB actions as indicated in their description, for the previously listed 19 deptids.

10. jfm007: FM missing emergency contact. Contains no prompts. Meant to be run as a BI Publisher report by Deanna Glass which yields a bursted PDF file attachment to each FM supervisor who has one/more employees with missing emergency contact information. Can be run as often as desired or a recurrence could be defined to recur weekly, etc. Is hard coded to the 19 deptids listed above.

Working with scheduled queries

Page 9 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 10: Instructions and FAQ's for HR Queries

Query Manager interacts with PeopleSoft Process Scheduler to enable you to schedule queries as opposed to running them interactively. Recurrences can be created for almost any combination; once per week, daily @ a specified time, once a term, etc. The four steps to working with scheduled queries are as follows. Submit process requests, Select process requests, Use Process Monitor and View output in Report Manager.

Page 10 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 11: Instructions and FAQ's for HR Queries

Submit process requests1. A process request enables you to submit a job or process to run. The Schedule Query page submits a process

request and brings up the Process Request page, which enables you to specify such variables as where to run the process and in what format to generate the output based on a run control ID.

2. With the schedule query screen present (see above) you’ll need to either search for and select from an existing run control, or add a new one. In this case, a run control will be used to hold the values of the prompts to be used in your scheduled query. If the query you want to schedule has no prompts, you still need a run control. If you previously created a run control, type the name of the run control and press search. If you do not know the name of the run control, simply press search and all of your run controls will be returned.

3. To add a Query Name click Add a new value, Enter the name of a run control, and press Add

Page 11 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 12: Instructions and FAQ's for HR Queries

4. The schedule query screen (see above) appears. Type the name of the query you wish to schedule in the query name field, and press search. If the query contains prompts, the prompt screen appears. Enter appropriate values for the prompts and press OK

5. You will return to the schedule query screen (see above) with the first six prompts present. Pressing the SAVE button at this time will save your run control with all of the prompt values just entered.

Select process requests1. The Process Scheduler Request page enables you to set the server, run date and time, how often the process

runs (the recurrence of the process), output type, and format. The Process Monitor can be used to view the status of your process requests. You can access the Process Monitor by clicking the Process Monitor link on the Schedule Query page or by navigating to PeopleTools, Process Scheduler, Process Monitor. Process Monitor consists of two pages: the Process List page and the Server List page.

a. The Process List page enables you to monitor the process requests that you have submitted. b. You can select filtering options—for example, process type and run status—to view only selected

process requests. And you can click the Details link to view details that are associated with particular process requests.

c. The Server List page enables you to monitor the PeopleSoft Process Scheduler server agents within your system.

Page 12 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 13: Instructions and FAQ's for HR Queries

2. Press the RUN button (upper right corner), the process scheduler request screen appears (see above). If this is a new process definition, use the drop down box on the Server Name field, and select PSUNX. Unless you desire output other than a MS Excel spreadsheet, make sure the TYPE and FORMAT values read WEB and XLS.

3. Recurrence. If you simply desire the query to run once as a submitted job, press the OK button and continue with the next section regarding Report Manager. Else, select a recurrence theme. There are many recurrence themes available. Choose the recurrence theme that meets your needs and press OK. Any questions about recurrence can be directed to Pete DeSmit [email protected] or [email protected].

View output in report manager1. Report Manager is like your own personal inbox of reports and process output. It provides a secure way to view

report content, check the posting status of your output, and see content detail messages. View all of your reports by opening your Report List in your browser. Select Reporting Tools, Report Manager, or click the Report Manager link on the Schedule Query page.

2. Once a query is scheduled to run, you’ll return to the schedule query screen (see above). You can access your query results by following either of the hyperlinks labeled Report Manager or Process Monitor. If you have taken the HRMS overview class, you should already be familiar with navigation within the Report Manager screen.

Page 13 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 14: Instructions and FAQ's for HR Queries

3. With the report manager screen present (see above) click on the description name hyperlink on the row representing the scheduled query you desire. If you’re unsure of which row of data represents the results you are looking for, perhaps the report date/time column can help.

4. With the report detail screen present (see above), follow the hyperlink for the query results.

Running a BI PUBLISHER report with bursting the first time

A BI PUBLISHER report which contains bursting must be run thru the process scheduler. This means that each user who desires to run a report must add a new run control for the first run. Special details follow:

1. WARNING: The normal end result of a “report” is an object (spreadsheet, pdf, etc.) which the user who runs the report can interpret prior to distribution. In other words, if something is WRONG with the report, the user has an opportunity to make changes and rerun the report. When a BI PUBLISHER report includes bursting, the end result are emails sent from the system to the intended recipient. It is highly suggested you run the query underlying the BI PUBLISHER report BEFORE you allow the bursting feature to send emails. This will allow you to review the data and determine if it is indeed the data you desire to email. Under normal circumstances, the name of the BI PUBLISHER report is the same name as the query or connected query. You might also consider reviewing the shell RTF document which is part of the BI PUBLISHER report; especially if the merge document is prone to frequent changes. Better to review the doc before sending it vs. being sorry you sent an incorrect shell document.

2. Adding a run control. Navigate: Reporting Tools/BI publisher/Query Report Scheduler. Suggest you name the new run control the same as the underlying BI PUBLISHER report, press Add.

3. The data source will be query unless you were told the source is a connected query. Type the name of the BI PUBLISHER report (again, probably the same as the process scheduler request) and press the magnifying glass. IF you are scheduling an BI PUBLISHER report for which the underlying definition has changed since the last time it was run, the field named template id MAY need to be updated to reflect this change. The template id, by default is the name of the query and BI PUBLISHER report suffixed with a single digit which increments (_1, _2, _3, etc.)

4. IF the underlying query has prompts, they should appear. Enter appropriate values in the prompts, then press OK.

Page 14 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 15: Instructions and FAQ's for HR Queries

5. On the query report scheduler screen, make sure the values entered for the prompts appear. If not, or if running the report subsequent times, press the Update Parameters hyperlink to change the prompted values to use for the report run. You may wish to save the run control at this time, then press the Run button.

6. Set the Server Name to PSUNX, the Type to Email and the format to PDF . IF you desire a format other than PDF, let Pete DeSmit know so the report definition can be changed.

7. Click the distribution hyperlink. Leave the folder name blank. Enter an appropriate value in the email subject field. Enter an appropriate value in the message text field. The actual report contents will be sent as a file attached to the email, NOT in the body of the email. For this reason, it is highly suggested the message text include some verbiage of the form: Please see attached for xyz and do this that or the other thing with the contents.

8. UNLESS you want each and every bursted value to be sent to someone OTHER than the intended person, leave the Email Address List blank (default). Entering one or more valid email addresses in this field is the equivalent of adding the email address to a normal email message. PLEASE BE CAREFUL ENTERING EMAIL ADDRESSES IN THIS FIELD. Remember, the email addresses you enter will receive one email for each intended user, which may be hundreds, sometimes thousands. Also remember you are bound by University data stewardship policies and procedures. Sending JMU data to an email address outside JMU should be carefully considered prior to use.

9. Leave the defaults (your eid) in the Distribute To field. Like the email address list box described above, you may add rows and enter valid eids into this field. Same warning applies to the use of this field as noted above. PLEASE BE CAREFUL ENTERING DATA IN THIS FIELD! The eids you enter will receive ALL bursted results.

10. Leave the email with log and email web report check boxes OFF11. Click OK, then OK. The report should now be scheduled. The bursted results should appear in the inbox of the

person running the report with a copy sent to the intended recipient.12. All bursted emails will be sent from an email [email protected]. Although this email address

is monitored by the Information Systems product team, your email body should ask the recipients to NOT use the reply or reply-all feature. As a courtesy, you are asked to send an email message to [email protected] prior to running an BI PUBLISHER report which utilizes bursting stating when the report will be run, and approximate number of emails being sent and to whom to forward any replies they receive. Again, if a recipient uses the reply or reply all button, emails are returned to the address [email protected] monitored by the HRMS team. They would appreciate knowing who to forward such emails to.

Run, locate, and view BI publisher reports. BI PUBLISHER reports which do NOT include bursting, can also be run without being scheduled. Navigate: Reporting Tools/ BI publisher/Query Report Viewer. Search for the report, then press the hyperlink labeled “view report” after selecting which format you desire. After the report runs, output will appear in a new window.

Level 1 create query access

The following describes features (and tasks required for certification) of what is known as level one query access. A user must complete an IS access request form to request access to the query tool.

1. Will still be able to create/modify queries (no limit on the number of record joins). 2. Will require the user pass a certification test after attending a required 2 hour training session. Create a public

query (one for each branch of the query security tree granted to you) named their eidxx (xx=sequence number) with the following specifications:

a. Includes at least one outer join, explain when outer joining is desired/required. Use either old or new outer join syntax. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq06.htm#H4011

b. Includes at least one prompt and explain when/why prompts are useful. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq04.htm#H4021

Page 15 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 16: Instructions and FAQ's for HR Queries

c. Includes at least one effective dated record with appropriate criteria to either look into the future or returns data as of a specific date (versus the default effective dated logic which returns data as of the system date) or returns future dated data. Explain the logic behind effective dating and how it may apply to their specific records. Waive this requirement if NONE of the records the user has access to includes effective dated fields. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq04.htm#H4016

d. Includes at least one aggregate function (feel free to use a different query name). http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq06.htm#H4003

e. Includes at least one translate value with either the short or long description vs. the field value. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq06.htm#H4003

f. Includes at least one exists or does not exist sub query OR the ability to explain in writing why such criteria may be desired/required/useful. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq06.htm#H3005

g. Includes at least one of the three types of drilling URL’s http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm?File=tpsq/htm/tpsq04.htm#H3029

Level 2 create query access

The following describes features (and tasks required for certification) of what is known as level two create query access. A user must complete an IS access request form to request access to the query tool.

1. Nothing will prevent a user from seeking level 2 access if their job duties, and their skills/abilities allow them to become certified.

2. Will require user pass a certification test on their own time after attending a required 4+ hour 1:1 training session. Will let users seeking this role know they are looking at least a 16 hour time commitment to attend the training session and create the objects for the certification process. In addition to passing the level 1 certification, additional tasks include those below. Embedded hyperlinks can be used to research features.

i. Query manager task. Create/save a public query named eid01 (replace the three letters eid with your eid). The query should include the following specifications. Note: if all of the following specs are placed in the same query, it may not necessarily return data. The query writer needs to be prepared to answer why the query does not return data.

1. At least one expression making use of the following SQL commands: DECODE, SUBSTR, CASE, concatenation.

2. http://www.techonthenet.com/oracle/functions/decode.php 3. http://www.techonthenet.com/oracle/functions/substr.php 4. http://www.techonthenet.com/oracle/functions/case.php 5. http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/

operators003.htm ii. Query viewer task. Demonstrate use of the advanced search functions and explain when each

might be used. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/chapter.htm?File=tpsq/htm/tpsq03.htm%23g037ee99c9453fb39_ef90c_10c791ddc07_518

iii. Scheduled query task. Schedule your eid01 query with a recurrence of your choosing. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tgbl/book.htm?File=tgbl/htm/tgbl12.htm#H4003

Page 16 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 17: Instructions and FAQ's for HR Queries

iv. Connected query task. Create/save a public connected query named eid01 (replace the three letters eid with your eid). The query should include the following specifications. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tpsq/book.htm

1. At least one child query with at least one related field mapped to the parent. Use any query naming convention you desire for the parent/child queries.

2. At least one child query with no related fields mapped to the parent, and an explanation of how the connected query results will differ from those connected to the parent

v. BI publisher tasks. http://download.oracle.com/docs/cd/E15645_01/pt850pbr0/eng/psbooks/tBI publisher/book.htm

1. Add a data source, whose source is the connected query previously created. Name the data source your eid. Generate the BI PUBLISHER file.

a. Create an RTF document which makes use of the data elements present in the connected query previously created. Name the document your eid01. The document should include one table for each of the parent and child queries present in the connected query. Do NOT group the parent and child data.

b. Create an RTF document which makes use of the data elements present in the connected query previously created. Name the document your eid02. The document should include one table for each of the parent and child queries present in the connected query. Group the parent and child data and be prepared to explain how/why the results may be different than the version of the document without grouping.

2. Add appropriate report definitions for each of the RTF documents created above. Name them the same as the RTF document and include the RTF document as the only active template. If you care to change any of the default settings in any of the report definitions, be prepared to explain why and what affect the change may have on the output.

Reporting Guidelines when a member of IS performs research/work.

1. A PIQ is required for the following scenariosa. If new access (to one/more records) is required of a user who can already create and/or run

queries/reportsb. Anytime a reporting object includes one/more highly confidential (defined in data stewardship policy)

fieldsc. A new query is created, and not cloned as defined belowd. Data analysis results are to be sent to/saved for a user that does not have access to obtain the results

themselves. Note, there are a few of these scenarios already in place which were previously authorized. They include:

i. employee appreciation day data is provided to IS web (John Sewall now) once a yearii. credit hour and graduation expectations are provided to Debby Boyle twice a year for emplids

she provides to determine if her employees are graduatinge. An BI PUBLISHER report includes burstingf. If a query is being modified for a purpose other than was originally intended. Examples:

i. The series of queries built to feed the TK20 system are modified in a manner to allow the query results to feed a system other than TK20

ii. ANY query is modified in ANY manner whose data is to be used outside of JMU where before it had not been. In other words, take a regular old day to day query used for internal use only, and modify it to feed data to an agency outside of JMU.

2. A issue and op is required for anything not covered in the PIQ section above. This includes, but is not limited to the following scenarios

Page 17 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 18: Instructions and FAQ's for HR Queries

a. A data analysis object is cloned. Cloning is defined as taking an existing object (query, crystal, BI publisher report, connected query, etc.) saving it as a different name, then altering the new object in any manner at all. Cloning cannot be used if the intent and/or purpose of the data analysis object is not the same as the original object.

b. Adding/changing/deleting any of the following query attributesc. Title, name, long description, folder, owner, distinct parameterd. Expressions and promptse. Criteria, and having criteriaf. Anything on the fields tab (aggregation, translations, adding, deleting, changing the order of a field, etc.)g. One or more recordsh. One or more unions

3. An issue and op is NOT required for the following scenariosa. Research for a user which results in less than 15 minutes time on taskb. Assisting a user who can create their own data analysis objects which results in less than 15 minutes

time on taskc. One time use objects with aggregate data (no student identifiable data) which results in less than 15

minutes time on task.4. Special considerations for auditors (if it matters, state the level of auditor the practice applies to; JMU, state,

etc.)

Troubleshooting queries

This section was added as a result of frequently asked questions. If you have any questions about these or any queries within your PeopleSoft HRMS system, feel free to contact Pete DeSmit ([email protected] or 83605). You are also welcome to contact Pete if you have suggestions for new queries or proposed changes to an existing query.

1. I am using the results of a query in a mail merge process, but the leading zeros for the zip code disappear, why? Pete spent time trying to get MS Excel to behave itself when working with zip codes with leading zeros. All attempts which should have worked, did not. A work around follows. Open the spreadsheet which contains the zip code field. Right click on the column and select format cells. On the number tab, select custom as the category. Below the “type:” field enter five zeros and press OK. Now save the spreadsheet using file-save-as and select the format named “text (tab delimited) (*.txt)” in the save as type prompt. Use this .txt file as your data source for the merge process. The leading zeros for the zip will appear.

2. I try to send results to Excel from query viewer, and the results magically disappear, try following these steps to correct the issue. On Windows XP, if the setting for the file type=xls is changed for the new action, the field labeled “confirm open after download” is checked OFF, all works fine

3. On Windows 7, you cannot change the file type settings With IE open, navigate: Tools, Internet Options, Click the security tab. Click trusted sites, click customer level. Scroll down to the Downloads section. Make sure the radio buttons for Automatic Prompting for File Download AND File Download are set to Enabled.

4. PeopleSoft queries and the proxy error. First, why the error. In non-technical terms, the system serving interactive requests is too busy. The system which serves interactive users is optimized for what that system does most; serving up pages to HRMS core users. Second, possible solutions.

a. Once you receive a proxy error, you will have no choice but to close your web browser, launch a new session and log back into the HRMS system. You then have a choice of how to receive your query results. You COULD attempt to run the query interactively again. And yes, IF the system serving interactive users

Page 18 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 19: Instructions and FAQ's for HR Queries

is still too busy, you will once again receive the same proxy error, and need to repeat the steps to close the browser session, re-launch, log back in, and repeat. OR you could …..

b. Schedule the query. It is a fact there are more resources for HRMS processes which are scheduled, including scheduled queries. It is also a fact that scheduling a query and obtaining the results takes more time navigating the panels. Scheduling queries is a much better use of system resources, and the servers which run the scheduled queries are optimized for such tasks. The first time you schedule a query, there are a few extra steps required, but subsequent runs are far fewer steps. Documentation related to scheduled queries can be found on page 72 of this very document.

Advanced query techniques

This section is for query writers; it contains sample expressions and how they may be used.

1. Sql to turn a time formatted field into a 12 hour format field as in query jusds010c. a. CASE WHEN (SUBSTR(E.MEETING_TIME_END,1,2) = '12' OR SUBSTR(E.MEETING_TIME_END,1,2) = '24')

THEN LPAD (TO_CHAR(MOD(SUBSTR(E.MEETING_TIME_END,1,2),12)+ 12),2,'0')ELSE LPAD (TO_CHAR(MOD(SUBSTR(E.MEETING_TIME_END,1,2),12)),2,'0') END || ':' || SUBSTR(E.MEETING_TIME_END,4,2)

b. Working with a query in which a date/time stamp field needed to be part of the selection criteria. Specifically, needed the scheduled query to run twice a day and pull data which had occurred within the past 12 hours. This calc works. TO_TIMESTAMP (TO_CHAR (SYSTIMESTAMP - 24/24, 'MM-DD-YYYY HH24'), 'MM-DD-YYYY HH24')

2. Calculating age and other date expressions First of all, all dates in query are turned into character fields. So any manipulation of them as dates, requires that they be turned BACK into a date. Sounds strange, and looks even more strange.

a. Expression to return a date in the format: December 12, 2012: TO_CHAR(TO_DATE(A.TERM_BEGIN_DT),'MonthDD, YYYY') as a 20 character expression

b. Find the difference between a date and the system date: ROUND(MONTHS_BETWEEN(SYSDATE,TO_DATE(A.CMPNY_SENIORITY_DT,'YYYY-MM-DD'))/12,1)

c. Expression to return the number of days from the current system date and a specific database field of type date: TO_DATE(field_name) – SYSDATE. Make sure to accommodate negative values in the returned expression

d. Round(months_between(sysdate,to_date(A.BIRTHDATE,'YYYY-MM-DD'))/12,1e. TRUNC((TO_DATE('01/01/'||TO_CHAR(SYSDATE,'YYYY',),'MM/DD/YYYY')-BIRTHDATE)/

365,0),TRUNC((SYSDATE-BIRTHDATE)/365,0)f. or this syntax works to determine the # of years between a date and todays date: (SYSDATE-

TO_DATE(A.HIRE_DT,'YYYY-MM-DD'))/365g. to add a number of days to a date field: %dateadd (A.hire_dt,90)h. to subtract two dates: (TO_DATE(A.ACTION_DT,'YYYY-MM-DD')-TO_DATE(A.ORIG_HIRE_DT,'YYYY-MM-

DD')) BUT Oracle ends in error if you then try to use this on the criteria tab, best to include the field and delete rows you do not want, if that is feasible

i. I was looking to determine who would turn 65 within the next 3 months. So I simply took today's date and subtracted the number of days that it would take for them to be 65 years old. AND B.BIRTHDATE BETWEEN SYSDATE - 23742 AND SYSDATE – 23648

j. Needed to find the number of days between sysdate and a field of type datetime. Expression needs to be a number, syntax like this: TRUNC(SYSDATE)-TO_DATE(SUBSTR(A.ACTION_DTTM,1,16),'YYYY-MM-DD-

Page 19 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 20: Instructions and FAQ's for HR Queries

HH24.MI') Which is basically taking the 16 characters of the date/time field, reformatting it to be a true date in 24 hour format, and subtracting it from todays date. The TRUNC function against sysdate causes it to use midnight as the time instead of the actual current time.

k. How to get extract only Month from a date field. The Query tool automatically converts date fields into character fields, so you'll need to turn it back to a date first, then convert it back to a character field. This is an expression I've used that works: TO_CHAR(TO_DATE(A.GIFT_DT,'YYYY-MM-DD'),'fmMONTH')

l. Used to extract the number of weeks (1-52) the system date is so can use in an expression: to_number(to_char(to_date(SYSDATE), 'WW'))

3. References for SQL commands and other query referencesa. http://www.techonthenet.com/oracle/index.php b. http://www.techonthenet.com/oracle/functions/index_alpha.php c. http://www.oracle.com/pls/db102/portal.portal_db?selected=3#index-SQL d. http://it.toolbox.com/wiki/index.php/List_of_Useful_PS_Query_Expressions e. http://www.access.qbuilt.com/html/queries.html#RunningTotal

4. Numeric expressionsa. Need to write a numeric field without decimals to a seven digit number with leading zeros:

lpad((ded_bal * 100),7,’0’)5. Will the order of the table-names in the FROM clause, influence the execution speed of the query? This rule is

for when the oracle optimizer is stuck for a good idea. The Oracle optimizer works in the following manner. It looks at each of the WHERE clauses and assigns the tables concerned a number based on the type of predicate e.g. field = 'const' or field(+) = field. It then chooses the table with the lowest score as the driving table. But, and its a big one, if more than one table has the same lowest score then it chooses the last table in the FROM list to be the driving table.

6. Case a. The technical syntax for this expression is (CASE WHEN criteria1 THEN return value1 WHEN criteria2

THEN return value2….. THEN default value)b. CASE WHEN A.DEPTID = '100113' THEN 'A' WHEN A.DEPTID = '100211' THEN 'B' WHEN A.DEPTID =

'300159' THEN 'C' ELSE 'D' ENDc. Case statement to change an @dukes email address in email_addresses to jmu: CASE WHEN

instr(B.EMAIL_ADDR,'dukes',1)>0 THEN SUBSTR(B.EMAIL_ADDR,1,instr(B.EMAIL_ADDR,'dukes',1)-2) || '@jmu.edu' ELSE B.EMAIL_ADDR END

d. Query does NOT like a case statement to be in this format: when A.deptid=’100211’ it likes the format: a.deptid = ‘100211’ complains if the spaces are missing.

e. Case statements can be very complex, using nested if then else logic, a series of decode and other statements, etc.

7. If you want to do an outer join from table A to table B and table B is effective dated, create the following in the query criteria AND (B.EFFDT Effdt <= Current Dt OR B.EFFDT IsNull )It's not as easy to read as the (+) syntax but it gives the same results and it allows you to use subqueries in your outer join.

8. Used the following expression in a query when I needed to look for “bad” characters in an email address field. The command transforms all of the characters that are “bad” into a tilde character. instr(translate(B.EMAIL_ADDR,'!?#$%;;<>|\[]','~~~~~~~~~~~~~'),'~'). I then added a row to the criteria tab stating the instring operator to locate a tilde character >0, meaning, if any of the translated characters became a tilde, then there was at least one “bad” character in the email address

9. Substring

Page 20 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 21: Instructions and FAQ's for HR Queries

a. The technical syntax for this formula is SUBSTR (character, starting point, length to return)b. The most basic form of this expression creates a field named “course” from the subject and catalog

number fields. The syntax takes into account the fact that the 1st character of the catalog number is actually blank/null. SUBSTR(A.SUBJECT,1,5) || SUBSTR(A.CATALOG_NBR,2,4). It would appear that the delivered format of the catalog_nbr field allows the format: nnnnxxxxxx where the first 4 places have to be numeric. IF a course is entered with alpha characters at the beginning of the catalog_nbr field, it appears to shift the values to the right. In these cases, when using the substr function, you must also use the TRIM function to remove the leading spaces.

10. In string. Returns a number equal to the position in the text field where a string is located. A value of zero indicates the absence of the string. The in string command is sometimes used in conjunction with other commands as in the case of the above example whereby the JMU email address is checked for the string=”dukes” and that portion of the email address is removed for instructors. The syntax is instr(FIELDNAME,'String_To_Search_For',starting_position). So if the expression: instr(B.EMAIL_ADDR,'dukes',1) returned a value greater than 0, it indicates the email address contains the letters “dukes” and a substr expression could be used to remove same.

11. Count distinct. Set the expression field type to numeric, and the expression to something like this: COUNT(DISTINCT A.ACAD_CAREER || A.ACAD_YEAR). The distinct operator will be applied to whatever is within the parenthesis. Very useful when attempting to get distinct counts when the query results return multiple rows of data by, say, emplid.

12. Concatenation a. This action can be achieved by using a special operator or symbol of ||. On your keyboard the | key is

the capital of the \ key which is located above the Enter key.13. Decode. In Oracle/PLSQL, the decode function has the functionality of an IF-THEN-ELSE statement.

a. The syntax for the decode function is: decode( expression , search , result [, search , result]... [, default] ) i. expression is the value to compare.

ii. search is the value that is compared against expression.iii. result is the value returned, if expression is equal to search.iv. default is optional. If no matches are found, the decode will return default. If default is omitted,

then the decode statement will return null (if no matches are found).b. How to create expressions that will allow a user to prompt for a particular value or get all values

i. Create a DECODE expression for the right hand side of a criteria. Such as AND K.ITEM_TYPE = DECODE(:25, ' ', K.ITEM_TYPE, :25)

ii. In the above sample a user has the choice of entering a specific value for item type. If the user leaves the prompt blank the criteria will logically be read as AND K.ITEM_TYPE = K.ITEM_TYPE and will pick up all values of this field. If the user enters a specific value the criteria will logically be read as AND K.ITEM_TYPE = :25 (prompted value).

c. How to create expressions that will allow a user to prompt for a particular value or get all values of a date field

i. Create a NVL expression for the right hand side of a criteria.AND A.ADM_CREATION_DT = NVL(TO_DATE(:1,'YYYY-MM-DD'),( A.ADM_CREATION_DT)

ii. In the above sample a user has the choice of entering a specific value for the Admission Data Creation Date. If the user leaves the prompt blank the criteria will logically be read as AND A.ADM_CREATION_DT = A.ADM_CREATION_DT and will pick up all values of this field. If the user enters a specific value the criteria will logically be read as AND A.ADM_CREATION_DT = TO_DATE(:1,'YYYY-MM-DD') (prompted value).

Page 21 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 22: Instructions and FAQ's for HR Queries

14. Queries used for drilling purposes. The following queries are defined in a manner to allow them to be used by other queries to be drilled TO. In all cases, the queries being drilled TO have prompts which must be configured in the expression being used to drill FROM. The fields used to drill from must be selected as a field in the from query.

a.

15. SYS_CONTEXT returns the value of parameter associated with the context namespace. You can use this function in both SQL and PL/SQL statements.

a. For a list of values see: http://psoug.org/reference/sys_context.html or http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions165.htm

b. The article was asking if there was a way for the query tool to return a report header. The response uses an expression and Oracle syntax to create such a field which contains the userid, database name and system date as the header for the report. I tested this in hprd and it worked fine. See URL’s above for other parameters for the command.

c. SUBSTR(SYS_CONTEXT('USERENV','CLIENT_INFO'),1,6) || ' ' ||SUBSTR(SYS_CONTEXT ('USERENV','DB_NAME'),1,10) || ' ' || TO_CHAR(SYSDATE)

16. Scheduled recurring queriesa. Facilities Management (lock shop). There are two queries in sprd and two in hprd as follows

i. Jfm02 in hprd; run control by same name. Type and format need to be set to Email/Text (they prefer csv file format). On the distribution tab, set the subject= New students from PeopleSoft HRMS and the email body text= The attached file contains a list of new students from the PeopleSoft HRMS system. The results are from a query named jfm02. Contact Pete DeSmit if questions. Set the email address list= [email protected]. Leave the distribute to default if you desire results of the daily run. Uses recurrence definition=10PM RUN_JCC0028 as it was already defined as a 7 day a week run at 10 PM.

ii. Jfm01 in hprd. All employee data for lock shop. Run control by same name. Type and format must be Email/Text. Distribution email subject= New hires from PeopleSoft HRMS system. Email body= The attached file contains new hires for today from the PeopleSoft HRMS system. The results are from a query named jfm01 in HRMS. Please contact Pete DeSmit if there are questions. Email address list= [email protected]. Scheduled to recur daily via a recurrence definition=JFM01

iii. Jfm01_terms in hprd. Terms for lock shop. Run control by same name. Type and format must be Email/Text. Distribution email subject= Terminations from PeopleSoft HRMS. Email body= The attached employees were terminated effective today. These results are from a query named jfm01_term in the HRMS system. Contact Pete DeSmit for further details. Email address list= [email protected]. Scheduled to recur daily via a recurrence definition=JFM01

b. Affiliates. Query and BI PUBLISHER report named jhr_BI publisher014 in hprd. Uses bursting to send email to the sponsor of an affiliate whose JOB row is terminating 14 days in the future from the run date so they can take action so affiliate does not lose any services. Meant to be run/recur daily by Chris Jones in payroll due to fact payroll is the office which receives and processes affiliate renewal paperwork to key new future dated JOB row for terminations. Logic in expression follows the affiliate policy which states how long each affiliate company can receive services. Scheduled to recur daily via a recurrence definition=JFM01.

c. SWEC. Amber Weaver-Shifflett in the financial aid SWEC office schedules the following BIP reports to run and recur daily in hprd. All use the same recurrence definition named SWEC.

Page 22 of 23 Last updated by Pete DeSmit on 10/18/2017

Page 23: Instructions and FAQ's for HR Queries

i. Jhrbip07 1314 Daily Terms Students. Was cloned from a version written by Scott Bailey in HR which now specifically excludes the three SWEC acct_cd values 114200, 114400 and 114600 when HR made the decision to no longer include SWEC acct_cd values.

ii. Jhrbip08 1314 Daily Transfers Students. Was cloned from a version written by Scott Bailey in HR which now specifically excludes the three SWEC acct_cd values 114200, 114400 and 114600 when HR made the decision to no longer include SWEC acct_cd values.

iii. Jswec04: SWEC exit clearance. Was cloned from a version written by Scott Bailey in HR which now specifically excludes the three SWEC acct_cd values 114200, 114400 and 114600 when HR made the decision to no longer include SWEC acct_cd values.

17. Common query writing tips:a. DBA’s say using a subquery with an inlist (or not inlist) operator on a single field performs better than

using the exists subquery. b. The new style outer join (known as the ANSI standard) does not always work. Specifically it has issues

when the record being outer joined is effective dated OR you need to use hard coded values, such as the email, address or name type fields. Suggest sticking with the old style method of outer joining documented above.

Page 23 of 23 Last updated by Pete DeSmit on 10/18/2017