Está en la página 1de 7

SQR Questions

1. Arrays and Load lookup in SQR? Load Lookup is used to reduce the complexity of joins - it populates the values of a certain field depending on the key field specified from a certain table. Then the users can query from the preloaded lookup table instead of joining tables. While arrays are used to store and retrieve data using the get and put commands Load-lookup: Load-lookup will be populated at compilation time. We can adjust the size of load-lookup. It is only for text data type Array: Array gets populated at Execution time. We can't modify size of the Array. If we given more than the size of the array, Array supports all data types.

2. How can we know from SQR, if environment is PSNT or PSUNX? 3. Stages of program flow in SQR? Compile stage All the Preprocessor directives are compiled (which starts with #include). Ex: All the SQC are run. Check for the syntax errors for the conditions. Ex: if for loop while loop are properly ended with the respective syntax. Allocates memory structure if you are using the Arrays and load look up Execution stage starts interpreting the code line by line Check for the begin -program Begin -heading Begin- footer 4. Program flow of SQR? Setup section heading section footing section program section procedure section 5. What is .SQC and .SQT? .SQC is a Function Library file. It is like a sub program is saved by extension .SQC and this program can be called in the SQR program .SQT is compile time/Run time file. When a file with XXX.SQR is compiled we get the output as XXX.SQT and when is XXX.SQT is executed we get the output XXX.LIS

(List file/Output file). 6. Important SQC that need to be attached to SQR program? #include 'setenv.sqc' #include 'stdapi.sqc' #include 'prcsdefn.sqc' #include 'prcsapi.sqc' #include 'curdtrim.sqc' #include 'hrctlnld.sqc' #include 'datwtime.sqc'
7. Performance tuning in SQR?
Load Look Up Arrays Multiple Report -Bnn Using SQT Files Run on the BATCH Server Proper Programming Logic Set processing SQL Tuning

8. Why SQR is used? Data conversion Reports Interface programs. 9. How do you link SQR reports to process scheduler? Create/modify/add run control table if you have any new fields Create/modify/add run control page if you have any program inputs Create a menu definition (Note Menu group name: XYZ) Give operator security Create Process scheduler definition Use-Process definition process definition 10. What are variable types in SQR? & Data base reference fields Read only $ Character (Same for Date) 11. Commands that can be called from setup section? Ask Define-Chart

Define-Layout Define-Image Define-Printer Define-Procedure Define-Report Dollar-Symbol 12. How to run SQR in People Code ? To call SQR from peoplecode we use peoplecode functions CreateProcessRequest() and Schedule() 13. Is it possible to increase the array size once defined? No, it is not possible to increase the Array size once defined 14. 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 15. Can you Call a SQR from another SQR? How? We can call one SQR program from another SQR program using Call.callsystem. But this is possible only in UNIX Operating system. 16. Briefly explain Most commonly used SQCs in SQR programs? : Some of the most commonly used SQCs 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. 6.RESET.sqc : This is an important Footing SQc.

17. What are the commands used in filehandling of sqr? Using File Handling we can Import. Steps are 1. Opening a File Using OPEN FOR-READING command. 1. Reading Data From File Using READ command. Writing Data into Table Using BEGIN-SQL paragraph & INSERT command 18. What are On-break parameters? 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. 19. How can you Debug SQR programs? We can Debug SQR using Debugging Commands such as 2. #IF DEBUGxxx #END-IF 2. DISPLAY and 3. SHOW 20. What is the difference between sqr and sqc? SQR SQC 1.This is nothing but the Actual 1.This is like a function in SQR. 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. 21. What are different types of variables in sqr? Types of variables in SQR are 1. Column Variables. 2. List Variables. 3. System Variables. 4. Document Variables. 5. Substitution Variables. User Defined Variables 22. Is there any read-only variable in sqr? Column Variables & System Variables are Read-Only Variables. 23. How to pass Inputs for sqr program while running from windows? Using ASK & INPUT Commands.

24. How to pass Inputs to the SQR while running through the Process Scheduler? Using Procedures & SQCs to access data on Run Control Page (Run Control Fields). 25. 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 26. What is the SQC used to read data from translate table? READXLAT.sqc is the SQC used to read data from Translate Table. 27. Which section is mandatory in an SQR program? BEGIN-PROGRAM Section is Mandatory for an SQR program. 28. How will you display an image in SQR? Using DECLARE-IMAGE , END-DECLARE command. 29. What is use of SETENV.SQC? This is used to set the Default Environment based on the Database such Printer Type, Paper Size, Date formats Etc. 30. How will you perform ERROR handling in SQR? 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. Can you call procedure in oracle from Sqr? How? To call a database procedure using Begin-select paragraph, the syntax is as follows: Begin-select [(report arguments)] from Dual End-select To call from Begin-sql, the syntax will be Begin-SQL ;; End-SQL 32. Can you connect more than one database using one Sqr? How? Yes. 33. What are the differences between Load lookup and Array ARRAYS LOAD-LOOKUP 1. Arrays can be declared in any section. 1. Load-Lookup is declared in only in SETUP section only. 2. Number of rows are not automatically 2. Numbers of rows are automatically added. gives a error if the number of added. Exceeds the specified number.

3. We should insert data in to Array by 3. Rows are automatically inserted in to programming. Load-Lookup. 4.We can retrive any number of fields. 4.We can retrive only Two fields from from a table. a table. 5.We have Length & Data type. 5.We dont have Length & Data type. 6.We cannot directly print from Array. 6.We can directly print from Load-Lookup. 34. 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, stdapiterm) 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. 35. 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. 36. What are On-break parameters? 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. 37 .How does peoplesoft Process monitor knows that the process (Say sqr report) is at what stage such as initiated, in process, completed etc From the Field Value of RUNSTATUSDESCRfield from PS_PMN_PRCSLIST table. 38. How can u Debugging SQR programs? We can Debug SQR using Debugging Commands such as 3. #IF DEBUGxxx #END-IF 2. DISPLAY and 3. SHOW 39. How to refer a global variable in local procedure? After special character (ex.#,&) we use underscore(_) after that variable name. 40. What is -Bnn flag?

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. 41. What is -Tnn flag? 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. 42. What is -RS & -RT Flags? 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. 43. What are the sections in Sqr? Which one is necessary? Setup, Heading, Footing, Program & Procedure Sections. Program section is the Mandatory section. 44. What is -debug command line flag? This is used for Debugging in SQR. 45. How to place an corporate logo in sqr? Using Declare Image command 46. what are the debugging commands in sqr? Show & Display are debugging commands 47. what is the difference between them? Show is used to display more than one variable at a time. Display is used to display only one variable at a time.

También podría gustarte