Structured Query Report (SQR) Interview Questions & Answers

  1. Question 1. What Is The Difference Between Show And Display?

    Answer :

    • Show is used to display more than one variable at a time.
    • Display is used to display only one variable at a time.
  2. Question 2. What Are The Debugging Commands In Sqr?

    Answer :

    Show & Display are debugging commands

  3. SQL Server 2008 Interview Questions

  4. Question 3. How To Place An Corporate Logo In Sqr?

    Answer :

    Using “Declare Image” command

  5. Question 4. What Is -debug Command Line Flag?

    Answer :

    This is used for Debugging in SQR.

  6. SQL Server 2008 Tutorial

  7. Question 5. What Are The Sections In Sqr? Which One Is Necessary?

    Answer :

    Setup, Heading, Footing, Program & Procedure Sections. Program section is the Mandatory section.

  8. Oracle 11g Interview Questions

  9. Question 6. What Is -rs & -rt Flags?

    Answer :

    RS is used to generate SPF file ie; stopping the program after the comilation. _RT is used to run the SPF file .This is also one kind of Performance increasing technique by saving the compilation time.

  10. Question 7. What Is -tnn Flag?

    Answer :

    This is mainly used for testing purpose. We can restrict the system to generate only a specific number of pages instead of generating all pages for testing. This is used in Windows Environment.

  11. Oracle 11g Tutorial
    OBIEE Interview Questions

  12. Question 8. What Is -bnn Flag?

    Answer :

    This is used to specify the number of rows that are to be taken from Dbase to the Buffer because default the system takes 10 rows at a time.

  13. Question 9. How To Refer A Global Variable In Local Procedure?

    Answer :

    After special character (ex.#,&) we use underscore(_) after that variable name.

  14. SQL Interview Questions

  15. Question 10. How Does Peoplesoft Process Monitor Knows That The Process (say Sqr Report) Is At What Stage Such As Initiated, In Process, Completed Etc?

    Answer :

    From the Field Value of ‘RUNSTATUSDESCR’field from ‘PS_PMN_PRCSLIST’ table.

  16. OBIEE Tutorial

  17. Question 11. What Are On-break Parameters?

    Answer :

    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.

  18. SSRS(SQL Server Reporting Services) Interview Questions

  19. Question 12. How To Pass Command Line Flags To A Sqr Report Running Through Process Scheduler?

    Answer :

    Using override options in the process definition in the Process Scheduler in the People Tools.

  20. SQL Server 2008 Interview Questions

  21. Question 13. What Are The Steps Required To Run The Sqr From Peoplesoft Environment?

    Answer :

    Three steps we have to fallow to run the SQR program from the peoplesoft environment (Process Scheduler).

    These steps include:

    • 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.
    • 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.
    • Giving the permission to the user by giving process groups.
  22. JasperReports Tutorial

  23. Question 14. What Are The Differences Between Load Lookup And Array?

    Answer :


    1. Arrays can be declared in any section. 
    2. Number of rows are not automatically 
    3. We should insert data in to Array by programming.
    4. We can retrieve any number of fields from a table.
    5. We have Length & Data type.   
    6. We cannot directly print from Array. 


    1. Load-Lookup is declared in only in SETUP section only.
    2. Numbers of rows are automatically added.
    3. Rows are automatically inserted in to  Load-Lookup.
    4. We can retrive only Two fields from from a table. a table.
    5. We don’t have Length & Data type.
    6. We can directly print from


  24. Question 15. Can You Connect More Than One Database Using One Sqr?

    Answer :


  25. Business Objects-Crystal Reports Interview Questions

  26. Question 16. Can You Call Procedure In Oracle From Sqr? How?

    Answer :

    To call a database procedure using Begin-select paragraph, the syntax is as follows:

    [(report arguments)]
    from Dual
    To call from Begin-sql, the syntax will be


  27. Software Development Lifecycle (SDLC) Tutorial

  28. Question 17. How Many Ways Of Performance Tuning Are There In Sqr?

    Answer :

    2. Using ARRAYS.
    4. Using SQT Files.
    5. Using –Bnn Command line Flag.
    6. Running on BATCH SERVER.
    7. Using Proper Programming Logic in SQR such as Using BREAK statement in EVALUATE Command.
    8. Proper SQL tuning such as using Sub queries instead of Joins.
  29. IDMS (Integrated Database Management System) Interview Questions

  30. Question 18. How Will You Perform Error Handling In Sqr?

    Answer :

    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

    ON-ERROR = Skip/Warn/Stop (for Compile time errors)
    ON-ERROR = Procedure Name (for execution stage errors).

  31. Oracle 11g Interview Questions

  32. Question 19. What Is Use Of Setenv.sqc?

    Answer :

    This is used to set the Default Environment based on the Database such Printer Type, Paper Size, Date formats Etc….

  33. Question 20. How Will You Display An Image In Sqr?

    Answer :

    Using ‘DECLARE-IMAGE , END-DECLARE’ command.

  34. JasperReports Interview Questions

  35. Question 21. Which Section Is Mandatory In An Sqr Program?

    Answer :

    ‘BEGIN-PROGRAM’ Section is Mandatory for an SQR program.

  36. Question 22. What Is The Sqc Used To Read Data From Translate Table?

    Answer :

    ‘READXLAT.sqc’ is the SQC used to read data from Translate Table.

  37. Question 23. What Is The Sqt File? What Are The Advantages Of Sqt Files?

    Answer :

    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.

  38. PeopleSoft Component Interface Interview Questions

  39. Question 24. What Is The Purpose Of Stdapi.sqc?

    Answer :

    This is a Process Scheduler Interface sqc which is used to initiate and terminate some field values such as Process_instance & Run_cntl_id

  40. OBIEE Interview Questions

  41. Question 25. How To Pass Inputs To The Sqr While Running Through The Process Scheduler?

    Answer :

    Using Procedures & SQC’s to access data on Run Control Page (Run Control Fields).

  42. Question 26. How To Pass Inputs For Sqr Program While Running From Windows?

    Answer :

    Using ASK & INPUT Commands.

  43. Software Development Lifecycle (SDLC) Interview Questions

  44. Question 27. Is There Any Read-only Variable In Sqr?

    Answer :

    Column Variables & System Variables are Read-Only Variables.

  45. SQL Interview Questions

  46. Question 28. What Are Different Types Of Variables In Sqr?

    Answer :

    Types of variables in SQR are:

    1. Column Variables.
    2. List Variables.
    3. System Variables.
    4. Document Variables.
    5. Substitution Variables.
    6. User Defined Variables
  47. Question 29. What Is The Difference Between Sqr And Sqc?

    Answer :


    1. This is nothing but the Actual
    2. This consists of Program Section.
    3. This can be Compiled & Executed. 
    4. We cannot call one SQR from SQR or SQC

    SQC :

    1. This is like a function in SQR.
    2. This does not consists of program Section.
    3. This cannot be Compiled and Executed
    4. We can call one SQC from another SQC or another SQR
  48. iReport Interview Questions

  49. Question 30. How Can You Debug Sqr Programs?

    Answer :

    We can Debug SQR using Debugging Commands such as:

    1. #IF DEBUGxxx
    2. DISPLAY and
    3. SHOW

  50. Question 31. What Are The Commands Used In File Handling Of Sqr?

    Answer :

    Using File Handling we can Import.

    Steps are

    1. Opening a File Using ‘OPEN FOR-READING’ command.
    2. Reading Data From File Using ‘READ’ command.

    Writing Data into Table Using ‘BEGIN-SQL’ paragraph & ‘INSERT’ command

  51. Question 32. Briefly Explain Most Commonly Used Sqc’s In Sqr Programs?

    Answer :

    Some of the most commonly used SQC’s are

    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….
    3. NUMBER.sqc : This file contains generalized routines to format numbers.
    4. DATETIME.sqc : This file contains generalized routines to format dates and times.
    5. RESET.sqc : This is an important Footing SQc.
  52. PeopleCode Interview Questions

  53. Question 33. Can You Call A Sqr From Another Sqr? How?

    Answer :

    We can call one SQR program from another SQR program using Call.callsystem. But this is possible only in UNIX Operating system.

  54. SSRS(SQL Server Reporting Services) Interview Questions

  55. Question 34. What Is Load-lookup? Give The Syntax For Load-lookup?

    Answer :

    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

  56. Question 35. Is It Possible To Increase The Array Size Once Defined?

    Answer :

    No, it is not possible to increase the Array size once defined

  57. Question 36. What Are The Sections And Paragraphs Available?

    Answer :

    There are five sections and three paragraphs available in SQR programming.

    The sections include:

    1. Begin-setup End-setup.
    2. Begin-program End-program.
    3. Begin-procedure End-procedure.
    4. Begin-heading End-heading.
    5. Begin-footing End-footing

    And the paragraphs include
    Begin-select paragraph.
    Begin-SQL paragraph.
    Begin-document paragraph

  58. Business Objects-Crystal Reports Interview Questions

  59. Question 37. Difference Between Process And Job?

    Answer :

    • Process: A process is a single task, program or routine (such as SQR reports or Batch Cobol) that runs either on client or server.
    • Job: It is one or more process of the same or different type, which can run either in series or Parallel. (A group of process can be combined and run as process job)
  60. Question 38. Define Process Scheduler?

    Answer :

    It is an centralized tool that enables application developers, system administrators and application users to manage People soft batch process. Process Scheduler enables you to schedule running process and create job.

  61. Question 39. Define An Array?

    Answer :

    An Array can be defined to store intermediate results or data retrieved from the database.

  62. Question 40. Difference Between Ask V/s Input?

    Answer :

    • ASK : It is requests the user for the value and substitutes the value during compilation. It is used only in the setup section.
    • INPUT : It requests the user for the value at runtime. (i.e., at execution stage). It can be used anywhere in the programming section.

    Note: INPUT is mere efficient than ASK.

  63. IDMS (Integrated Database Management System) Interview Questions

  64. Question 41. Explain Briefly About On-break Processing?

    Answer :

    On-break option on columns will cause each column to break independently from each other. When a break occurs the following happens, After procedure are processed in descending sequence from the highest level to the level of the current break filed.

  65. Question 42. What Are Positional Co-ordinates?

    Answer :

    Printing in SQR is placing output on the page grid. Position syntax is used to define where to place data on the page within a given section.

  66. JasperReports Interview Questions

  67. Question 43. Explain Print Function?

    Answer :

    • The print command, is both explicit and implicit, is the focal point for formatting and processing.
    • Explicit print is used to print database column referenced by its pseudonym (&column name) or a user defined variable.
    • The Implicit print is only valid for database columns as they are retrieved in the select para.
  68. Question 44. What Does Sqr Report Structure(program) Consists Of Or Types Of Sections In Sqr Program?

    Answer :

    • Report or Program – Determines where SQR will begin and end execution of your report. People soft uses this section to control the flow of processing by calling procedures using the do command, thereby utilizing modular programming.
    • Setup Section – Contains commands, which describe the general report characteristics (Note: the setup section is preprocessed and is automatically run before the program begins execution. This section can only include SQR commands.
    • Programming section
      • Begin – SQL: The SQL paragraph allows you to execute any non-select SQL Statement.
      • Begin-Document-: Allows you to mix background text. With the data retrieved from the database.
      •  Begin-Select: Select paragraph is the heart of the SQR program. For each row of data retrieved from the query, acting as an implicit while loop may also process a set of commands there. Here you specify what columns of data to retrieve from the database. Other procedures may be referenced within a select paragraph, which in turn may contain other select paragraphs.

    Note: In begin select SQR requires that columns names be flesh to the left margin and SQR commands be indented.

    • Heading Section
    • Footing Section
    • Procedure Section : A procedure is a list of commands or paragraphs, which are processed when referenced by a corresponding, do command. Procedure names must be unique. Procedures can contain regular SQR commands as well as three special kinds of paragraphs: A. SQL B. Document C. Select
  69. Question 45. How Sqr Programs Are Evaluated And Executed At Different Times?

    Answer :

    FIRST PASS: Or Compile stage. SQR processes the following components of the program.

    1. All # include external source files (SQCs) are inserted into the source program.
    2. All # commands are evaluated.
    3. The setup section is processes including allocation and population of memory arrays created by the load-look up command.
    4. Optimization of the SQL data access path is determined.
    5. Checks syntax of SQR source program.

    SECOND PASS: Actual execution of the program source occurs starting at the begin Report stopping at the end-report.

    1. Process data for the body section.
    2. Senses page overflow or response to new-page command in code.
    3. Process heading section
    4. Process footing section
    5. Writes entire page buffer to file.
  70. Question 46. How Many Types Of Sqr Data Elements Are There?

    Answer :

    Columns, variables, Literal

  71. Question 47. Explain Briefly About Flags?

    Answer :

    The SQR command supports several flags. Each flag begins with a dash (-). Flags with arguments must be followed directly by the argument with no intervening space.

    SQR Command-Line Flags :Flag Description :

    • A Causes the report output to be appended to an existing file of the user name
    • Bnn (Oracle,SYBASE CT-Lib) indicates how many rows to buffer each time data is retrieved from the database. The default is 10 rows.
    • C Specifies that the cancel dialog box appear while the program.
    • CB (Callable SQR) forces the communication box to be used.
    • DEBUG (xxx) (Sybase) Causes lines preceded by #DEBUG to be compared. Without this flag, these lines are ignored.
    • E(file) Causes error messages to be directed to the named file, or to the default file report errs. If no errors occur, no file is created.
    • F (file) (Directory) overrides the default output file name program .lis
    • KEEP In addition to .LIS files, creates an .SPF file for each report that your program generates.
    • LOCK(RR]CS]RO]RL]XX] (SQL Base) Defines the types of locking (isolation level for the session.
    • NR (SQL Base) specifies that the No Recovery mode is used when connecting to the database.
    • XCB Do not use the communication box.
    • XL Prevents SQR from logging on to the database. Programs run in this mode cannot contain any SQL statements.
    • XMB Disables the error message display so that a program can be run without interruption by error message boxes.
    • XP (SYBASE DB-Lib) Prevents SQR from creating temporary stored pro-cedures.
    • XTB Preserves the trailing blanks in an LIS file.
    • ZIV Invokes the SPF viewer after generating program .spf file. Using this flag implicitly invokes the –KEEP flag to create program .spf file. 
    • ZMF(File) specifies the full path and name of the SQR Error Message file. The Sqr err.dat located in the directory indicated by the SQR DIR environment Variable is the default.
  72. Question 48. How Many Types Of Sqr Files Are There?

    Answer :

    There are 5 types of SQR files:

    • SQC: SQC program files contain commonly included procedures that are called by other SQR programs.
    • LIS when an SQR reports generate output it is sent to a file with an. LIS extension.
    • LOG: SQR.LOG file is the output file used by People soft. This file contains all information such as errors and displays statements. That is output to the terminal during the execution of SQR.
    • MAX: SQR does not dynamically allocate memory. The default program allocations (which were coded for lower        DOS memory) usually have to be increased for complex SQR programs.

    Note: People soft uses a .MAX file to increase any SQR parameter where default is not adequate for the program. There is one main .MAX file for processing under SQR W (windows) called ALLMAXES.MAX

    • SQT: These program files are precompiled SQR programs. As a People soft 5+ there are no delivered precompiled SQR programs.
  73. Question 49. What Is Difference Between .lis And .spf File?

    Answer :

    • . LIS (list file) is used for line printer execution. Normally it is used for printing cheques.
    • .SPF file is portable format, this is used for all window-based applications with any printer. Normally it is used for MSPAINT, Image, and Graphics.
  74. Question 50. What Is A Flag?

    Answer :

    It is an attribute given to programming for processing and generating output destination file.

  75. Question 51. What Is Sqr? Features Of Sqr?

    Answer :

    • SQR (Structured Query Reports) is a programming language used in data processing and data reporting. 
    • SQR program can execute multiple queries.


    • More flexible
    • Scalability for Client and Server architecture.
    • Multiple platform portability
    • Multiple RDBMS portability