Peoplesoft Interview Questions - SQR: Syntax: Begin-Setup
Peoplesoft Interview Questions - SQR: Syntax: Begin-Setup
There are five sections and three paragraphs available in SQR programming. The sections include
a. Begin-setup End-setup.
b. Begin-program End-program.
c. Begin-procedure End-procedure.
d. Begin-heading End-heading.
e. Begin-footing End-footing
Begin-select paragraph.
Begin-SQL paragraph.
Begin-document paragraph
2. Is it possible to increase the array size once defined?
No, it is not possible to increase the Array size once defined
3. What is Load-lookup? Give the Syntax for Load-Lookup?
The LOAD-LOOKUP command defines an array containing a set of keys and values and loads it into memory.
With LOAD-LOOKUP, you can reduce the number of tables that are joined in one SELECT. Use this
command in conjunction with one or more LOOKUP commands.
Syntax: begin-setup
load-lookup
name=prods
table=products
key=product_code
return_value=description
end-setup
We can call one SQR program from another SQR program using Call.callsystem. But this is possible only in
UNIX Operating system.
5. Briefly explain Most commonly used SQC’s in SQR programs?
1.STDAPI.sqc : This Is Process Scheduler Interface which is used to initiate and terminate some
field values such as Process_instance & Run_cntl_id
2.SETENV.sqc : This is used to set the Default Environment based on the Database such Printer
Type, Paper Size,Date formats Etc….
4.DATETIME.sqc : This file contains generalized routines to format dates and times.
Writing Data into Table Using ‘BEGIN-SQL’ paragraph & ‘INSERT’ command
ON-BREAK causes the specified action to perform in a tabular report when the value of a field changes.
The default action prints the field only when its value changes (PRINT=CHANGE).Mainly used for
Redundancy of Printing on a page.
2. #IF DEBUGxxx
#END-IF
2. DISPLAY and
3. SHOW
9. What is the difference between sqr and sqc?
SQR SQC
Source program.
2.This consists of Program Section. 2.This does not consists of program Section.
3.This can be Compiled & Executed. 3.This cannot be Compiled and Executed.
4.We cannot call one SQR from 4.We can call one SQC from another SQC or another SQR
or SQC. SQR program.
1. Column Variables.
2. List Variables.
3. System Variables.
4. Document Variables.
5. Substitution Variables.
12. How to pass Inputs for sqr program while running from windows?
Using ASK & INPUT Commands.
13. How to pass Inputs to the SQR while running through the Process Scheduler?
Using Procedures & SQC’s to access data on Run Control Page (Run Control Fields).
14. What is the purpose of Stdapi.sqc
This is a Process Scheduler Interface sqc which is used to initiate and terminate some field
values such as Process_instance & Run_cntl_id
15. What is the SQT file? What are the advantages of SQT files?
SQT’ file is nothing but resultant file after the compilation (i.e.) Runtime File. By using this SQT file for
Execution we can increase the Performance of the program by reduciong the Compilation Time.
16. What is the SQC used to read data from translate table?
This is used to set the Default Environment based on the Database such Printer Type, Paper Size, Date
formats Etc….
We can do Error handling in SQR using some command line flags such as –O, -L,-ZMF,-XMB and using
Error handling commands such as
2. Using ARRAYS.
7. Using Proper Programming Logic in SQR such as Using BREAK statement in EVALUATE
Command.
Begin-select
from Dual
End-select
Begin-SQL
<procedure-name>;;
End-SQL
23. Can you connect more than one database using one Sqr? How?
Yes.
24. What are the differences between Load lookup and Array
ARRAYS LOAD-LOOKUP
programming. Load-Lookup.
4.We can retrive any number of fields. 4.We can retrive only Two fields from
5.We have Length & Data type. 5.We don’t have Length & Data type.
6.We cannot directly print from Array. 6.We can directly print from
Load-Lookup.
25. What are the steps required to run the SQR from peoplesoft environment?
Three steps we have to fallow to run the SQR program from the peoplesoft environment (Process
Scheduler). These steps include
a. Making the SQR program API aware by calling two procedures (stdapi-init, stdapi-term) from
the Begin-program section and including the Stdapi.sqc in the bottom of the program.
b. Create new run control table or using existing run control table and creating run control page,
component and register the component. Creating new run control SQC if we create a new run
control table.
c. Giving the permission to the user by giving process groups.
26. How to pass command line flags to a sqr report running through process scheduler?
Using override options in the process definition in the Process Scheduler in the People Tools.
ON-BREAK causes the specified action to perform in a tabular report when the value of a
field changes . The default action prints the field only when its value changes
(PRINT=CHANGE).Mainly used for Redundancy of Printing on a page.
28 .How does peoplesoft Process monitor knows that the process (Say sqr report) is at what
stage such as initiated, in process, completed etc
3. #IF DEBUGxxx
#END-IF
2. DISPLAY and
3. SHOW