|
what is '1000 projects'?
'fullinterview.com' is a educational content website dedicated to finding and realizing final year projects for btech, be, mtech, mca students, here you can search, find your projects and get guidance from experts the below are the different technological projects.
visual Studio projects
.net projects,
asp projects,
c & ds projects,
c++ projects (all),
cold fusion projects,
delphi projects,
java projects,
perl projects,
php projects,
sql projects,
vc++ projects,
visual basic projects.
how it works?
well, everything on this site is submitted by the student and professional community. after you submit your project, it is being verified and approved by our administrator. after approval, other people can read/discuss it, save to favorites.
more number of projects?
here you can find morethan 1000 projects on different technologies, if u want to get more projects please visit our sister sites www.fullinterview.com & Chetanasprojects.com
Category Articles
CICS Interview Questions and Answers,CICS Faqs,CICS Interview FAQs and CICS Books,CICS interview ebook,CICS teCICShniCICSal interview questions,CICS Quiz,CICS Interview Paper,CICS PlaCICSement Papers,CICS Interview ProCICSedure,CICS Aptitude Question
Added on Mon, Nov 30, 2009
Probably RUN STATS is not done and the program is using a wrong index due to incorrect stats. Probably RUNSTATS is done and optimizer has chosen a wrong access path based on the latest statistics. Read More
Give the COBOL definition of a VARCHAR field.
Added on Sun, Nov 29, 2009
A VARCHAR column REMARKS would be defined as follows: ... 10 REMARKS. 49 REMARKS-LEN PIC S9(4) USAGE COMP. 49 REMARKS- TEXT PIC X(1920). Read More
Why SELECT * is not preferred in embedded SQL programs?
Added on Tue, Dec 1, 2009
For three reasons: If the table structure is changed ( a field is added ), the program will have to be modified Program might retrieve the columns which it might not use, leading on I/O over head. The chance of an index only scan is lost. ... Read More
EXPLAIN has output with MATCHCOLS = 0. What does it mean? ?
Added on Sun, Nov 29, 2009
a nonmatching index scan if ACCESSTYPE = I. Read More
In my jcl ,the 1st step is delete step, if the data set is existing, I want to delete, that one ,if dataset is no existing, I do not want abend the job, how can I code in disp?
Added on Tue, Dec 1, 2009
Use IDCAMS DELETE utility in first step of JCL to delete all the files as shown below //STEP0005 EXEC PGM=IDCAMS //SYSOUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSIN DD * ... Read More
File opening modes in cobol and corresponding dispositions?
Added on Mon, Nov 30, 2009
File opening modes are Input mode , output mode, extend mode, inputoutput mode. Inputmode-------- "Read" the file outputmode--------"write" the record. extend mode--------"appeand" the records. i/o mode-------------"read or write" any... Read More
How to read last record in vsam file.,I don’t know how many records are there?
Added on Mon, Nov 30, 2009
Move highvalues to the key of the VSAM file and the issue Readnext record command. Then give Readprev command. This will read thelast record. Read More
What is the difference between CS and RR isolation levels?
Added on Mon, Nov 30, 2009
CS: Releases the lock on a page after use RR: Retains all locks acquired till end of transaction Read More
What are some sql aggregates and other built-in functions?
Added on Sat, Dec 5, 2009
The common aggregate, built-in functions are AVG, SUM, MIN, MAX, COUNT and DISTINCT. Read More
How is a typical DB2 batch pgm executed ?
Added on Sun, Nov 29, 2009
1. Use DSN utility to run a DB2 batch program from native TSO. An example is shown: DSN SYSTEM(DSP3) RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB(’ED 01T.OBJ.LOADLIB’) END 2. Use IKJEFT01 utility program to run the above DSN command in a JCL.... Read More
What is meant by index cardinality?
Added on Sun, Nov 29, 2009
The number of distinct values for a column is called index cardinality. DB2’s RUNSTATS utility analyzes column value redundancy to determine whether to use a tablespace or index scan to search for data. Read More
What is filter factor?
Added on Sun, Nov 29, 2009
one divided by the number of distinct values of a column. Read More
When u will use curser with hold option?
Added on Mon, Nov 30, 2009
We use cursor only when we updating existing records or Inserting Some Records to the Table. When you Using commit, in DB2 every single row will be commited after the process. If abend occurs only the cursor will be closed, we can start from last... Read More
What is the indexset and sequence set in vsam ksds?
Added on Tue, Dec 1, 2009
The indexset and the sequence set are the two sets of records in the index component of the vsam KSDS the other being the data component. The sequence set contains pointers to each CI within the CA....it stores the key value for the highest... Read More
What will happened ,if the subprogram is called second time?
Added on Mon, Nov 30, 2009
Subprogram are reusable statements. If more than one program require the same statements to be repeated, then its better idea to place these statements in a new program and CALL them as subprograms. The result vary as what value u pass as parameter ... Read More
What is normalization and what are the five normal forms?
Added on Sun, Nov 29, 2009
Normalization is a design procedure for representing data in tabular format. The five normal forms are progressive rules to represent the data with minimal redundancy. Read More
What is the SQL Communications Area and what are some of its key fields?
Added on Sat, Dec 5, 2009
It is a data structure that must be included in any host- language program using SQL. It is used to pass feedback about the sql operations to the program. Fields are return codes, error messages, handling codes and warnings. Read More
What is DCLGEN ?
Added on Sun, Nov 29, 2009
DeCLarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table. Read More
What are the disadvantages of using VARCHAR?
Added on Sun, Nov 29, 2009
1. Can lead to high space utilization if most of the values are close to maximum. 2. Positioning of VARCHAR column has to be done carefully as it has performance implications. 3. Relocation of rows to different pages can lead to more I/Os on... Read More
What is Mainframe Testing?
Added on Mon, Nov 30, 2009
Similar to client-service applications testing, but you have to know how to operate basic TSO and ISPF commands and menus, view mainframe files, look at and use SDSF or other output tool, log on CICS and transactions, use FTP or another transfer... Read More
What are delete-connected tables?
Added on Sun, Nov 29, 2009
Tables related with a foreign key are called delete-connected because a deletion in the primary key table can affect the contents of the foreign key table. Read More
What are foreign keys?
Added on Sun, Nov 29, 2009
These are attributes of one table that have matching values in a primary key in another table, allowing for relationships between tables. Keys (columns) that exist on one table and that are primary keys on another table. Read More
What is meant by isolation level?
Added on Tue, Dec 1, 2009
This is a key concept for any relational database. Isolation level is the manner in which locks are applied and released during a transaction. For DB@ a ’repeatable read’ holds all locks untile the transaction completes or a syncpoint is... Read More
What are correlated subqueries?
Added on Mon, Dec 7, 2009
A subquery in which the inner ( nested ) query refers back to the table in the outer query. Correlated subqueries must be evaluated for each qualified row of the outer query that is referred to. Read More
What is a clustering index ? ?
Added on Sun, Nov 29, 2009
Causes the data rows to be stored in the order specified in the index. A mandatory index defined on a partitioned table space. Read More
How do I create a table MANAGER ( EMP#, MANAGER) where MANAGER is a foreign key which references to EMP# in the same table? Give the exact DDL.
Added on Sun, Nov 29, 2009
First CREATE MANAGER table with EMP# as the primary key. Then ALTER it to define the foreign key. When is the authorization check on DB2 objects done - at BIND time or run time? At run time. Read More
What are aggregate functions?
Added on Mon, Nov 30, 2009
Bulit-in mathematical functions for use in SELECT clause. Read More
How to enter in xpediter?
Added on Mon, Nov 30, 2009
For Xpediting a program first a cmnddio load should be created.Then give xp where u can give the load lib and xped ur program Read More
How do you specify and use a cursor in a COBOL program?
Added on Tue, Dec 1, 2009
Use DECLARE CURSOR statement either in working storage or in procedure division(before open cursor), to specify the SELECT statement. Then use OPEN, FETCH rows in a loop and finally CLOSE. Read More
After bind i how can we run a cobol-db2 program?
Added on Tue, Dec 1, 2009
Using the utility IKJEFT01 in the JCL. Read More
When would you prefer to use VARCHAR
Added on Fri, Dec 4, 2009
When a column which contains long text, e.g. remarks, notes, may have in most cases less than 50% of the maximum length Read More
Is it mandatory to use DCLGEN? If not, why would you use it at all? -
Added on Sat, Dec 5, 2009
It is not mandatory to use DCLGEN. Using DCLGEN, helps detect wrongly spelt column names etc. during the pre-compile stage itself ( because of the DECLARE TABLE ). DCLGEN being a tool, would generate accurate host variable definitions for the... Read More
What is sqlcode -811?
Added on Sun, Nov 29, 2009
SELECT statement has resulted in retrieval of more than one row. Read More
What is a synonym ?
Added on Sun, Nov 29, 2009
Synonym is an alternate name for a table or view used mainly to hide the leading qualifier of a table or view.. A synonym is accessible only by the creator. Read More
What is lock escalation?
Added on Sun, Nov 29, 2009
Promoting a PAGE lock-size to table or tablespace lock-size when a transaction has acquired more locks than specified in NUMLKTS. Locks should be taken on objects in single tablespace for escalation to occur. Read More
What is the COBOL picture clause for a DB2 column defined as DECIMAL(11,2)?
Added on Sun, Nov 29, 2009
PIC S9(9)V99 COMP-3. Note: In DECIMAL(11,2), 11 indicates the size of the data type and 2 indicates the precision. Read More
When do you use the IMAGECOPY? ?
Added on Sun, Nov 29, 2009
To take routine backup of tables After a LOAD with LOG NO After REORG with LOG NO Read More
What is COPY PENDING status?
Added on Sun, Nov 29, 2009
A state in which, an image copy on a table needs to be taken, In this status, the table is available only for queries. You cannot update this table. To remove the COPY PENDING status, you take an image copy or use REPAIR utility. Read More
What is CHECK PENDING ?
Added on Sun, Nov 29, 2009
When a table is LOADed with ENFORCE NO option, then the table is left in CHECK PENDING status. It means that the LOAD utility did not perform constraint checking. Read More
What is QUIESCE?
Added on Sun, Nov 29, 2009
A QUIESCE flushes all DB2 buffers on to the disk. This gives a correct snapshot of the database and should be used before and after any IMAGECOPY to maintain consistency. Read More
Are views updateable ?
Added on Sun, Nov 29, 2009
Not all of them. Some views are updateable e.g. single table view with all the fields or mandatory fields. Examples of non-updateable views are views which are joins, views that contain aggregate functions(such as MIN), and views that have GROUP BY... Read More
What do you mean by NOT NULL? When will you use it?
Added on Sun, Nov 29, 2009
The column cannot have nulls. Use it for key fields. Read More
What is FREEPAGE and PCTFREE in TABLESPACE creation?
Added on Sun, Nov 29, 2009
PCTFREE: percentage of each page to be left free FREEPAGE: Number of pages to be loaded with data between each free page Read More
What are simple, segmented and partitioned table spaces ?
Added on Sun, Nov 29, 2009
Simple Tablespace: Can contain one or more tables Rows from multiple tables can be interleaved on a page under the DBAs control and maintenance Segmented Tablespace: Can contain one or more tables Tablespace is divided into segments of 4 to 64... Read More
What is index cardinality? ?
Added on Sun, Nov 29, 2009
The number of distinct values a column or columns contain. Read More
What is EXPLAIN? ?
Added on Mon, Nov 30, 2009
EXPLAIN is used to display the access path as determined by the optimizer for a SQL statement. It can be used in SPUFI (for single SQL statement ) or in BIND step (for embedded SQL ). Read More
What is auditing?
Added on Mon, Nov 30, 2009
Recording SQL statements that access a table. Specified at table creation time or through alter. Interview Questions 1 | Interview Questions 2 | Interview Questions 3 | Interview Questions 4 | Interview Questions 5 | Interview Questions 6 | ... Read More
Can I use LOCK TABLE on a view?
Added on Mon, Nov 30, 2009
No. To lock a view, take lock on the underlying tables. Read More
What is ALTER ?
Added on Mon, Nov 30, 2009
SQL command used to change the definition of DB2 objects. Read More
What else is there in the PLAN apart from the access path? ?
Added on Mon, Nov 30, 2009
PLAN has the executable code for the SQL statements in the host program Read More
What are PACKAGES ?
Added on Mon, Nov 30, 2009
They contain executable code for SQL statements for one DBRM. Read More
Can anyone tell me when do we need a COLLECTION? I know the concept of PLAN and PACKAGE, but unable to understand about COLLECTION.
Added on Mon, Nov 30, 2009
Collection is not a property of a plan. Collection is a property of a package. Within a plan there are package lists (PKLIST) which identifies collection and/or packages that are available through that plan. Collection is to package as schema is to... Read More
Can u see s9(4)comp3 data?
Added on Mon, Nov 30, 2009
What I think we cannot see the comp-3 value by USAGE verb we have to type HEX ON in the command prompt of that particular file to see the number Example: Suppose the number is +12345. In the HEX ON screen we will see the number as ... Read More
What is a clustering index ?
Added on Mon, Nov 30, 2009
Causes the data rows to be stored in the order specified in the index. A mandatory index defined on a partitioned table space. Read More
How to know other person job status?
Added on Mon, Nov 30, 2009
Go to spool and in the command prompt give owner ’@XXXX’ and pre * then you will able to see all the job status for the user XXXX. where XXXX is the mainframe id of other person Read More
What is an intent lock?
Added on Mon, Nov 30, 2009
An intent lock is at the table level for a segmented tablespace or at the tablespace level for a nonsegmented tablespace. They indicate at the table or tablespace level the kinds of locks at lower levels. Read More
At what stage db2 must be up?
Added on Mon, Nov 30, 2009
Db2 must be up while running the program Read More
In the WHERE clause what is BETWEEN and IN?
Added on Mon, Nov 30, 2009
BETWEEN supplies a range of values while IN supplies a list of values. Read More
Initial position of cursor of the exucuton of open statements?
Added on Mon, Nov 30, 2009
Cursor stands to the first record sorted by the field given in order by clause of cursor declaration. Read More
What is a cursor? why should it be used? ?
Added on Tue, Dec 1, 2009
Cursor is a programming device that allows the SELECT to find a set of rows but return them one at a time. Cursor should be used because the host language can deal with only one row at a time. Read More
I have 1000 records in vsam,I want to read records 500 to 900
Added on Tue, Dec 1, 2009
//JOB STATEMENT //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DD1 DD DSN=DSRC239.KSDS.CLUSTER,DISP=SHR //DD2 DD DSN=DSRC239.NEW.PS,DISP=SHR //SYSIN DD * REPRO INFILE(DD1)- OUTFILE(DD2)- SKIP(499)- COUNT(401)... Read More
What happens when you say OPEN CURSOR?
Added on Tue, Dec 1, 2009
If there is an ORDER BY clause, rows are fetched, sorted and made available for the FETCH statement. Other wise simply the cursor is placed on the first row. Read More
What is the physical storage length of each of the following DB2 data types:
Added on Tue, Dec 1, 2009
DATE, TIME, TIMESTAMP? DATE: 4bytes TIME: 3bytes TIMESTAMP: 10bytes Read More
What is cursor stability?
Added on Sat, Dec 5, 2009
Cursor stability means that DB2 takes a lock on the page the cursor is accessing and releases the lock when the cursor moves to another page. Read More
What is deadlock?
Added on Sat, Dec 5, 2009
Deadlock occurs when transactions executing at the same time lock each other out of data that they need to complete their logical units of work. Read More
What are the contents of a DCLGEN?
Added on Sat, Dec 5, 2009
1. EXEC SQL DECLARE TABLE statement which gives the layout of the table/view in terms of DB2 datatypes. Read More
What are the three DB2 date and time data types and their associated functions?
Added on Sat, Dec 5, 2009
The three data types are DATE, TIME and TIMESTAMP. CHAR can be used to specify the format of each type. The DAYS function calculates the number of days between two dates. (It’s Y2K compliant). Read More
How does Db2 use multiple table indexes?
Added on Sat, Dec 5, 2009
DB2 use the multiple indexes to satisfy multiple predicates in a SELECT statement that are joined by an AND or OR. Read More
What are some characteristics of columns that benefit from indexes?
Added on Sat, Dec 5, 2009
Primary key and foreign key columns; columns that have unique values; columns that have aggregates computed frequently and columns used to test the existence of a value Read More
What is a LIKE table and how is it created?
Added on Sat, Dec 5, 2009
A LIKE table is created by using the LIKE parameter in a CREATE table statement. LIKE tables are typically created for a test environment from the production environment. Read More
Under what circumstances will DB2 allow an SQL statement to update more than one primary key value at a time?
Added on Sat, Dec 5, 2009
Never. Such processing could produce duplicate values violating entity integrity. Primary keys must be updated one at a time. Read More
What is ’LIKE’ used for in WHERE clause? What are the wildcard characters?
Added on Mon, Dec 7, 2009
LIKE is used for partial string matches. ?%? ( for a string of any character ) and ?_? (for any single character ) are the two wild card characters. Read More
Explain the use of the WHERE clause. WHERE is used with a relational statement to isolate the object element or row?
Added on Mon, Dec 7, 2009
where clause is use to extrct only one record.it is used with GROUP BY CLAUSE. EG:-SELECT DNO FROM EMP WHERE SAL=4200 GROUP BY DNO; DISCRIPTION:- where dno is (dept. no) emp is (employi table), ... Read More
What do the initials DDL and DML stand for and what is their meaning?
Added on Mon, Dec 7, 2009
DDL(data definition language) DDL Statement are ? Create ? Alter and ? Drop DML(data manipulation language) DDL Statement are ? Select ? Insert ? Update and ? Delete ... Read More
why we use db2 with cobol why we cant use any other languages? what the main reason? what is disaster recovery?
Added on Mon, Dec 7, 2009
Disater recovery-literal meaning is the recovery of an entire application in the case of a disaster be it natural(like flood,storm,earthquake) or accidental(like fire etc). The main point is to recover the main jobs in theapplication to make sure... Read More
What is dynamic SQL ?
Added on Mon, Dec 7, 2009
Dynamic SQL is a SQL statement created at program execution time. Read More
What are the disadvantages of PAGE level lock?
Added on Sun, Nov 29, 2009
High resource utilization if large updates are to be done Read More
What is a composite index and how does it differ from a multiple index?
Added on Sun, Nov 29, 2009
A multiple index is not one index but two indexes for two different columns of a table. A composite index is one index made up of combined values from two columns in a table. If two columns in a table will often be accessed together a composite index... Read More
When can an insert of a new primary key value threaten referential integrity?
Added on Sun, Nov 29, 2009
Never. New primary key values are not a problem. However, the values of foreign key inserts must have corresponding primary key values in their related tables. And updates of primary key values may require changes in foreign key values to maintain... Read More
How does DB2 determine what lock-size to use?
Added on Sun, Nov 29, 2009
1. Based on the lock-size given while creating the tablespace 2. Programmer can direct the DB2 what lock-size to use 3. If lock-size ANY is specified, DB2 usually chooses a lock-size of PAGE Read More
What is the diff bet plan,package,dbrm?
Added on Sun, Nov 29, 2009
Plan is generated when you compile the DB2- SQL program. This plan is stored in the DBRM and binded to database as packages. (stored in syscat.syspackages - pkgname) DBRM: Data base request module is generated by precompiler... Read More
What is the self-referencing constraint?
Added on Sun, Nov 29, 2009
A31. The self-referencing constraint limits in a single table the changes to a primary key that the related foreign key defines. The foreign key in a self referencing table must specify the DELETE CASCADE rule. Read More
What is the difference between primary key & unique index ?
Added on Sun, Nov 29, 2009
Primary : a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key. Unique index: a physical object that stores only... Read More
What is sqlcode -922 ?
Added on Sun, Nov 29, 2009
What does the sqlcode of -818 pertain to? ?
Added on Sun, Nov 29, 2009
This is generated when the consistency tokens in the DBRM and the load module are different. Read More
How will u send data from a cobol file to db2 table?
Added on Sun, Nov 29, 2009
USING HOST VARIABLE we can pass data from COBOL to DB2 Read More
What is a packed decimal..?
Added on Sun, Nov 29, 2009
Commonly, 1 byte of space is assigned to each digit/char. But if declared as ’Packed Decimal’ (also known as COMP-3), then 2 digit occupy only 1 byte. i.e if X = 78, then only 1 byte is assigned to X, rather than 2 bytes space. Read More
How do you leave the cursor open after issuing a COMMIT? ( for DB2 2.3 or above only )
Added on Sun, Nov 29, 2009
Use WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in psuedo-conversational CICS programs. Read More
Is it mandatory to use DCLGEN? If not, why would you use it at all?
Added on Sun, Nov 29, 2009
It is not mandatory to use DCLGEN. Using DCLGEN, helps detect wrongly spelt column names etc. during the pre-compile stage itself ( because of the DECLARE TABLE ). DCLGEN being a tool, would generate accurate host variable definitions for the... Read More
Is DECLARE TABLE in DCLGEN necessary? Why it used?
Added on Sun, Nov 29, 2009
It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by the pre-compiler to validate the table-name, view-name, column name etc., during pre-compile. Read More
Will precompile of an DB2-COBOL program bomb, if DB2 is down?
Added on Sun, Nov 29, 2009
No. Because the precompiler does not refer to the DB2 catalogue tables. Read More
What is dynamic SQL
Added on Sun, Nov 29, 2009
Dynamic SQL is a SQL statement created at program execution time. Read More
What are the 2 sqlcodes that are returned? ?
Added on Sun, Nov 29, 2009
100 ( for successful completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is set to Yes). Read More
What is the index ,types of index ?
Added on Sun, Nov 29, 2009
Index is a mechanism that allows to search data quickly. In SQL Server 2000, two kinds of index are there : 1 : Clustered Index (only one) 2: Non Clustered Index(up to 249) Read More
What are the three lock types?
Added on Sun, Nov 29, 2009
The three types are shared, update and exclusive. Shared locks allow two or more programs to read simultaneously but not change the locked space. An exclusive lock bars all other users from accessing the space. An update lock is less restrictive;... Read More
If the base table underlying a view is restructured, eg. attributes are added, does the application code accessing the view need to be redone?
Added on Sun, Nov 29, 2009
No. The table and its view are created anew, but the programs accessing the view do not need to be changed if the view and attributes accessed remain the same Read More
What is the difference between static and dynamic sql?
Added on Sun, Nov 29, 2009
Static sql is hard-coded in a program when the programmer knows the statements to be executed. For dynamic sql the program must dynamically allocate memory to receive the query results. Read More
Give some example of statistics collected during RUNSTATS?
Added on Sun, Nov 29, 2009
# of rows in the table Percent of rows in clustering sequence # of distinct values of indexed column # of rows moved to a nearby/farway page due to row length increase Read More
What are difference between version control and debugging tools?
Added on Sun, Nov 29, 2009
Version control tool will create only a version for changed program.Through this version we can find out the changed programs. ex:endevor Debugging tool is used to debug the error step by step. ex:xpeditor. Read More
What is REORG? When is it used?
Added on Sun, Nov 29, 2009
REORG reorganizes data on physical storage to reclutser rows, positioning overflowed rows in their proper sequence, to reclaim space, to restore free space. It is used after heavy updates, inserts and delete activity and after segments of a... Read More
What is IMAGECOPY ? ?
Added on Sun, Nov 29, 2009
It is full backup of a DB2 table which can be used in recovery . Read More
What is the difference between SYNONYM and ALIAS?
Added on Sun, Nov 29, 2009
SYNONYM: is dropped when the table or tablespace is dropped. Synonym is available only to the creator. ALIAS: is retained even if table or tablespace is dropped. ALIAS can be created even if the table does not exist. It is used mainly in... Read More
What do you mean by NOT NULL WITH DEFAULT? When will you use it?
Added on Sun, Nov 29, 2009
This column cannot have nulls and while insertion, if no value is supplied then it wil have zeroes, spaces or date/time depending on whether it is numeric, character or date/time. Use it when you do not want to have nulls but at the same time... Read More
When would you prefer to use VARCHAR?
Added on Mon, Nov 30, 2009
When a column which contains long text, e.g. remarks, notes, may have in most cases less than 50% of the maximum length. Read More
How do you do the EXPLAIN of a dynamic SQL statement?
Added on Mon, Nov 30, 2009
1. Use SPUFI or QMF to EXPLAIN the dynamic SQL statement 2. Include EXPLAIN command in the embedded dynamic SQL statements Read More
What are the isolation levels possible ?
Added on Mon, Nov 30, 2009
CS: Cursor Stability RR: Repeatable Read Read More
Where do you specify them ?
Added on Mon, Nov 30, 2009
ISOLATION LEVEL is a parameter for the bind process. Read More
What is a DBRM, PLAN ?
Added on Mon, Nov 30, 2009
DBRM: DataBase Request Module, has the SQL statements extracted from the host language program by the pre-compiler. PLAN: A result of the BIND process. It has the executable code for the SQL statements in the DBRM. Read More
What happens to the PLAN if index used by it is dropped?
Added on Mon, Nov 30, 2009
Plan is marked as invalid. The next time the plan is accessed, it is rebound. Read More
How will the program knows which key has been pressed?
Added on Mon, Nov 30, 2009
I am little confused, to find this ques. in DB2 section. If it is for CICS the ans. is as follows: The Execution Interface Block(EIB) has a field called EIBAID which contains the value of the last AID pressed. EIB is included in the linkage section... Read More
What is maximum number of one storage group?
Added on Mon, Nov 30, 2009
If it is the number of DASDs you want to know, then it is 133 DASDs. Read More
What are the advantages of using a PACKAGE?
Added on Mon, Nov 30, 2009
1. Avoid having to bind a large number of DBRM members into a plan 2. Avoid cost of a large bind 3. Avoid the entire transaction being unavailable during bind and automatic rebind of a plan 4. Minimize fallback complexities if changes result in... Read More
How to retrieve n-th row ie n-th record of any table irrespective of the columns and the values present in the table without using ROWID(As it is not supported in DB@)
Added on Mon, Nov 30, 2009
To retrieve the nth row from table you can code Query like SELECT * FROM TABLE-NAME WHERE NTH=(SELECT COUNT(*) FROM TABLE WHERE COUNT >2) IF WROUNGH FEED BACK ME Read More
What is difference between Collection and Version?
Added on Mon, Nov 30, 2009
Collection: set of packages with a collection id Version: it refers to a package created at a particular time.(ie) if the same package is created at a later time with no changes it will be a different version. there are two options for version add... Read More
What is data dictionary in DB2? and how is it handled?
Added on Mon, Nov 30, 2009
I think what you mean is the DB2 catalog. Since the catalog database (DSNDB06) is a relational database made up of tables you "handle" it with SQL. Read More
What is dynamic SQL?
Added on Mon, Nov 30, 2009
Dynamic SQL is a SQL statement created at program execution time. Read More
When is the access path determined for dynamic SQL?
Added on Mon, Nov 30, 2009
At run time, when the PREPARE statement is issued. Read More
How do you retrieve the data from a nullable column?
Added on Mon, Nov 30, 2009
Use null indicators. Syntax ... INTO :HOSTVAR:NULLIND Read More
How many columns maximum can be created in a table of a inner table of the subquerry
Added on Mon, Nov 30, 2009
Maximum number of columns in a table --> 256 Maximum lenght of a row in a table -- > 64KB Read More
What does it mean if the null indicator has -1, 0, -2? ?
Added on Mon, Nov 30, 2009
-1 : the field is null 0 : the field is not null -2 : the field value is truncated Read More
What is the roll of INDEX in a query?
Added on Mon, Nov 30, 2009
NDEX is generally used to make query access faster.It also takes less time for execution b’use it will not go for searching all the data’s in the table.It will search only by using that INDEX.INSEX is created on the column of a table.Then... Read More
How do you insert a record with a nullable column?
Added on Mon, Nov 30, 2009
To insert a NULL, move -1 to the null indicator To insert a valid value, move 0 to the null indicator Read More
What is RUNSTATS?
Added on Mon, Nov 30, 2009
A DB2 utility used to collect statistics about the data values in tables which can be used by the optimizer to decide the access path. It also collects statistics used for space management. These statistics are stored in DB2 catalog tables. Read More
When will you chose to run RUNSTATS?
Added on Mon, Nov 30, 2009
After a load, or after mass updates, inserts, deletes, or after REORG. Read More
What is IMAGECOPY ?
Added on Mon, Nov 30, 2009
It is full backup of a DB2 table which can be used in recovery. Read More
How do you eliminate duplicate values in DB2 SELECT ?
Added on Mon, Nov 30, 2009
Use SELECT DISTINCT ... in db2 query Read More
When do you use the IMAGECOPY?
Added on Mon, Nov 30, 2009
To take routine backup of tables After a LOAD with LOG NO After REORG with LOG NO Read More
How do you select a row using indexes in DB2?
Added on Mon, Nov 30, 2009
Specify the indexed columns in the WHERE clause of db2 query. Read More
How do you find the maximum value in a column in db2?
Added on Mon, Nov 30, 2009
Use SELECT MAX(...) .. in db2 query Read More
How to see the status of the table?
Added on Mon, Nov 30, 2009
Use DB2I command. Option 7. TO CHECK STATUS OF DATABASE (IT IS READ or READ/WRITE ETC) -DIS DB(*) SPACE(*) For eg,to check whether TABLESPACE PXXXXXXX.PZZZZZZZ IS IN CHECK PENDING, GIVING FOLLOWING : -DIS DB(PXXXXXXX) SPACE(PZZZZZZZ) ... Read More
My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?
Added on Mon, Nov 30, 2009
Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted. Read More
What is low values and high values?
Added on Mon, Nov 30, 2009
LOW-VALUES and HIGH-VALUES are figurative constants that represent the lowest and highest possible values for an alphanumeric data item. You would use them anytime you want to set or compare a data item to "all bits off" or "all bits on" values. ... Read More
What is the use of VALUE function?
Added on Mon, Nov 30, 2009
1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations 2. Substitute a numeric value for any nulls used in computation Read More
What does the sqlcode of -818 pertain to?
Added on Mon, Nov 30, 2009
This is generated when the consistency tokens in the DBRM and the load module are different. Read More
What is UNION,UNION ALL?
Added on Mon, Nov 30, 2009
UNION : eliminates duplicates UNION ALL: retains duplicates Both these are used to combine the results of different SELECT statements. Suppose I have five SQL SELECT statements connected by UNION/UNION ALL, how many times should I specify UNION to... Read More
When do you use subroutines?
Added on Mon, Nov 30, 2009
Subroutines are generally used when same piece of ode is required in arious pgs It ay or may not have the business logic. Read More
What is ’LIKE’ used for in WHERE clause? What are the wildcard characters? ?
Added on Mon, Nov 30, 2009
LIKE is used for partial string matches. ?%? ( for a string of any character ) and ?_? (for any single character ) are the two wild card characters. Read More
When do you use a LIKE statement?
Added on Mon, Nov 30, 2009
To do partial search e.g. to search employee by name, you need not specify the complete name; using LIKE, you can search for partial string matches. Read More
What is the result of this query if no rows are selected:
Added on Tue, Dec 1, 2009
SELECT SUM(SALARY) FROM EMP WHERE QUAL=?MSC?; NULL Read More
How to pass return codes from Cobol to jcl?
Added on Tue, Dec 1, 2009
By Using COND parameter in JCL.This parameter will automatically detect the return code from the calling program. By Using the RETURN-CODE field in the COBOL program. Read More
What is diff b/w check pending and copy pending?
Added on Tue, Dec 1, 2009
The Checkpening is referential integrity is in doubt or its check constraints are violated. To remove need to run CHECK data utility. Copy pending - LOAD places a table space in the copy pending status. to remove need to take the backup on a table... Read More
What is severity one error in production support?
Added on Tue, Dec 1, 2009
The Severity error in production support means the Job abended and sucessor jobs are holding the because of this job.(This is related to batch not for onlines) Read More
How to increase table space in db2?
Added on Tue, Dec 1, 2009
I think there is a command to alter the table space by which u can add containers or devices to ur existing table space........ We have to add or create containers in the TS. A TS can span more than one containes. Using Alter... Read More
How would you retrieve rows from a DB2 table in embedded SQL? ?
Added on Tue, Dec 1, 2009
Either by using the single row SELECT statements, or by using the CURSOR. Apart from cursor, what other ways are available to you to retrieve a row from a table in embedded SQL? - Single row SELECTs. Read More
Suppose there is cobol-db2 program.I made changes only in the cobol program.Is there need recomile the DBRM again?why?
Added on Tue, Dec 1, 2009
since during precompilation, a timestamp is given to both the COBOL code and DBRM, this will be identified at the time of execution. So, even a DBRM has to be bound. Read More
What is the difference between IN subselects and EXISTS subselect?
Added on Tue, Dec 1, 2009
If there is an index on the attributes tested an IN is more efficient since DB2 uses the index for the IN. (IN for index is the mnemonic). Read More
What is the purpose of the WHENEVER statement?
Added on Tue, Dec 1, 2009
A54. The WHENEVER statement is coded once in the host program to control program actions depending on the SQL-CODE returned by each sql statement within the program. Read More
What is DCLGEN?
Added on Tue, Dec 1, 2009
DCLGEN stands for declarations generator; it is a facility to generate DB2 sql data structures in COBOL or PL/I programs. Read More
How do you select a row using indexes?
Added on Tue, Dec 1, 2009
Specify the indexed columns in the WHERE clause. Read More
What is the FREE command?
Added on Sat, Dec 5, 2009
Free Command is meant for the deletion of plans. A single free command can delete max. of 12 packages. Read More
What is isolation level?
Added on Sat, Dec 5, 2009
SQL statements may return any number of rows, but most host languages deal with one row at a time by declaring a cursor that presents each row at a unique isolation level. Read More
How is the SUBSTR keyword used in sql?
Added on Sat, Dec 5, 2009
SUBSTR is used for string manipulation with column name, first position and string length used as arguments. Eg. SUBSTR (NAME, 1 3) refers to the first three characters in the column NAME. Read More
In terms of DB2 indexing, what is the root page?
Added on Sat, Dec 5, 2009
The simplest DB2 index is the B-tree and the B-tree’s top page is called the root page. The root page entries represent the upper range limits of the index and are referenced first in a search. Read More
What is a clustered index?
Added on Sat, Dec 5, 2009
For a clustered index DB2 maintains rows in the same sequence as the columns in the index for as long as there is free space. DB2 can then process that table in that order efficiently. Read More
What is EXPLAIN? ? drona questions ?
Added on Sat, Dec 5, 2009
EXPLAIN is used to display the access path as determined by the optimizer for a SQL statement. It can be used in SPUFI (for single SQL statement ) or in BIND step (for embedded SQL ). Read More
What is the cascade rule and how does it relate to deletions made with a subselect. The cascade rule will not allow deletions based on a subselect that references the same table from which the deletions are being made?
Added on Sat, Dec 5, 2009
Cascade rule is one of the RI constraint. Which allows deletion of FK from the Dependent table if the PK from the parent is deleted. If we try to delete record from the parent that is not in the child we will see abend code -532. Read More
What is a NULL value? What are the pros and cons of using NULLS?
Added on Mon, Dec 7, 2009
A NULL value takes up one byte of storage and indicates that a value is not present as opposed to a space or zero value. It’s the DB2 equivalent of TBD on an organizational chart and often correctly portrays a business situation. Unfortunately,... Read More
What is a synonym? How is it used?
Added on Mon, Dec 7, 2009
A synonym is used to reference a table or view by another name. The other name can then be written in the application code pointing to test tables in the development stage and to production entities when the code is migrated. The synonym is linked to... Read More
How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause.
Added on Mon, Dec 7, 2009
Use a question mark in place of a host variable ( or an unknown value ). e.g. SELECT EMP_NAME FROM EMP WHERE EMP_SALARY > ? DB2 Interview Questions - PART III www.mainframegurukul.com Read More
What is a DB2 plan?
Added on Mon, Dec 7, 2009
An application plan or package is generated by the bind to define an access path. Read More
What is a cursor? why should it be used?
Added on Mon, Dec 7, 2009
Cursor is a programming device that allows the SELECT to find a set of rows but return them one at a time. Cursor should be used because the host language can deal with only one row at a time. Read More
Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened?
Added on Mon, Dec 7, 2009
Probably RUN STATS is not done and the program is using a wrong index due to incorrect stats. Probably RUNSTATS is done and optimizer has chosen a wrong access path based on the latest statistics. Read More
Can GROUP BY and ORDERED BY used in a single query?
Added on Sun, Nov 29, 2009
YES we can use and Group by must come in order to code query.Ex. select * from tab01 group by col1 order by col02 Read More
What is a precompiler?
Added on Sun, Nov 29, 2009
Precompilor-: Precompilor’s main purpose is to check the syntactical error of COBOL programes which contains embeded SQL statements.It first compiles & then differentiates cobol & DB2 statements.It sends all the... Read More
Can you display the index?
Added on Sun, Nov 29, 2009
u can display index in DB2 using syscat.sysindexes & syscat.syskeys system tables the common linking columns in the tables being tbname (table name) and tbcreator. Read More
What are Dedicated and Pool Threads?
Added on Sun, Nov 29, 2009
These are part of the CICS-DB2 Interface. Dedicated threads are connections to DB2 that are always available to a particular application so that app doesn’t have to wait. High priority apps use dedicated threads. Pool threads are shared by... Read More
What do you need to do before you do EXPLAIN?
Added on Mon, Nov 30, 2009
Make sure that the PLAN_TABLE is created under the AUTHID Read More
When do you specify the isolation level? How?
Added on Mon, Nov 30, 2009
During the BIND process. ISOLATION ( CS/RR )... I use CS and update a page. Will the lock be released after I am done with that page? No. Read More
What is ACQUIRE/RELEASE in BIND?
Added on Mon, Nov 30, 2009
Determine the point at which DB2 acquires or releases locks against table and tablespaces, including intent locks. Read More
What is a collection?
Added on Mon, Nov 30, 2009
a user defined name that is the anchor for packages. It has not physical existence. Main usage is to group packages. In SPUFI suppose you want to select max. of 1000 rows , but the select returns only 200 rows. Read More
How does DB2 store NULL physically?
Added on Mon, Nov 30, 2009
as an extra-byte prefix to the column value. physically, the nul prefix is Hex ?00? if the value is present and Hex ?FF? if it is not. Read More
What is stored in tables under creator SYSIBM?
Added on Mon, Nov 30, 2009
Meta data information is stored in the sysibm schema. sysibm schema holds the database information and this schema exists for each database and holds the tables, columns, procedures and others that a user creates under that database. Read More
File contains 5 records say D,E,F,C,A-I want to copy D and A records only by using file-aid?
Added on Mon, Nov 30, 2009
Go to file-aid copy option. Enter the from dataset to be copied and to dataset to which you want to copy.go to options. Enter 0 at Initial records to skip field.Then enter 3 at the no of records to skip field and 1 to no of records to select.press... Read More
How to load data to a table?
Added on Mon, Nov 30, 2009
Loading a DB2 table can be done by an utility as mentioned above or u can code a program and insert all the records data from a file by dynamic sql commands validating for all the fields. Eg: EXEC SQL INSERT INTO Table1... Read More
A dataset contains 1000 records ,I want to brouse particular record in file-id?
Added on Mon, Nov 30, 2009
From File-Aid Main Menu Choose option Browse or Edit and press enter Where we suppose give physical file name and copybook name and copy book path and also At the bottom there is option ’selection critiera’ where N-none ... Read More
How would you find out the total number of rows in a DB2 table?
Added on Mon, Nov 30, 2009
Use SELECT COUNT(*) ... in db2 query DB2 INTERVIEW QUESTIONS DB2 SQL INTERVIEW Questions Read More
What is diff b/w QMF & Spoofi?
Added on Mon, Nov 30, 2009
execute more queries at a time. 2. In SPUFI result of the query will be in PS or in PDS member will store but 3.you know the sqlcode after executing the query. QMF: 1.you cannot execute more than one query. 2. In QMF result of the query u can?t... Read More
Describe the elements of the SELECT query syntax. SELECT element FROM table WHERE conditional statement
Added on Mon, Nov 30, 2009
SELECT statement is used for selecting a particular items or all items from a table...it is as desired by the user. FROM statement is used to to tell the table name. WHERE statement is used to specify a particular condition while choosing... Read More
What is an inner join, and an outer join
Added on Mon, Nov 30, 2009
Inner Join: combine information from two or more tables by comparing all values that meet the search criteria in the designated column or columns of on e table with all the clause in corresponding columns of the other table or tables. This kind of... Read More
What do you accomplish by GROUP BY ... HAVING clause? ?
Added on Mon, Nov 30, 2009
GROUP BY partitions the selected rows on the distinct values of the column on which you group by. HAVING selects GROUPs which match the criteria specified Read More
How to Repair the table?
Added on Tue, Dec 1, 2009
By using any condition is there any way to abend a program.?If so how?
Added on Tue, Dec 1, 2009
We can abend the program based on certain conditons. If the condition is satisfied call the program ’ILBOABN0’ using abned code. CALL ’ILBOABN0’ USING U0165. Read More
After retrieving the elements from production,how can do the testing before moving the changes to production. Whether we have to create the JCL for testing or it will automatically tested and compiled?
Added on Tue, Dec 1, 2009
Whenever a component is retrieved from the production base to a package, the component automatically gets compiled and staged. If not, then you can restage/recompile (by issuing ’r’/’s’ command) the component after it is... Read More
What is the COBOL picture clause of the following DB2 data types:
Added on Sat, Dec 5, 2009
DATE, TIME, TIMESTAMP? DATE: PIC X(10) TIME : PIC X(08) TIMESTAMP: PIC X(26) Read More
What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?
Added on Sat, Dec 5, 2009
The clause avoids closing the cursor and repositioning it to the last row processed when the cursor is reopened. Read More
What is an alias and how does it differ from a synonym?
Added on Mon, Dec 7, 2009
An alias is a logical pointer to an alternate table name. The purpose of an alias is to resolve loops in the paths of joins. In some cases, more than one alias may be necessary for a given table. Read More
What is a DB2 bind?
Added on Mon, Dec 7, 2009
A DB2 bind is a process that builds an access path to DB2 tables. A DB2 bind is a process that builds an access path to DB2 tables Read More
What is a DB2 access path?
Added on Mon, Dec 7, 2009
An access path is the method used to access data specified in DB2 sql statements. Read More
|