Sei sulla pagina 1di 6

A Join Logical File has how many Record formats?

Ans:1 A Multiple format Logical File is also known as? Ans:Union File How does Union file maintains Record formats? Ans:1 Record format for each PF Records can be Read/Update/Deleted with which file? Ans:Simple Logical File & Physical File. Which type of object is used in DB2/400? Ans:*FILE What is SQL? Ans:SQL is an interface for programming language. A program variable coded in an Embedded SQL statement is referred to as? Ans:Host Variable When are the Unique Constraints executed? Ans:During Insert. When are the Referential Constraints executed? Ans:Insert, Update & Delete. How many triggers can be associated with a file? Ans:6(Maximum) Why is the Declare cursor statement is used for? Ans:To define & name the cursor & specify rows to be fetched. What do we can do with the Embedded SQL statements? Ans:We can Insert/Update/Delete records, fetch records, fetch values from records into variables. Different type of Cursor? Ans: Two types of Cursor Simple / Serial Cursor A serial cursor is one defined without SCROLL key word For serial cursor each row is fetched only once per OPEN When it is opened it is positioned before the first row in the table. To use serial cursor we have to re-issue OPEN Scrollable Cursor which is defined with SCROLL key word. Cursor defined with SCROLL key word Rows of cursor can be fetched many times When it is opened it is positioned before the first row in the table. When the FETCH is issued , the cursor is positioned to the row of the table that is specified by the POSITION option. (FIRST, LAST, PREV, NEXT, RELATIVE) Writing an SQL statement from selecting records from TWO files using single statement and

Nested select statement. Ans: Using Single statement. SELECT * FROM FILE1, FILE2 WHERE FILE1.FLD1 = FILE2.FLD1 Difference between View and Index ? Ans:View will not any data.. It only shows a data from table while Index has a Indexing Data for a sequence on which Index is created. View is similar to Logical file without having Key and Index is similar to Logical File having Key (as keyed logical file has access path data) Table is similar to PF. Can we have records (with fields from more than one file) from multiple files and Nested / sub query in SQL ? Ans:Yes, we can have record from multiple file with join condition and we also can have nested query or subquery like SELECT * FROM FILE1 WHERE FILE1.FLD1 IN (SELECT FILE2.FLD1 FROM FILE2) What is the sequence when using CURSOR? Ans: Define Cursor ,Declare Cursor ,Open Cursor ,Fetch record ,Processing ,Close Cursor DB2 is a type of Database? Ans:It is an Integrated RDBMS. Join Logical File displays data from how many files? 2 or more PFs A Query can be displayed without saving it? Ans:True Which are the Query selection criteria, which can be given in a Query? Ans:LIST To add a file to the File Selection option of a Query, the function key to be pressed is? Ans:F9 A query can be run in which mode? Ans:Batch & Interactive What is the values SQLCOD when there is an error in fetching the records specified in the select statement? Ans:-ve value Which are the DB2 tools to protect Integrity of the database? Ans:Journaling & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks. What is the purpose of OPNQRYF (Open Query File)? Ans:OPNQRYF is used to select certain records of the database file based on the QRYSLT (Query select ) condition. How to create files dynamically without DDS? Ans:Through OPNQRYF

What command must be executed before executing OPNQRYF command? Ans:OVRDBF (Override Data base file) How does the RUNQRY show the output? Ans:RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence. Describe about Query/400? Ans:Query/400 is a licensed program that uses a query to analyze and select the information contained in the data base files and create a query report. A query report can be: * displayed on a workstation (screen) * printed * stored in another database file. What is OPNQRYF, MONMSG commands Ans: It is Dynamically creation of access path, and it can have resultant fields i.e. if the expression is A = B + C then B and C are from the file while A is defined in OPNQRYF. We can divert the output of command to an OUTFILE. Command associated with OPNQRYF is CPYFRMQRYF to save the output permanently It is a CL command to monitor and error/exception message so that in case of an error a dump is avoided and the control is in program. It is also used to monitor user message. When would you prefer logical file than OPNQRYF? Ans:The physical file you are working with very large, creating and using a logical file will allow an application to perform faster than using an open query file. Since access paths created by open query files are temporary, applications that use an access path frequently will be more efficient using a logical file, since the access path will not have to be rebuilt every time the file is open. What is the CLP command to access a Query/400? Ans:WRKQRY What is the purpose of Overrides? Ans:The basic purpose of Overrides is to temporarily change the attributes of a file. So you don't have to create permanent files for every combination of attributes your application might need. Overrides gives you the flexibility to use existing model files and dynamically change their attributes. It is possible to run Query using RUNQRY command? Ans:YES Using Query it is possible to create level break report? Ans:YES What is DBMS? Ans:A DBMS is a software system that controls the creation, organization & modification of a database & access to the date stored within it.

What is a table? Ans:A table is collection of data elements in one column, data elements Must be of same type and same length. What is a Compile Time Table? Ans:We can hard code data within the program is said to be Compile Time Table. What is a Run Time Table? Ans:Data from a separate disk file is loaded into a table each time the Program runs. Give the Table definition? Ans:TABMT 1 12 2 A Where 1 = Number of entries per record 12 = Total number of entries 2 = Length of each entry A = Ascending Sequene When would the ALL keyword be used? Ans:Use with Select or Omit, to select/omit records. If the data is likely to change over a period of time & Moreover data is large than which type of table is preferred? Ans:Compile Time Table. Types of Tables in RPG? Ans:There are 2 types of tables in RPG they are: - Compile Time Tables Pre-Runtime Tables REPORT: While designing the report using RLU, user wants to add record level keyword then which function key should be pressed? Ans:F18. If user wants to add one field on the report then which function key should be pressed? Ans:F11. After getting field reference from reference file selected files will appear at the bottom of the screen and then which command function will be used to get it on screen with its label to be left aligned? Ans: &3L If user wants to center the company name on his report then which line command will be used? Ans: CF. If user wants to change the length of the numeric field defined in report then which combination of keys will be used? Ans:F23 & F10. What is difference between SKIPB (2) & SPACEB (2). If user wants to define new numeric field on record format then which line command will be

used? Ans:VF. Maximum report length is 132, if user is designing a report using RLU? Ans:FALSE (378 Max). To change constant field defined on RLU screen which field level keyword should be used? Ans:DFT Which field level keyword should be used to change any numeric field of length 8 to 99.99.9999 format? Ans:EDTWRD ( . . ) Using Query, its also possible to create level break reports. Ans:TRUE. What are the three line types in RLU ? Ans:Report line, Filler line & Sample line. What is the function of RLU ? Ans:To design & prototype a report. RLU: If user wants to define new numeric field on record format then which line command will be used? Ans:VF Maximum report length is 132, if user is designing a report using RLU? Ans:FALSE (Maximum is 378) While designing the report using RLU user wants to add record level keywords which function key is pressed? Ans:F18 If user wants to add one field on the report then which function key is pressed? Ans:F11 What is the command used to invoke RLU ? Ans:STRRLU. What are different record spacing keywords in RLU ? Ans:SKIPA, SKIPB, SPACEA & SPACEB. How do you combine two record formats in RLU ? Ans:Using CLC. 19. What are the different commands used in RLU ? Ans:DR - Define Record, CLC - Change Line for Continuation, CLR - Change Line for Record, SD - Create Sample Data, VF - View Fields, NP - New Page, DC - Define Constants, DF - Define Fields, CF - Centre Fields & SP - Space Fields evenly.

To change constant field defined on RLU screen which field level keyword should be used? Ans:DFT (Default)

Potrebbero piacerti anche