Mainframes Interview Questions
Mainframes Interview Questions
HOME FORUM ERROR CODES TOOLS EXAMPLES INTERVIEW QUESTIONS MANUALS/BOOKS JOBS LOGIN
Home Manuals/Books
Main Menu
Home
Forum
Error Codes Mainframes Interview Questions
Tools
Examples IMS DB Interview Questions
Interview Questions Written by Administrator
Manuals/Books Wednesday, 21 April 2010 09:50
1 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
2 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A11) It is necessary to create a table index whenever you want to enforce the VSAM must maintain for a specific base cluster, so
uniqueness of the table’s primary key. that when data in the base cluster is updated, the
Q12) What is a synonym? AIX files are also updated.
A12) A synonym is an unqualified alternative name for a table or view. Q13) What is free space?
Q13) What is a foreign key? Q13) Free space is reserved within the data
A13) A foreign key is the key defined in one table to reference the primary key of a component of a KSDS to accommodate inserting
reference table. This foreign key must new records.
have the same structure as the reference table’s primary key. Q14) What is a VSAM split?
Q14) What is referential integrity? Q14) If there isn't enough space in the control
A14) Referential integrity is the automatic enforcement of referential constraints that interval VSAM performs a control interval split by
exist between a reference table and a moving some records to the free control intervals. If
referencing table. When referential integrity is enforced, the value of a foreign key there isn't a free control interval VSAM performs a
exists as a primary key value in the control area split by allocating a new control area and
reference table. In other words, when referential integrity is enforced, all of the moving half of the control intervals to it.
foreign key values in, for example, the Q15) What is the base cluster?
“department code” column in an “employee” table exist as primary key values in a Q15) The base cluster consists of the data
“department” table. component and the index component for the primary
Q15) What are the column name qualifiers? index of a KSDS.
A15) A column name qualifier are used as a table designator to avoid ambiguity Q16) Do primary key values have to be unique? Do
when the column names referenced exists alternate key values have to be unique?
in more than one table used in the SQL statement. Column name qualifiers are also Q16) Primary key values must be unique; alternate
used in correlated references. key values need not be.
Q16) What is a correlation name? Q17) In the COBOL SELECT statement what is the
A16) A correlation name is a special type of column designator that connects ORGANIZATION for a KSDS?
specific columns in the various levels of a Q17) The ORGANIZATION is INDEXED.
multilevel SQL query. Q18) In the COBOL SELECT statement for a
Q17) What is a results table? KSDS what are the three possibilities for ACCESS?
A17) A result table is the product of a query against one or more tables or views Q18) ACCESS can be SEQUENTIAL, RANDOM
(i.e., it is the place that holds the results of a or DYNAMIC.
query). Q19) What is the COBOL RECORD KEY clause?
Q18) What is a cursor? Q19) The RECORD KEY in the SELECT clause
A18) A cursor is a named control structure used to make a set of rows available to a identifies the files primary key as it will be known to
program. DB2 is the relational database the program.
system that runs in an MVS environment. It was developed by IBM and interfaces Q20) What is the purpose of the FILE STATUS
with SQL. With the use of SQL clause in the SELECT statement?
DB2, databases can be accessed by a wide range of host languages. SQL is the Q20) The FILE STATUS field identifies the field
relational database " application that VSAM uses to provide information about each
language " that interfaces with DB2. Because of its capabilities, SQL and, in turn, I/O operation for the file.
DB2 have gained considerable Q21) If you wish to use the REWRITE command
acceptance. Thus, a working knowledge of DB2 increases one's marketability. haw must the VSAM file be opened?
Q19) What is the basic difference between a join and a union? Q21) It must be opened as I/O.
A19) A join selects columns from 2 or more tables. A union selects rows. Q22) Explain the meaning and syntax for the
Q20) What is normalization and what are the five normal forms? START command.
A20) Normalization is a design procedure for representing data in tabular format. The five normal Q22) The START command is used read other than
forms are progressive the next VSAM record. A value must be moved into
rules to represent the data with minimal redundancy. the RECORD KEY. The KEY clause is optional, but
Q21) What are foreign keys? it can be used to specify a relational (equal, less than,
A21) These are attributes of one table that have matching values in a primary key in another table, etc.) operator.
allowing for relationships Q23) What is the meaning of dynamic processing?
between tables. Q23) It's rarely used. It means one program uses
Q22) Describe the elements of the SELECT query syntax? both sequential and random processing for a VSAM
A22) SELECT element FROM table WHERE conditional statement. KSDS file.
Q23) Explain the use of the WHERE clause? Q24) Name some common VSAM error conditions
A23) WHERE is used with a relational statement to isolate the object element or row. and codes.
Q24) What techniques are used to retrieve data from more than one table in a single SQL statement? Q24) They are end of file (10), duplicate key (22),
A24) Joins, unions and nested selects are used to retrieve data. record not found (23), VSAM logic error (90), open
Q25) What is a view? Why use it? problem (92) and space problem (93).
A25) A view is a virtual table made up of data from base tables and other views, but not stored Q25) What is the VSAM-code field?
separately. Q25) It is a COBOL II enhancement to VSAM batch
Q26) Explain an outer join? processing expanding the FILE STATUS field. It is
A26) An outer join includes rows from tables when there are no matching values in the tables. defined in WORKING-STORAGE as a six byte
Q27) What is a subselect? Is it different from a nested select? group item with three two byte elements, the normal
A27) A subselect is a select which works in conjunction with another select. A nested select is a kind of return code, the function code and the feedback
subselect where the code.
inner select passes to the where criteria for the outer select. Q26) What is a VSAM slot?
Q28) What is the difference between group by and order by? Q26) A relative record dataset (RRDS) consists of a
A28) Group by controls the presentation of the rows, order by controls the presentation of the columns specified number of areas called slots. Each slot is
for the results of the identified by a relative record number (RRN) which
SELECT statement. indicates its relative position in the file.
Q29) What keyword does an SQL SELECT statement use for a string search? Q27) What is the utility program closely associated
A29) The LIKE keyword allows for string searches. The % sign is used as a wildcard. with VSAM?
Q30) What are some SQL aggregates and other built-in functions? Q27) IDCAMS, the access method services utility.
A30) The common aggregate, built-in functions are AVG, SUM, MIN, MAX, COUNT and Q28) There are at least seven IDCAMS commands;
DISTINCT. name and explain each of them ?.
Q31) How is the SUBSTR keyword used in SQL? Q28) ALTER modifies information for a catalog,
A31) SUBSTR is used for string manipulation with column name, first position and string length used alternate index, cluster or path. BLDINDEX builds
as arguments. E.g. the alternate index, of course. DEFINE is used for
SUBSTR (NAME, 1 3) refers to the first three characters in the column NAME. ALTERNATEINDEX, CLUSTER or PATH.
Q32) Explain the EXPLAIN statement? DELETE removes the catalog entry for a catalog,
A32) The explain statement provides information about the optimizer's choice of access path of the cluster, alternate index or path. LISTCAT lists
SQL. information about the dataset. PRINT prints the
Q33) What is referential integrity? dataset contents. REPRO copies records from one
A33) Referential integrity refers to the consistency that must be maintained between primary and file to another.
foreign keys, i.e. every Q29) What are the three levels of definition for the
foreign key value must have a corresponding primary key value. VSAM DEFINE?
Q34) What is a NULL value? What are the pros and cons of using NULLS? Q29) They are DEFINE CLUSTER, DATA and
A34) A NULL value takes up one byte of storage and indicates that a value is not present as opposed INDEX.
3 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
4 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
"No data returned"?(Check one that applies the best) used during allocation. CA size is calculated based on
A). 00xxx the
B). 01xxx allocation type (cyl, tracks or records) and can be
C). 02xxx max of 1 cylinder
D). 22xxx Q39) What is FREESPACE ?
E). 2Axxx Q39) Coded in the DEFINE as FREESPACE(ci ca)
A47) C. 00 - is successful completion, 01 - warnings, 22 - is data exception and 2A is syntax error. The where ci is the percentage of each control interval to
SQLSTATE code be left free for insertions, ca is the percentage of
format returned for "No data returned" is "02xxx". control intervals in each control area to be left
Q48) What are common SQL abend codes? (e.g. : 0,100 etc.,) empty.
A48) -818 time stamp mismatch Q40) How do you decide on optimum values for CI,
-180 wrong data moved into date field FREESPACE etc...?
Q49) What is meant by dynamic SQL? Q40) CI size should be based on record length, type
A49) Dynamic SQL are SQL statements that are prepared and executed within a program while the of processing. Usually CI is 4K. If record length is
program is executing. larger(>1K), chose 6K or 8K. FREESPACE should
The SQL source is contained in host variables rather than being hard coded into the program. The be large if more number of insertions are envisaged.
SQL statement may Usual values are (20 20) when heavy updates are
change from execution to execution. expected. CI size can be calculated.
Q50) What is meant by embedded SQL? Q41) Would you specify FREESPACE for an
A50) They are SQL statements that are embedded with in application program and are prepared during ESDS?
the program Q41) No. Because you cannot insert records in an
preparation process before the program is executed. After it is prepared, the statement itself does not ESDS, also when you rewrite a record, it must be of
change(although the same length. Thus putting any value for
values of host variables specified within the statement might change). freespace does not make any sense.
Q51) What is meant by entity integrity? Q42) What is SHAREOPTS ?
A51) Entity integrity is when the primary key is in fact unique and not null. Q42) SHAREOPTS is a parameter in the DEFINE
Q52) What will EXPLAIN do? and specifies how an object can be shared among
A52) EXPLAIN obtains information (which indexes are used, whether sorting is necessary, which level users. It is coded as SHAREOPTS(a b), where a is
of locking is the cross region share option ie how two or more
applied) about how SQL statements in the DBRM will be executed, inserting this information into jobs on a single system can share the file, while b is
the the cross system share option ie how two or more
“X”.PLAN.TABLE where the “X” is the authorization ID of the owner of the plan. jobs on different MVS’s can share the file. Usual
Q53) What is the foreign key? value is (2 3).
A53) A foreign key is a column (or combination of columns) in a table whose values are required to Q43) What is the meaning of each of the values in
match those of the SHAREOPTS(2 3)?
primary key in some other table. Q43) Value of 2 for cross region means that the file
Q54) What will GRANT option do? can be processed simultaneously by multiple users
A54) It will grant privileges to a list of one or more users. If the GRANT option is used in conjunction provided only one of them is an updater. Value of 3
with the “PUBLIC” for cross system means that any number of jobs can
option, then all users will be granted privileges. Also you can grant privileges by objects and types. process the file for input or output (VSAM does
Q55) What does the term “grant privileges” mean? nothing to ensure integrity).
A55) Grant privileges means giving access/authority to DB2 users. Q44) How do you define a KSDS ?
Q56) What is an image copy? Q44) DEFINE CLUSTER(cluster name) with the
A56) It is an exact reproduction of all or part of a tablespace. DB2 provides utility programs to make INDEXED parameter. Also specify the ds name for
full-image copies (to the DATA component & the ds INDEX component.
copy the entire tablespace) or incremental image copies to copy only those pages that have been Other important parms are RECORDSIZE, KEYS,
modified since the last SHAREOPTIONS.
image copy. Q45) How do you define an ALTINDX ? How do
Q57) What is meant by an index? you use ALTINDXs in batch, CICS pgm’s ?
A57) An index is a set of row identifiers (RIDs) or pointers that are logically ordered by the values of a Q45) DEFINE ALTERNATEINDEX. Important
column that has paramters are RELATE where you specify the base
been specified as being an index. Indexes provide faster access to data and can enforce uniqueness cluster name, KEYS,
on the row in a RECORDSIZE,SHAREOPTIONS,UNIQUEKEY(or
table. NONUNIQUEKEY), DATA(ds name for the data
Q58) What is an index key? component), INDEX(ds name for the index
A58) It is a column or set of columns in a table used to determine the order of index entries. component). Then DEFINE PATH. Important
Q59) What is a join? paramters are NAME (ds name for the path),
A59) A join is a relational operation that allows retrieval of data from two or more tables based on PATHENTRY (ds name of the alternate index
matching columns name), UPDATE(or NOUPDATE) which specifies
values. whether an alt index is updated when a update to the
Q60) What is meant by locking? base cluster takes place. Then BLDINDEX.
A60) Locking is a process that is used to ensure data integrity. It also prevents concurrent users from Parameters are INDATASET(ds name of base
accessing inconsistent cluster), OUTDATASET(ds name of AIX).
data. The data (row) is locked until a commit is executed to release the updated data. Q46) Using Alternate Indexes in Batch pgms:
Q61) What is meant by null? Q46) In the JCL, you must have DD stmts for the
A61) This is a special value that indicates the absence of data in a column. This value is indicated by a cluster and for the path(s). In the COBOL Program,
negative value, SELECT .. ASSIGN TO ddname for base cluster
usually -1. RECORD KEY IS... ALTERNATE RECORD KEY
Q62) What is an object? IS..
A62) An object is anything that is managed by DB2 (that is databases, table spaces, tables, views, Q47) Using Alternate Indexes in CICS pgms:
indexes or synonyms), but Q47) FCT entries must be created for both base
not the data itself. cluster & the path. To read using the alternate index,
Q63) Describe referential integrity? use the dd name of the path in CICS file control
A63) Referential integrity refers to a feature in DB2 that is used to ensure consistency of the data in the commands.
database. Q48) What happens when you open an empty
Q64) Describe a primary key? VSAM file in a COBOL program for input?
A64) A primary key is a key that is unique, non-null, and is part of the definition of a table. A table Q48) A VSAM file that has never contained a record
must have a primary key is treated as unavailable. Attempting to open for
to be defined as a parent. input will fail. An empty file can be opened for
Q65) How would you find out the total number of rows in a table? - GS output only. When you open for output, COBOL
A65) Use SELECT COUNT(*) ... will write a dummy record to the file & then delete it
Q66) How do you eliminate duplicate values in SELECT? - GS out.
A66) Use SELECT DISTINCT ... Q49) How do you initialize a VSAM file before any
Q67) How do you select a row using indexes? - GS operation? a VSAM with alternate index?
A67) Specify the indexed columns in the WHERE clause. Q49) Can write a dummy program that just opens
Q68) What are aggregate functions? the file for output and then closes it.
A68) Bulit-in mathematical functions for use in SELECT clause. Q50) What does a file status of 02 on a VSAM
5 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
6 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A1) DB2 is a subsystem of the MVS operating system. It is a Database Management System (DBMS) Q65) 255 - but you must be a nut to have so many
for that operating system. ALT Indexes on a dataset!
Q2) What is an access path? Q66) Is it slower if you access a record through ALT
A2) The path that is used to get to data specified in SQL statements. INDEX as compared to Primary INDEX?
Q3) What is an alias? Q66) Yes. Why? Because the alternate key would
A3) It is an alternate name that can be used in SQL statements to refer to a table or view in the same first locate the primary key, which in turn locates the
or remote DB2 subsystem. actual record. Needs twice the number of I/Os.
Q4) Explain what a plan is? Q67) What is RECOVERY and SPEED parameters
A4) Plan is a DB2 object (produced during the bind process) that associates one or more database in DEFINE CLUSTER command?
request modules with a plan name. Q67) RECOVERY (default) and SPEED are
Q5) What is a DB2 bind? mutually exclusive. Recovery preformats the control
A5) Bind is a process that builds “access paths” to DB2 tables. A bind uses the Database Request areas during the initial dataset load, if the job fails,
Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It you can restart but you must have a recovery
also checks the user’s authority and validates the SQL statements in the DBRM(s). routine already written to restart the job. SPEED
Q6) What information is used as input to the bind process? does not preformat the CAs. It is recommended that
A6) The database request module produced during the pre-compile. The SYSIBM.SYSSTMT table of you specify SPEED to speed up your initial data
the DB2 catalog. load.
Q7) What is meant by the attachment facility? Q68) Describe SHAREOPTIONS parameter (SHR)
A7) The attachment facility is an interface between DB2 and TSO, IMS/VS, CICS, or batch address in Define Cluster command.
spaces. It allows application programs to access DB2. Q68) It defines the cross-region and cross-system
Q8) What is meant by AUTO COMMIT? sharing capabilities of the dataset. Syntax is
A8) AUTO COMMIT is a SPUFI option that commits the effects of SQL statements automatically if SHR(Crvalue, CSvalue) value 1 means multiple read
they are successfully executed. OR single write (read integrity) 2 means multiple
Q9) What is a base table? read AND single write (Write integrity) 3 means
A9) A base table is a real table - a table that physically exists in that there are physical stored records. Multiple read AND multiple write 4 is same as 3,
Q10) What is the function of buffer manager? which refreshes the buffer with every random
A10) The buffer manager is the DB2 component responsible for physically transferring data access. default is SHR(1 3).
between an external medium and (virtual) storage (performs the actual I/O operations). It Q69) What does the KEYRANGES parameter in
minimizes the amount of physical I/O actually performed with sophisticated buffering Define Cluster commend do?
techniques(i.e., read-ahead buffering and look-aside buffering). A69) It divides a large dataset into several volumes
Q11) What is a buffer pool? according to the Key ranges specified. e.g.,
A11) A buffer pool is main storage that is reserved to satisfy the buffering requirements for one or KEYRANGES ((0000001 2999999) (3000000
more tablespaces or indexes, and is made up of either 4K or 32K pages. 5999999)). if the activity on the key ranges are
Q12) How many buffer pools are there in DB2? evenly distributed, concurrent access is possible,
A12) There are four buffer pools: BP0, BP1, BP2, and BP32. which is a performance improvement.
Q13) On the create tablespace, what does the CLOSE parameter do? Q70) What are the optional parameters to the input
A13) CLOSE physically closes the tablespace when no one is working on the object. DB2 (release dataset While loading the empty cluster with the data
2.3) will logically close tablespaces. records?
Q14) What is a clustering index? A70) 1)FROMADDRESS(address)
A14) It is a type of index that (1) locates table rows and (2) determines how rows are grouped 2)TOADDRESS(address) where 'address' specifies
together in the tablespace. the RBA value of the key of the input record.
Q15) What will the COMMIT accomplish? 3)FROMNUMBER(rrn) 4)TONUMBER(rrn) where
A15) COMMIT will allow data changes to be permanent. This then permits the data to be 'rrn' specifies the relative record number of the
accessed by other units of work. When a COMMIT occurs, locks are freed so other applications RRDS record 5)FROMKEY(key) 6)TOKEY(key)
can reference the just committed data. where 'key' specifies the key of the input record
Q16) What is meant by concurrency? 7)SKIP(number) 8)COUNT(number) where
A16) Concurrency is what allows more than one DB2 application process to access the same data 'number' specifies the number of records to skip or
at essentially the same time. Problems may occur, such as lost updates, access to uncommitted copy Ex: REPRO INFILE(DD1) OUTFILE(DD2)
data, and un-repeatable reads. SKIP(9000) COUNT(700) - Skips the first 9000
Q17) What is cursor stability? records and begins copying at 9001 and copies 700
A17) It is cursor stability that “tells” DB2 that database values read by this application are records from DD1 to DD2.
protected only while they are being used. (Changed values are protected until this application Q71) What is IDCAMS? and what is the purpose of
reaches the commit point). As soon as a program moves from one row to another, other programs it?.
may read or the first row. A71) IDCAMS is an access method services utility
Q18) What is the function of the Data Manager? used for creating, deleting, altering VSAM files and
A18) The Data Manager is a DB2 component that manager the physical databases. It invokes copying sequential file to a VSAM file, etc.
other system components, as necessary, to perform detailed functions such as locking, logging, Q72) How to delete a member using JCL.
and physical I/O operations (such as search, retrieval, update, and index maintenance). A72) Using IDCAMS a member can be deleted.
Q19) What is a Database Request Module(DBRM)? DELETE 'XXX.YYY(member)
A19) A DBRM is a DB2 component created by the DB2 pre-compiler containing the SQL source Q73) What is the Difference between LDS & ESDS
statements extracted from the application program. DBRMs are input to the bind process. ?
Q20) What is a data page? A73) These two datasets are VSAM datasets. ESDS
A20) A data page is a unit of retrievable data, either 4K or 32K (depending on how the table is maintains control information. But LDS does not
defined), containing user or catalog information. maintains the control information.
Q21) What are data types? Q74) Is a delete operation possible in an ESDS?B.
A21) They are attributes of columns, literals, and host variables. The data types are SMALLINT, Is rewrite operation possible in ESDS ?
INTEGER, FLOAT, DECIMAL, CHAR, VARCHAR, DATE and TIME. A74) No delete operation is not possible in VSAM
Q22) What is Declaration Generator(DCLGEN)? ESDS.B. Yes rewrite operation is possible in an
A22) DCLGEN is a facility that is used to generate SQL statements that describe a table or view. ESDS.
These table or view descriptions are then used to check the validity of other SQL statements at Q75) What is an alternate index and path ?
precompile time. The table or view declares are used by the DB2I utility DCLGEN to build a host A75) An alternate index is an another way of
language structure, which is used by the DB2 precompiler to verify that correct column names and accessing key sequenced data record stored in a base
data types have been specified in the SQL statement. cluster and path is the linkage which connect
Q23) What does DSNDB07 database do? alternate index to its base cluster.
A23) DSNDB07 is where DB2 does its sorting. It includes DB2’s sort work area and external Q76) How many buffers are allotted to VSAM
storage. KSDS and ESDS?
Q24) What will the FREE command do to a plan? A76) 2 data buffers by default for ESDS. For KSDS
A24) It will drop(delete) that existing plan. it allots 2 data buffers and 1 index buffers. each
Q25) What is a host variable? buffer is about 4k.
A25) This is a data item that is used in an SQL statement to receive a value or to supply a value. Q77) what's the biggest disadvantage of using a
It must be preceded by a colon (:) to tell DB2 that the variable is not a column name. VSAM dataset?
Q26) What will the DB2 optimizer do? A77) FREE SPACE(FPSC)
A26) The optimizer is a DB2 component that processes SQL statements and selects the access Q78) what's the device independent method to
paths. indicate where a Record is Stored?
Q27) What is a page? A78) By USING RBA(Relative Byte Address).
A27) This is the unit of storage within a table space or indexspace that is accessed by DB2. Q79) How many times secondary space allocated?
Q28) What is pagespace? A79) 122 TIMES
7 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A28) Pagespace refers to either to an unpartitioned table, to an index space, or to a single partition Q80) what is the RRN for the first record in RRDS?
of a partitioned table of index space. A80) The answer is : 1
Q29) What is a predicate? Q81) what is a Base Cluster?
A29) A predicate is an element of a search condition that expresses or implies a comparison A81) The Index and data components of a KSDS
operation. Q82) If FSPC(100 100) is specified does it mean
Q30) What is a recovery log? that both the control interval and control area will be
A30) A recovery log is a collection of records that describes the sequence of events that occur in left empty because 100 % of both CI and ca are
DB2. The information is needed for recovery in the event of a failure during execution. specified to be empty?
Q31) What is a Resource Control Table(RCT)? Describe its characteristics. A82) No, they would not be left empty. one record
A31) The RCT is a table that is defined to a DB2/CICS region. It contains control characteristics will be written in each CI and 1 CI will be written for
which are assembled via the DSNCRCT macros. The RCT matches the CICS transaction ID to each ca.
its associated DB2 authorization ID and plan ID(CICS attachment facility). Last Updated on Wednesday, 21 April 2010 09:39
Q32) Where are plans stored?
A32) Each plan is defined uniquely in the SYSIBM.SYSPLANS table to correspond to the
transaction (s) that are to execute that plan. JCL Interview
Q33) What is meant by repeatable read?
A33) When an application program executes with repeatable read protection, rows referenced by Questions
the program can’t be changed by other programs until the program reaches a commit point.
Q34) Describe what a storage group(STOGROUP) is? Written by Administrator
A34) A STOGROUP is a named collection of DASD volumes to be used by tablespaces and Tuesday, 20 April 2010 06:38
index spaces of databases. The volumes of STOGROUP must be of the same device type. JCL (JOB CONTROL LANGUAGE) Frequently Asked
Q35) How would you move a tablespace (using STOGROUP) to a different DASD volume Questions (FAQS) :
allocated to that tablespace? Q1) What is a Generation Data Group (GDG)?
A35) If the tablespace used is only allocated to that STOGROUP: A1) Generation Data Group is a group of
- ALTER STOGROUP - add volume (new) delete volume(old) chronologically or functionally related datasets.
- REORG TABLESPACE or RECOVER TABLESPACE GDGs are processed periodically, often by adding a
Create a new STOGROUP that points to the new volume. ALTER the tablespace and REORG or new generation, retaining previous generations, and
RECOVER the sometimes discarding the oldest generation.
tablespace. Q2) How is a GDG base created?
Q36) What is the format (internal layout) of “TIMESTAMP”? A2) A GDG base is created in the system catalog
A36) This is a seven part value that consists of a date (yymmdd) and time(hhmmss and and keeps track of the generation numbers used for
microseconds). datasets in the group. IDCAMS utility is used to
Q37) What is meant by a unit of recovery? define the GDG base.
A37) This is a sequence of operations within a unit of work(i.e., work done between commit Q3) What is model dataset label(Model DSCB)?
points). A3) A model dataset label is a pattern for the dataset
Q38) Can DASD types assigned to storage groups be intermixed(i.e., 3350s and 3380s)? label created for any dataset named as a part of the
A38) No GDG group. The system needs an existing dataset to
Q39) What are the three types of page locks that can be held? serve as a model to supply the DCB parameters for
A39) Exclusive, update, and share. the generation data group one wishes to create. The
Q40) Can DB2 be accessed by TSO users? If yes, which command is used to invoke DB2? model dataset label must be cataloged. The model
A40) DB2 can be invoked by TSO users by using the DSN RUN command. DSCB name is placed on the DCB parameter on the
Q41) How are write I/Os from the buffer pool executed? DD statement that creates the generation data group.
A41) Asynchronously. Q4) How are GDGs concatenated?
Q42) What is a DB2 catalog? A4) Generation Data Groups are concatenated by
A42) The DB2 catalog is a set of tables that contain information about all of the DB2 specifying each dataset name and the generation
objects(tables, views, plans etc.). number for all generations of the generation data
Q43) In which column of which DB2 catalog would you find the length of the rows for all tables? group. Otherwise to have all generations of a
A43) In the RECLENGTH column of SYSIBM.SYSTABLES generation data group, omit the generation number.
Q44) What information is held in SYSIBM.SYSCOPY? The DD statement will refer to all generations. The
A44) The SYSIBM.SYSCOPY table contains information about image copies made of the result is the same as if all individual datasets were
tablespaces. concatenated. If generations are not on the same
Q45) What information is contained in a SYSCOPY entry? volume, this will not work.
A45) Included is the name of the database, the table space name, and the image copy type(full or Q5) How is a new GDG coded?
incremental etc.,) as well as the date and time each copy was made. A5) A new GDG is coded as (+1) after the dataset
Q46) What information can you find in SYSIBM.SYSLINKS table? name as follows: DSN=JAN.DATA(+1). This will
A46) The SYSIBM.SYSLINKS table contains information about the links between tables created cause all generations to be pushed down one level at
by referential constraints. the end of the job.
Q47) Where would you find information about the type of database authority held by the user? Q6) When should DISP=MOD is used?
A47) SYSIBM.SYSDBAUTH. A6) DISP=MOD is used to either extend an existing
Q48) Where could you look if you had a question about whether a column has been defined as an sequential dataset or to create a dataset if it does not
index? exist. If the dataset exists, then records are appended
A48) This information can be found in SYSIBM.SYSINDEXES. to the dataset at the end of the existing dataset. If
Q49) Once you create a view, where would information about the view be stored? the dataset does not exist, the system treats MOD as
A49) When a view is created, system information about the view is stored in if it were NEW, provided that the volume parameter
SYSIBM.SYSVIEWS. has not been used. If the volume parameter is used,
Q50) What is the SQL Communications Area and what are some of its key fields? the system terminates the job and does not create
A50) It is a data structure that must be included in any host-language program using SQL. It is the new dataset. MOD can be used to add to a
used to pass feedback about the sql operations to the program. Fields are return codes, error dataset that extends onto several volumes. Always
messages, handling codes and warnings. specify a disposition of CATLG with MOD for
Q51) What is DCLGEN? cataloged datasets, even if they are already
A51) DCLGEN stands for declarations generator; it is a facility to generate DB2 sql data cataloged, so that any additional volume serial
structures in COBOL or PL/I programs. numbers will be recorded in the catalog.
Q52) How do you leave the cursor open after issuing a COMMIT? (for DB2 2.3 or above only) Q7) How is a dataset passed from one step to another?
A52) Use WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in A7) A dataset is passed from one step to another
psuedo-conversational CICS programs. based on what is coded on the DISP parameter. The
Q53) Give the COBOL definition of a VARCHAR field. dataset can only be passed to subsequent steps if
A53) A VARCHAR column REMARKS would be defined as follows: PASS was used on the disposition parameter.
... Q8) How are datasets concatenated?
10 REMARKS. 08) Datasets are concatenated by writing a normal
49 REMARKS-LEN PIC S9(4) USAGE COMP. DD statement for the first dataset and then adding a
49 REMARKS-TEXT PIC X(1920). DD statement without a DDNAME for each dataset
Q54) What is the physical storage length of each of the following DB2 data types: DATE, TIME, to be concatenated in the order they are to be read.
TIMESTAMP? The following is an example of three datasets
A54) DATE: 4bytes concatenated:
TIME: 3bytes //YEARDAT DD
TIMESTAMP: 10bytes DSN=JAN.DATA,DISP=SHR
Q55) What is the COBOL picture clause of the following DB2 data types: DATE, TIME, // DD DSN=FEB.DATA,DISP=SHR
8 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
TIMESTAMP? // DD DSN=MAR.DATA,DISP=SHR
A55) DATE: PIC X(10) Q9) What is the difference between the JOBLIB and the
TIME : PIC X(08) STEPLIB statements?
TIMESTAMP: PIC X(26) A9) The JOBLIB statement is placed after the JOB
Q56) What is the COBOL picture clause for a DB2 column defined as DECIMAL(11,2)? - GS statement and is effective for all job steps. It cannot be
A56) PIC S9(9)V99 COMP-3. placed in a
Note: In DECIMAL(11,2), 11 indicates the size of the data type and 2 indicates the precision. cataloged procedure. The STEPLIB statement is placed
Q57) What is DCLGEN ? - GS after the EXEC statement and is effective for that job step
A57) DeCLarations GENerator: used to create the host language copy books for the table only. Unlike the JOBLIB statement, the STEPLIB can be
definitions. Also creates the DECLARE table. placed in a cataloged procedure.
Q58) What are the contents of a DCLGEN? - GS Q10) Name some of the JCL statements that are
A58) EXEC SQL DECLARE TABLE statement which gives the layout of the table/view in terms not allowed in procs.?
of DB2 datatypes. A10) Some of the JCL statements which are not allowed in
A host language copy book that gives the host variable definitions for the column names. procedures are:
Q59) Is it mandatory to use DCLGEN? If not, why would you use it at all? - GS 1. JOB, Delimiter(/*), or Null
A59) It is not mandatory to use DCLGEN. Using DCLGEN, helps detect wrongly spelt column statements
names etc. during the pre-compile stage itself (because of the DECLARE TABLE ). DCLGEN 2. JOBLIB or JOBCAT DD statements
being a tool, would generate accurate host variable definitions for the table reducing chances of 3. DD * or DATA statements
error. 4. Any JES2 or JES3 control statements
Q60) Is DECLARE TABLE in DCLGEN necessary? Why it used? Q11) What is primary allocation for a dataset?
A60) It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by the A11) The space allocated when the dataset is first
pre-compiler to validate the table-name, view-name, column name etc., during pre-compile. created.
Q61) Will precompile of an DB2-COBOL program bomb, if DB2 is down? Q12) What is the difference between primary and
A61) No. Because the precompiler does not refer to the DB2 catalogue tables. secondary allocations for a dataset?
Q62) How is a typical DB2 batch program executed ? A12) Secondary allocation is done when more space
A62) There are two methods of executing a DB2-batch program is required than what has already been allocated.
1. Use DSN utility to run a DB2 batch program from native TSO. An example is shown: Q13) How many extents are possible for a
DSN SYSTEM(DSP3) sequential file ? For a VSAM file ?
RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB('EDGS01T.OBJ.LOADLIB') A13) 16 extents on a volume for a sequential file
END and 123 for a VSAM file.
2. Use IKJEFT01 utility program to run the above DSN command in a JCL. Q14) What does a disposition of
Q63) Assuming that a site's standard is that pgm name = plan name, what is the easiest way to find (NEW,CATLG,DELETE) mean? - GS
out which A14) That this is a new dataset and needs to be
programs are affected by change in a table's structure? allocated, to CATLG the dataset if the step is
A63) Query the catalogue tables SYSPLANDEP and SYSPACKDEP. successful and to delete the dataset if the step
Q64) Name some fields from SQLCA. abends.
A64) SQLCODE, SQLERRM, SQLERRD Q15) What does a disposition of
Q65) How can you quickly find out the number of rows updated after an update statement? (NEW,CATLG,KEEP) mean? - GS
A65) Check the value stored in SQLERRD(3). A15) That this is a new dataset and needs to be
Q66) What is EXPLAIN? - GS allocated, to CATLG the dataset if the step is
A66) EXPLAIN is used to display the access path as determined by the optimizer for a SQL successful and to KEEP but not CATLG the
statement. It can be used in SPUFI (for single SQL statement) or in BIND step (for embedded dataset if the step abends. Thus if the step abends,
SQL). The results of EXPLAIN is stored in U.PLAN_TABLE where U is the authorization id of the dataset would not be catalogued and we would
the user need to supply the vol. ser the next time we refer
Q67) What do you need to do before you do EXPLAIN? to it.
A67) Make sure that the PLAN_TABLE is created under the AUTHID. Q16) How do you access a file that had a
Q68) Where is the output of EXPLAIN stored? - GS disposition of KEEP? - GS
A68) In USERID.PLAN_TABLE A16) Need to supply Volume Serial Number
Q69) EXPLAIN has output with MATCHCOLS = 0. What does it mean? - GS VOL=SER=xxxx.
A69) A nonmatching index scan if ACCESSTYPE = I. Q17) MOD, DELETE; What does a disposition of
Q70) How do you do the EXPLAIN of a dynamic SQL statement? (,DELETE) mean ?
A70) There are two methods to achieve this: A17) The MOD will cause the dataset to be
1. Use SPUFI or QMF to EXPLAIN the dynamic SQL statement created (if it does not exist), and then the two
2. Include EXPLAIN command in the embedded dynamic SQL statements DELETEs will cause the dataset to be deleted
Q71) How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an whether the step abends or not. This disposition is
example with a host variable in WHERE clause) used to clear out a dataset at the beginning of a
A71) Use a question mark in place of a host variable (or an unknown value). For instance, job.
SELECT EMP_NAME FROM EMP WHERE EMP_SALARY > ? Q18) What is the DD statement for a output file?
Q72) What are the isolation levels possible ? - GS A18) Unless allocated earlier, will have the
A72) CS: Cursor Stability following parameters:
RR: Repeatable Read DISP=(NEW,CATLG,DELETE), UNIT ,
Q73) What is the difference between CS and RR isolation levels? SPACE & DCB
A73) CS: Releases the lock on a page after use Q19) What do you do if you do not want to keep
RR: Retains all locks acquired till end of transaction all the space allocated to a dataset? - GS
Q74) When do you specify the isolation level? How? A19) Specify the parameter RLSE ( release ) in
A74) During the BIND process(ISOLATION LEVEL is a parameter for the bind process). the SPACE e.g. SPACE=(CYL,(50,50),RLSE)
ISOLATION ( CS/RR )... Q20) What is DISP= (NEW,PASS,DELETE)?
Q75) I use CS and update a page. Will the lock be released after I am done with that page? A20) This is a new file and create it, if the step
A75) No. terminates normally, pass it to the subsequent
Q76) What are the various locking levels available? steps and if step abends, delete it. This dataset will
A76) PAGE, TABLE, TABLESPACE not exist beyond the JCL.
Q77) How does DB2 determine what lock-size to use? Q21) How do you create a temporary dataset?
A77) There are three methods to determine the lock-size. They are: Where will you use them?
1. Based on the lock-size given while creating the tablespace A21) Temporary datasets can be created either by
2. Programmer can direct the DB2 what lock-size to use not specifying any DSNAME or by specifying the
3. If lock-size ANY is specified, DB2 usually choses a lock-size of PAGE temporary file indicator as in DSN=&&TEMP.
Q78) What are the disadvantages of PAGE level lock? We use them to carry the output of one step to
A78) High resource utilization if large updates are to be done another step in the same job. The dataset will not
Q79) What is lock escalation? be retained once the job completes.
A79) Promoting a PAGE lock-size to table or tablespace lock-size when a transaction has aquired Q22) How do you restart a PROC from a
more locks than specified in NUMLKTS. Locks should be taken on objects in single tablespace particular step? - GS
for escalation to occur. A22) In job card, specify
Q80) What are the various locks available? RESTART=PROCSTEP.STEPNAME where
A80) SHARE, EXCLUSIVE, UPDATE PROCSTEP = name of the JCL step that invoked
Q81) Can I use LOCK TABLE on a view? the PROC and STEPNAME = name of the PROC
A81) No. To lock a view, take lock on the underlying tables. step where you want execution to start
Q82) What is ALTER ? - GS Q23) How do you skip a particular step in a
9 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A82) SQL command used to change the definition of DB2 objects. proc/JOB? - GS
Q83) What is a DBRM, PLAN ? A23) Can use either condition codes or use the jcl
A83) DBRM: Data Base Request Module, has the SQL statements extracted from the host control statement IF (only in ESA JCL)\
language program by the pre-compiler. PLAN: A result of the BIND process. It has the executable Q24) A PROC has five steps. Step 3 has a
code for the SQL statements in the DBRM. condition code. How can you override/nullify this
Q84) What is ACQUIRE/RELEASE in BIND? condition code? - GS
A84) Determine the point at which DB2 acquires or releases locks against table and tablespaces, A24) Provide the override on the EXEC stmt in
including intent locks. the JCL as follows:
Q85) What else is there in the PLAN apart from the access path? - GS //STEP001 EXEC procname,
A85) PLAN has the executable code for the SQL statements in the host program COND.stepname=value
Q86) What happens to the PLAN if index used by it is dropped? All parameters on an EXEC stmt in the proc such as
A86) Plan is marked as invalid. The next time the plan is accessed, it is rebound. COND, PARM have to be overridden like this.
Q87) What are PACKAGES ? - GS Q25) How do you override a specific
A87) They contain executable code for SQL statements for one DBRM. DDNAME/SYSIN in PROC from a JCL?
Q88) What are the advantages of using a PACKAGE? A25) //<STEPNAME.DD> DSN=...
A88) The advantages of using PACKAGE are: Q26) What is NOTCAT 2 - GS
1. Avoid having to bind a large number of DBRM members into a plan A26) This is an MVS message indicating that a
2. Avoid cost of a large bind duplicate catalog entry exists. E.g., if you already
3. Avoid the entire transaction being unavailable during bind and automatic rebind of a plan have a dataset with dsn = 'xxxx.yyyy' and u try to
4. Minimize fallback complexities if changes result in an error. create one with disp new, catlg, you would get this
Q89) What is a collection? error. the program open and write would go
A89) A user defined name that is the anchor for packages. It has not physical existence. Main through and at the end of the step the system
usage is to group packages. would try to put it in the system catalog. at this
Q90) In SPUFI suppose you want to select maximum of 1000 rows, but the select returns only 200 point since an entry already exists the catlg would
rows. What are the 2 SQLCODEs that are returned? - GS fail and give this message. you can fix the problem
A90) +100 (for successful completion of the query), 0 (for successful COMMIT if by deleting/uncataloging the first data set and going
AUTOCOMMIT is set to Yes). to the volume where the new dataset exists(this
Q91) How would you print the output of an SQL statement from SPUFI? - GS info is in the msglog of the job) and cataloging it.
A91) Print the output dataset. Q27) What is 'S0C7' abend? - GS
Q92) Lot of updates have been done on a table due to which indexes have gone haywire. What do A27) Caused by invalid data in a numeric field.
you do? Q28) What is a S0C4 error ? - GS
A92) Looks like index page split has occurred. DO a REORG of the indexes. A28) Storage violation error - can be due to
Q93) What is dynamic SQL? - GS various reasons. e.g.: READING a file that is not
A93) Dynamic SQL is a SQL statement created at program execution time. open, invalid address referenced due to subscript
Q94) When is the access path determined for dynamic SQL? - GS error.
A94) At run time, when the PREPARE statement is issued. Q29) What are SD37, SB37, SE37 abends?
Q95) Suppose I have a program which uses a dynamic SQL and it has been performing well till now. A29) All indicate dataset out of space. SD37 - no
Off late, I find that the performance has deteriorated. What happened? - GS secondary allocation was specified. SB37 - end of
A95) There may be one of the following reasons: vol. and no further volumes specified. SE37 -
Probably RUN STATS is not done and the program is using a wrong index due to incorrect stats. Max. of 16 extents already allocated.
Probably RUNSTATS is done and optimizer has chosen a wrong access path based on the latest Q30) What is S322 abend ?
statistics. A30) Indicates a time out abend. Your program
Q96) How does DB2 store NULL physically? has taken more CPU time than the default limit for
A96) As an extra-byte prefix to the column value. Physically, the null prefix is Hex '00' if the the job class. Could indicate an infinite loop.
value is present and Hex 'FF' if it is not. Q31) Why do you want to specify the REGION
Q97) How do you retrieve the data from a nullable column? - GS parameter in a JCL step? - GS
A97) Use null indicators. Syntax ... INTO :HOSTVAR:NULLIND A31) To override the REGION defined at the JOB
Q98) What is the picture clause of the null indicator variable? - GS card level. REGION specifies the max region size.
A98) S9(4) COMP. REGION=0K or 0M or omitting REGION means
Q99) What does it mean if the null indicator has -1, 0, -2? - GS no limit will be applied.
A99) -1 : the field is null; 0 : the field is not null; -2 : the field value is truncated Q32) What does the TIME parameter signify ?
Q100) How do you insert a record with a nullable column? What does TIME=1440 mean ?
A100) To insert a NULL, move -1 to the null indicator, To insert a valid value, move 0 to the null A32) TIME parameter can be used to overcome
indicator S322 abends for programs that genuinely need
Q101) What is RUNSTATS? - GS more CPU time. TIME=1440 means no CPU time
A101) A DB2 utility used to collect statistics about the data values in tables which can be used by limit is to be applied to this step.
the optimizer to decide the access path. It also collects statistics used for space management. Q33) What is COND=EVEN ?
These statistics are stored in DB2 catalog tables. A33) Means execute this step even if any of the
Q102) When will you chose to run RUNSTATS? previous steps, terminated abnormally.
A102) After a load, or after mass updates, inserts, deletes, or after REORG. Q34) What is COND=ONLY ?
Q103) Give some example of statistics collected during RUNSTATS? A34) Means execute this step only if any of the
A103) Number of rows in the table, Percent of rows in clustering sequence, Number of distinct previous steps, terminated abnormally.
values of indexed column, Number of rows moved to a nearby/fairway page due to row length Q35) How do you check the syntax of a JCL
increase without running it?
Q104) What is REORG? When is it used? A35) TYPERUN=SCAN on the JOB card or use
A104) REORG reorganizes data on physical storage to reclutser rows, positioning overflowed JSCAN.
rows in their proper sequence, to reclaim space, to restore free space. It is used after heavy Q36) What does IEBGENER do?
updates, inserts and delete activity and after segments of a segmented tablespace have become A36) Used to copy one QSAM file to another.
fragmented. Source dataset should be described using SYSUT1
Q105) What is IMAGECOPY ? - GS ddname. Destination dataset should be described
A105) It is full backup of a DB2 table which can be used in recovery. using SYSUT2. IEBGENR can also do some
Q106) When do you use the IMAGECOPY? - GS reformatting of data by supplying control cards via
A106) To take routine backup of tables, After a LOAD with LOG NO and After REORG with SYSIN.
LOG NO Q37) How do you send the output of a COBOL
Q107) What is COPY PENDING status? program to a member of a PDS?
A107) A state in which, an image copy on a table needs to be taken, In this status, the table is A37) Code the DSN as PDS (member) with a
available only for queries. You cannot update this table. To remove the COPY PENDING status, DISP = SHR. The DISP applies to the PDS and
you take an image copy or use REPAIR utility. not to a specific member.
Q108) What is CHECK PENDING ? Q38) I have multiple jobs ( JCLs with several JOB
A108) When a table is LOADed with ENFORCE NO option, then the table is left in CHECK cards ) in a member. What happens if I submit it?
PENDING status. It means that the LOAD utility did not perform constraint checking. A38) Multiple jobs are submitted (as many jobs as
Q109) What is QUIESCE? the number of JOB cards).
A109) A QUIESCE flushes all DB2 buffers on to the disk. This gives a correct snapshot of the Q39) I have a COBOL program that Accepts
database and should be used before and after any IMAGECOPY to maintain consistency. some input data. How do you code the JCL
Q110) What is a clustering index ? - GS statement for this?
A110) Causes the data rows to be stored in the order specified in the index. A mandatory index ( How do you code instream data in a JCL? )
defined on a partitioned table space. A39) //SYSIN DD*
10 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Q111) How many clustering indexes can be defined for a table? input data
A111) Only one. input data
Q112) What is the difference between primary key & unique index ? /*
A112) Primary Key: a relational database constraint. Primary key consists of one or more Q40) Can you code instream data in a PROC ?
columns that uniquely identify a row in the table. For a normalized relation, there is one A40) No.
designated primary key. Q41) How do you overcome this limitation ?
Unique index: a physical object that stores only unique values. There can be one or more unique A41) One way is to code SYSIN DD DUMMY in
indexes on a table. the PROC, and then override this from the JCL
Q113) What is sqlcode -922 ? with instream data.
A113) Authorization failure Q42) How do you run a COBOL batch program
Q114) What is sqlcode -811? from a JCL? How do you run a COBOL/DB2
A114) SELECT statement has resulted in retrieval of more than one row. program?
Q115) What does the sqlcode of -818 pertain to? - GS A42) To run a non DB2 program,
A115) This is generated when the consistency tokens in the DBRM and the load module are //STEP001 EXEC PGM=MYPROG
different. To run a DB2 program,
Q116) Are views updatable ? //STEP001 EXEC PGM=IKJEFT01
A116) Not all of them. Some views are updatable e.g. single table view with all the fields or //SYSTSIN DD *
mandatory fields. Examples of non-updatable views are views which are joins, views that contain DSN SYSTEM(....)
aggregate functions (such as MIN), and views that have GROUP BY clause. RUN PROGRAM(MYPROG)
Q117) If I have a view which is a join of two or more tables, can this view be updatable? - GS PLAN(.....) LIB(....) PARMS(...)
A117) No. /*
Q118) What are the 4 environments which can access DB2 ? Q43) What is STEPLIB, JOBLIB? What is it used
A118) TSO, CICS, IMS and BATCH for? - GS
Q119) What is an inner join, and an outer join ? A43) Specifies that the private library (or libraries)
A119) Inner Join: combine information from two or more tables by comparing all values that meet specified should be searched before the default
the search criteria in the designated column or columns of one table with all the values in system libraries in order to locate a program to be
corresponding columns of the other table or tables. This kind of join which involve a match in executed. STEPLIB applies only to the particular
both columns are called inner joins. step, JOBLIB to all steps in the job.
Outer join : Is one in which you want both matching and non matching rows to be returned. DB2 Q44) What is order of searching of the libraries in
has no specific operator for outer joins, it can be simulated by combining a join and a correlated a JCL? - GS
sub query with a UNION. A44) First any private libraries as specified in the
Q120) What is FREEPAGE and PCTFREE in TABLESPACE creation? STEPLIB or JOBLIB, then the system libraries
A120) PCTFREE: percentage of each page to be left free such as SYS1.LINKLIB. The system libraries are
FREEPAGE: Number of pages to be loaded with data between each free page specified in the link list.
Q121) What are simple, segmented and partitioned table spaces ? Q45) What happens if both JOBLIB and
A121) Simple Tablespace: Can contain one or more tables. Rows from multiple tables can be STEPLIB is specified ?
interleaved on a page A45) JOBLIB is ignored.
under the DBA’s control and maintenance Q46) When you specify mutiple datasets in a
Segmented Tablespace: Can contain one or more tables. Tablespace is divided into segments of 4 JOBLIB or STEPLIB, what factor determines the
to 64 pages in order? - GS
increments of 4 pages. Each segment is dedicated to single table. A A46) The library with the largest block size should
table can occupy be the first one.
multiple segments Q47) How to change default PROCLIB?
Partitioned Tablespace: Can contain one table. Tablespace is divided into parts and each part is A47) //ABCD JCLLIB ORDER=
put in a separate (ME.MYPROCLIB,SYS1.PROCLIB)
VSAM dataset. Q48) The disp in the JCL is MOD and the program
Q122) What is filter factor? opens the file in OUTPUT mode. What happens ?
A122) One divided by the number of distinct values of a column. The DISP in the JCL is SHR and the program opens
Q123) What is index cardinality? - GS the file in EXTEND mode. What happens ?
A123) The number of distinct values a column or columns contain. A48) Records will be written to end of file
Q124) What is a synonym ? (append) when a WRITE is done in both cases.
A124) Synonym is an alternate name for a table or view used mainly to hide the leading qualifier Q49) What are the valid DSORG values ?
of a table or view.. A synonym is accessible only by the creator. A49) PS - QSAM, PO - Partitioned, IS - ISAM
Q125) What is the difference between SYNONYM and ALIAS? Q50) What are the differences between JES2 &
A125) SYNONYM : is dropped when the table or tablespace is dropped. Synonym is available JES3 ?
only to the creator. A50) JES3 allocates datasets for all the steps
ALIAS : is retained even if table or tablespace is dropped. ALIAS can be created even if the table before the job is scheduled. In JES2, allocation of
does datasets required by a step are done only just
not exist. It is used mainly in distributed environment to hide the location before the step executes.
information from Q51) What are the causes for S0C1, S0C4, S0C5,
programs. Alias is a global object & is available to all. S0C7, S0CB abends ?
Q126) What do you mean by NOT NULL WITH DEFAULT? When will you use it? A51) S0C1-May be due to 1.Missing or misspelled
A126) This column cannot have nulls and while insertion, if no value is supplied then it will have DD name 2.Read/Write to unopened dataset
zeroes, spaces or date/time depending on whether it is numeric, character or date/time.Use it when 3.Read to dataset opened
you do not want to have nulls but at the same time cannot give values all the time you insert this output 4.Write to dataset opened input 5.Called
row. subprogram not found
Q127) What do you mean by NOT NULL? When will you use it? S0C4-may be due to 1.Missing Select
A127) The column cannot have nulls. Use it for key fields. statement(during compile) 2.Bad Subscript/index
Q128) When would you prefer to use VARCHAR? 3.Protection Exception
A128) When a column which contains long text, e.g. remarks, notes, may have in most cases less 4.Missing parameters on called subprogram
than 50% of the maximum length. 5.Read/Write to unopened file 6.Move data from/to
Q129) What are the disadvantages of using VARCHAR? unopened file
A129) Can lead to high space utilization if most of the values are close to maximum. S0C5-May be due to 1.Bad Subscript/index
Positioning of VARCHAR column has to be done carefully as it has performance implications. 2.Closing an unopened dataset 3.Bad exit from a
Relocation of rows to different pages can lead to more I/Os on retrieval. perform 4.Access to I/O
Q130) How do I create a table MANAGER (EMP-NO, MANAGER) where MANAGER is a area(FD) before read
foreign key which references to EMP-NO in the same table? Give the exact DDL. S0C7-may be due to 1.Numeric operation on
A130) First CREATE MANAGER table with EMP-NO as the primary key. Then ALTER it to non-numeric data 2.Un-initialize working-storage
define the foreign key. 3.Coding past the
Q131) When is the authorization check on DB2 objects done - at BIND time or run time? maximum allowed sub script
A131) At run time. S0CB-may be due to 1.Division by Zero
Q132) What is auditing? Q52) What are the kinds of job control
A132) Recording SQL statements that access a table. Specified at table creation time or through statements?
alter. A52) The JOB, EXEC and DD statement.
Q133) max number of columns in a db2 table Q53) What is the meaning of keyword in JCL?
A133) 224 What is its opposite?
Q134) I need to view the number of tables existing under one particular Owner. Is it possible? If A53) A keyword in a JCL statement may appear
11 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
so, pl give the SQL query for this? in different places and is recognized by its name,
A134) The query SELECT * FROM SYSIBM.SYSTABLES WHERE CREATOR = 'owner id' eg. MSGCLASS in the JOB statement. The
This displays the table names with that If you want only the number of tables give the following opposite is positional words, where their meaning
query. SELECT COUNT(*) FROM SYSIBM.SYSTABLES WHERE CREATOR = 'owner id' is based on their position in the statement, eg. in
Make sure that you are in correct subsystem. the DISP keyword the
Q135) I need to view the number of tables existing under one particular Owner. Is it possible? If =(NEW,CATLG,DELETE) meanings are based
so, pl give the SQL query for this? on first, second and third position.
A135) The query SELECT * FROM SYSTABLES WHERE OWNER= should work. Q54) Describe the JOB statement, its meaning,
Q136) I need to view the number of tables existing under one particular Owner. Is it possible? If syntax and significant keywords?
so, pl give the SQL query for this? A54) The JOB statement is the first in a JCL
A136) Db2 records information for its operation in a catalog which is actually a group of tables. stream. Its format is // jobname, keyword JOB,
So we can use the SYSTABLES to get answer to ur query. accounting information in brackets and keywords,
Q137) What is JOIN and different types of JOIN. MSGCLASS, MSGLEVEL, NOTIFIY, CLASS,
A137) The ability to join rows and combine data from two or more tables is one of the most etc.
powerful features of relational system. Three type of joins:1. Equi-join 2.Non-equijoin 3.self-join Q55) Describe the EXEC statement, its meaning,
Q138) can I alter a table (e.g. adding a column) when other user is selecting some columns or syntax and keywords?
updating some columns from the same table? A55) The EXEC statement identifies the program
A138) yes possible. until the updation or selection is committed db2 table will not be restructured. to be executed via a PGM= program name
new column definition will be there but it will not be included until all the tasks on the table are keyword. Its format is //jobname EXEC PGM=
committed. program name. The PARM= keyword can be
Q139) How many sub queries can you combine together ? used to pass external values to the executing
A139) Total 16 queries and sub queries are 15 program.
Q140) What are the different methods of accessing db2 from tso? How is the connection Q56) Describe the DD statement, its meaning,
established between TSO & DB2? syntax and keywords?
A140) There are three ways in establishing tso/db2 connection 1. SPUFI 2. QMF 3. CATALOG A56) The DD statement links the external dataset
VISIBILITY B. A thread between TSO & DB2 is established while attempting to make name (DSN) to the DDNAME coded within the
connection between tso & db2. executing program. It links the file names within
Q141) How many buffer pools are available in db2? the program code to the file names know to the
A141) Ten 32k size buffer pools and fifty 4k size buffer pools (bp0 to bp49)default buffer pools MVS operating system. The syntax is // ddname
are bp0,bp1,bp2 & bp32 DD DSN=dataset name. Other keywords after
Q142) B37 abend during SPUFI DSN are DISP, DCB, SPACE, etc.
A142) The b37 abend in the SPUFI is because of space requirements , the query has resulted in Q57) What is a PROC? What is the difference
so many rows that the SPUFI. out file is not large enough to handle it, increase the space between an instream and a catalogued PROC?
allocation of SPUFI out file. A57) PROC stands for procedure. It is 'canned'
Q143) How many Buffer pools are there in DB2 and what are they? JCL invoked by a PROC statement. An instream
A143) There are 4 Buffer pools. They are BP0,BP1,BP2 and BP32. PROC is presented within the JCL; a catalogued
Q144) What is the command used by TSO users to invoke DB2? PROC is referenced from a proclib partitioned
A144) DSN RUN dataset.
Q145) What is the error code -803 ? Q58) What is the difference between a symbolic
A145) unique index violation and an override in executing a PROC?
Q146) How do you filter out the rows retrieved from a Db2 table ? A58) A symbolic is a PROC placeholder; the value
A146) one way is to use The SQL WHERE clause. for the symbolic is supplied when the PROC is
Q147) what is a collection? invoked, eg. &symbol=value. An override replaces
A147) collection is something that every programmer should assign/Specify for every package. the PROC's statement with another one; it
this about 1-18 characters long. substitutes for the entire statement.
Q148) What is Skeleton cursor table (SKCT)? Q59) What is RESTART? How is it invoked?
A148) The Executable form of a Plan. This is stored in sysibm.sct02 table. A59) RESTART is a JOB statement keyword. It
Q149) what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current is used to restart the job at a specified step rather
SQLID register contain? than at the beginning.
A149) Pic s9(x-y)V9(Y) Comp-3; the current SQLID contains the current authorization ID. Q60) What is a GDG? How is it referenced? How
Q150) Can we declare DB2 HOST variable in COBOL COPY book? is it defined? What is a MODELDSCB?
A150) NO. If we declare DB2 host variable in COBOL COPY book, at the time of A60) GDG stands for generation data group. It is a
Pre-compilation we get the host variable not defined, because pre-compiler will not expand dataset with versions that can be referenced
COBOL COPY book. So we declare it either in DCLGEN with EXEC SQL INCLUDE absolutely or relatively. It is defined by an
DCLGEN name END-EXEC or we directly hardcode it in the working storage section. IDCAMS define generation datagroup execution.
Q151) What should be specified along with a cursor in order to continue updating process after Q61) Explain concatenating datasets?
commit? A61) Datasets can be grouped in a DD statement
A151) With Hold option. one after another, eg. in a JOBLIB statement
Q152) what is the name of the default db2 catalog database? where the load module can exist in one of many
A152) DSNDB06 datasets.
Q153) When Can you be sure that a query will return only one row? Q62) What is the difference between specifying
A153) When you use the primary key and only the primary key in the where clause. DISP=OLD and DISP=SHR for a dataset?
Q154) what is the difference between join and union? A62) DISP=OLD denotes exclusive control of the
A154) join is used to retrieve data from different tables using a single sql statement. union is used dataset; DISP=SHR means there is no exclusivity.
to combine the results of two or more sql queries. Q63) What is MOD and when would you use it?
Q155) What is a correlated sub query? A63) DISP=MOD is used when the dataset can be
A155) In a sub query, if the outer query refers back to the outcome of inner query it is called extended, ie, you can add records at the end of an
correlated sub query. That's why the outer query is evaluated first unlike an ordinary sub query existing dataset.
Q156) What are the functions of Bind? Q64) What are the keywords associated with DCB?
A156) BIND mainly performs two things syntax checking and authorization checking.It binds How can you specify DCB information? What is the
together all packages into an application plan hence the name BIND.Apart from this bind has OS precedence for obtaining that DCB information,
optimiser as a subcomponent.Its function is to determine the optimum access strategy. ie.
Q157) Max. No of rows per page where does the system look for it first?
A157) 127 A64) The keywords associated with the DCB
Q158) The only place of VSAM KSDS in DB2 is? parameter are LRECL, RECFM, BLKSIZE and
A158) BSDS is a VSAM KSDS. DSORG. The DCB information can be supplied in
Q159) Can All Users Have The Privilege To Use The SQL Statement Select * (DML)? the DD statement. The system looks for DCB
A159) No the user should be granted privilege to use it. information in the program code first.
Q160) What is the size of a data page? Q65) How do you designate a comment in JCL?
A160) 4K to 8K A65) The comment statement is //* followed by
Q161) what's the best lock size that you could use when you create a tablespace? the comments.
A161) The answer is Locksize = ANY. Unless you are Sure what's the Purpose of tablespace ie., Q66) What is the meaning of the EXEC statement
Read-only or R/W. If you use lock size =any, Db2 would automatically determine what type of keyword, COND? What is its syntax?
locks it should use. A66) COND specifies the conditions for executing
Q162) what's the error code for Unique Index Violation? the subsequent job step. The value after the
A162) -803 COND= is compared to the return codes of the
Q163) Can you define an Index if the table size less than 10 PAGES? preceding steps and if the comparison is true, the
12 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
13 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A196) An outer join includes rows from tables when there are no matching values in the tables. fields, Definitions of VSAM files....etc. You use
Q197) What is a subselect? Is it different from a nested select? control card because you cannot use a instream
A197) A subselect is a select which works in conjunction with another select. A nested select is a procedure in a procedure. Generally you will be
kind of subselect where the inner select passes to the where criteria for the outer select. calling a Proc from your Jcl and you cannot code
Q198) What is the difference between group by and order by? instream procedure in the Proc and so you will
A198) Group by controls the presentation of the rows, order by controls the presentation of the point to the dataset which is called control card.
columns for the results of the SELECT statement. Q83) How do you submit JCL via a Cobol
Q199) Explain the EXPLAIN statement? program?
A199) The explain statement provides information about the optimizer's choice of access path of A83) In your JCL define as //JOBA JOB 1111,
the sql. JOB1 //STEP01 EXEC PGM=PROG1 //ddname
Q200) What is tablespace? DD SYSOUT=(*,INTRDR)....and your
A200) Tables are stored in tablespaces (hence the name)! There are three types of tablespaces: COBOL(PROG1) should look like this SELECT
simple, segmented and partitioned. JCL-FILE ASSIGN TO ddname. Open this file
Q201) What is a cursor and what is its function? and write the JCL statements into this file. E.g.
A201) An embedded SQL statement may return a number of rows while the programming MOVE '//TESTJOB JOB 1111,VISVEISH' TO
language can only access one row at a time. The programming device called a cursor controls the JCL-REC.MOVE '//STEP01 EXEC
position of the row. PGM=IEFBR14' TO JCL- REC and close this
Q202) What is referential integrity? file. Then TESTJOB will be submitted.
A202) Referential integrity refers to the consistency that must be maintained between primary and Q84) How do you submit a JCL under CICS
foreign keys, i.e. every foreign key value must have a corresponding primary key value. environment ?
Q203) Usually, which is more important for DB2 system performance - CPU processing or I/O A84) Pass all the jcl codes to a COBOL
access? variable(should be declare using OCCURS clause)
A203) I/O operations are usually most critical for DB2 performance (or any other database for and the write the line one by one to the spool
that matter). using CICS commands like SPOOLClose
Q204) Is there any advantage to denormalizing DB2 tables? SPOOLOpen SPOOLWrite . For more help reffer
A204) Denormalizing DB2 tables reduces the need for processing intensive relational joins and CECI of CICS or CICS manual
reduces the number of foreign keys. Q85) What is the parameter to be passed in the
Q205) What is the database descriptor? job card for the unlimited time , irrespective of the
A205) The database descriptor, DBD is the DB2 component that limits access to the database job class ?
whenever objects are created, altered or dropped. A85) TIME=1440
Q206) What is lock contention? Q86) Definition of COND parameter in JCL
A206) To maintain the integrity of DB2 objects the DBD permits access to only on object at a A86) COND is a condition parameter, consists of
time. Lock contention happens if several objects are required by contending application processes 2 sub parameters, 1st - return code from the
simultaneously. previous step, 2nd - condition. If COND is true,
Q207) What is SPUFI? the step on which COND is coded will be
A207) SPUFI stands for SQL processing using file input. It is the DB2 interactive menu-driven BYPASSED.
tool used by developers to create database objects. Q87) What is meant by S0C7 system abend code?
Q208) What is the significance of DB2 free space and what parameters control it? A87) S0C7 - Data exception error - you will get it
A208) The two parameters used in the CREATE statement are the PCTFREE which specifies the whenever you are trying to move the low values
percentage of free space for each page and FREEPAGE which indicates the number of pages to or spaces into the numeric field, or compare the
be loaded with data between each free page. Free space allows room for the insertion of new numeric fields with low values, or try to do some
rows. arithmetic operations on the low values. To avoid
Q209) What is a NULL value? What are the pros and cons of using NULLS? this you have to always initialize the numeric fields
A209) A NULL value takes up one byte of storage and indicates that a value is not present as otherwise they will contain the low values.
opposed to a space or zero value. It's the DB2 equivalent of TBD on an organizational chart and Q88) How to pass the temp dataset form one JOB
often correctly portrays a business situation. Unfortunately, it requires extra coding for an step to another?
application program to handle this situation. A88) By specifying the DISP as PASS for the
Q210) What is a synonym? How is it used? temp dataset
A210) A synonym is used to reference a table or view by another name. The other name can then Q89) What is a COND parameter in JCL?
be written in the application code pointing to test tables in the development stage and to A89) COND means condition parameter. It is
production entities when the code is migrated. The synonym is linked to the AUTHID that created compared with system return code of previous
it. step.//step1 exec pgm=abcd//step2 exec pgm=xyz,
Q211) What is an alias and how does it differ from a synonym? cond=(4,lt)step2 will be executed when system
A211) An alias is an alternative to a synonym, designed for a distributed environment to avoid return code of step1 is less than 4.
having to use the location qualifier of a table or view. The alias is not dropped when the table is Q90) Write a jcl to execute a job by 7 a.m on Jan
dropped. 20,1986 ?
Q212) What is a LIKE table and how is it created? A90) THE code IS : //*MAIN DEADLINE=
A212) A LIKE table is created by using the LIKE parameter in a CREATE table statement. LIKE (0700,B,012086)
tables are typically created for a test environment from the production environment. Q91) How many types of libraries are there in
Q213) If the base table underlying a view is restructured, eg. attributes are added, does the JCL ?
application code accessing the view need to be redone? A91) Libraries are of three types.1.Sytem
A213) No. The table and its view are created anew, but the programs accessing the view do not Libraries: SUCH AS SYS1.LINKLIB2.Private
need to be changed if the view and attributes accessed remain the same. Libraries: SPECIFIED IN A JOBLIB OR
Q214) Under what circumstances will DB2 allow an SQL statement to update more than one STEPLIB DD STATEMENTS.3.Temporary
primary key value at a time? Libraries: CREATED IN A PREVIOUS STEP OF
A214) Never. Such processing could produce duplicate values violating entity integrity. Primary THE JOB.
keys must be updated one at a time. Q92) What u mean by include statement in JCL ?
Q215) What is the cascade rule and how does it relate to deletions made with a subselect? A92) An include statement identifies a member of
A215) The cascade rule will not allow deletions based on a subselect that references the same a pds or pdse that contains. This set of JCL
table from which the deletions are being made. statements is called an include group. The system
Q216) What is the self-referencing constraint? replaces the include statement with the statements
A216) The self-referencing constraint limits in a single table the changes to a primary key that the in the include group.
related foreign key defines. The foreign key in a self referencing table must specify the DELETE Q93) The maximum number of in-stream
CASCADE rule. procedure you can code in any JCL is ?
Q217) What are delete-connected tables? A93) Fifteen(15).
A217) Tables related with a foreign key are called delete-connected because a deletion in the Q94) What you mean by skeleton JCl?
primary key table can affect the contents of the foreign key table. A94) Jcl which changes during run time i.e. the
Q218) When can an insert of a new primary key value threaten referential integrity? values for the jcl such as pgm name , dd name will
A218) Never. New primary key values are not a problem. However, the values of foreign key change .ie same jcl can be used for various job,
inserts must have corresponding primary key values in their related tables. And updates of primary equivalent to dynamic sql...
key values may require changes in foreign key values to maintain referential integrity. Q95) How do you submit a JCL under CICS
Q219) In terms of DB2 indexing, what is the root page? environment ?
A219) The simplest DB2 index is the B-tree and the B-tree's top page is called the root page. The A95) Edit the JCL in Extra partition TDQ and
root page entries represent the upper range limits of the index and are referenced first in a search. submit the same using some system command
Q220) How does DB2 use multiple table indexes? (not sure) under CICS subsystem. This is what i
A220) DB2 use the multiple indexes to satisfy multiple predicates in a SELECT statement that are think, please clarify....
joined by an AND or OR. Q96) What is JCL ?
14 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Q221) What are some characteristics of columns that benefit from indexes? A96) JCL is Job Control Language and is used for
A221) Primary key and foreign key columns; columns that have unique values; columns that have Batch processing. The startup procedures of OS
aggregates computed frequently and columns used to test the existence of a value. and standard products like CICS etc are written in
Q222) What is a composite index and how does it differ from a multiple index? JCL. It is interface between operating
A222) A multiple index is not one index but two indexes for two different columns of a table. A system(MVS) & application program. when 2
composite index is one index made up of combined values from two columns in a table. If two related programs are combined together on control
columns in a table will often be accessed together a composite index will be efficient. statements is called job control language
Q223) What is meant by index cardinality? Q97) What is the max blocksize for a Tape file?
A223) The number of distinct values for a column is called index cardinality. DB2's RUNSTATS A97) It is 32,760.Based on that we can calculate
utility analyzes column value redundancy to determine whether to use a tablespace or index scan efficient number of Records in a Block
to search for data. Q98) What are the basic JCL Statements for a
Q224) What is a clustered index? Job?
A224) For a clustered index DB2 maintains rows in the same sequence as the columns in the A98) JOB : Identifies a job and supplies
index for as long as there is free space. DB2 can then process that table in that order efficiently. accounting info
Q225) What keyword does an SQL SELECT statement use for a string search? EXEC : Identifies a job step by indicating the name
A225) The LIKE keyword allows for string searches. The % sign is used as a wildcard. of the program to be executed.
Q226) What are some SQL aggregates and other built-in functions? DD : Identifies a data set to be allocated for the job
A226) The common aggregate, built-in functions are AVG, SUM, MIN, MAX, COUNT and step
DISTINCT. Delimiter(/*) : Marks the end of an in-stream dataset
Q227) How is the SUBSTR keyword used in sql? Null(//) : Marks the end of a job
A227) SUBSTR is used for string manipulation with column name, first position and string length Comments(//*) : Provides Comments
used as arguments. E.g. SUBSTR (NAME, 1 3) refers to the first three characters in the column PROC : Marks the beginning of a procedure
NAME. PEND : Marks the end of a procedure
Q228) What are the three DB2 date and time data types and their associated functions? OUTPUT : Supplies options for SYSOUT
A228) The three data types are DATE, TIME and TIMESTAMP. CHAR can be used to specify processing.
the format of each type. The DAYS function calculates the number of days between two dates. Q99) What does the statements: typrun=scan and
(It's Y2K compliant). typrun=hold do in a JCL statement
Q229) Explain transactions, commits and rollbacks in DB2. A99) typrun=scan checks the JCL for errors,
A229) In DB2 a transaction typically requires a series of updates, insertions and deletions that typrun=hold holds the job until further notice.
represent a logical unit of work. A transaction puts an implicit lock on the DB2 data. Programmers Q100) Which is the most widely used batch
can use the COMMIT WORK statement to terminate the transaction creating smaller units for performance monitor for DB2?
recovery. If the transaction fails DB2 uses the log to roll back values to the start of the transaction A100) DB2PM
or to the preceding commit point. Q101) What is QSAM error usually when it is
Q230) What is deadlock? occurs?
A230) Deadlock occurs when transactions executing at the same time lock each other out of data A101) Usually it is occurs at the time of job
that they need to complete their logical units of work. submission.
Q231) What are the four lockable units for DB2? Q102) What is the purpose of include statement in
A231) DB2 imposes locks of four differing sizes: pages, tables, tablespace and for indexes a JCL?
subpage. A102) It is used as an alternative for STEPLIB.
Q232) What are the three lock types? When we specify the dataset name in include ,it
A232) The three types are shared, update and exclusive. Shared locks allow two or more will search in all the datasets specified in the
programs to read simultaneously but not change the locked space. An exclusive lock bars all other include dataset.
users from accessing the space. An update lock is less restrictive; it allows other transactions to Q103) What does S0C4 error mean?
read or acquire shared locks on the space. A103) This error is faced when we execute the
Q233) What is isolation level? COBOL program. The main reason for this error
A233) SQL statements may return any number of rows, but most host languages deal with one is that a variable is defined with less characters
row at a time by declaring a cursor that presents each row at a unique isolation level. and we are trying to move data which is larger
Q234) What is an intent lock? than the actual storage space.
A234) An intent lock is at the table level for a segmented tablespace or at the tablespace level for a Q104) In which table PLAN is registered in ?
non-segmented tablespace. They indicate at the table or tablespace level the kinds of locks at A104) RCT
lower levels. Q105) What is GDG?
Q235) What is the difference between static and dynamic SQL? A105) GDG - group of dataset that are logically or
A235) Static SQL is hard-coded in a program when the programmer knows the statements to be chronologically related, referred by name and a
executed. For dynamic sql the program must dynamically allocate memory to receive the query relative generation number - an integer which
results. identifies the generation of a dataset and is coded
Q236) What is cursor stability? in parentheses after dataset name. Absolute GDG
A236) Cursor stability means that DB2 takes a lock on the page the cursor is accessing and name - GxxxxVyy, where xxxx-absolute gen.
releases the lock when the cursor moves to another page. number, yy-version number. Can be sequential,
Q237) What is the significance of the CURSOR WITH HOLD clause in a cursor declaration? direct, partitioned. (VSAM - no). Must always be
A237) The clause avoids closing the cursor and repositioning it to the last row processed when the cataloged. Advantage - all datasets have the same
cursor is reopened. name and system keeps track of adding new and
Q238) What is the SQL Communications Area and what are some of its key fields? retaining previous generations and deleting oldest
A238) It is a data structure that must be included in any host-language program using SQL. It is successive generation. To create a GDG we create
used to pass feedback about the SQL operations to the program. Fields are return codes, error a GDG index in the system catalog with IDCAMS
messages, handling codes and warnings. utility and then a model (prototype, DSCB) on the
Q239) What is the purpose of the WHENEVER statement? same volume to supply DCB information. Empty -
A239) The WHENEVER statement is coded once in the host program to control program actions when limit is reached all members are removed
depending on the SQL-CODE returned by each sql statement within the program. from the index, otherwise-only oldest. Scratch-
Q240) What is the FREE command? removed members are uncataloged & deleted,
A240) The FREE command can be used to delete plans and/or packages no longer needed. otherwise - removed & uncataloged, but remain in
Q241) DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. the system (not members of GDG any more).
Explain the differences? GDG number is updated at the end of the job. If
A241) A merge join requires that the tables being joined be in a sequence; the rows are retrieved number is not specified all generations will be
with a high cluster ratio index or are sorted by DB2. A nested join does not require a sequence processed from the beginning
and works best on joining a small number of rows. DB2 reads the outer table values and each Q106) what do you mean By spooling? Expand
time scans the inner table for matches. The hybrid join is a nested join that requires the outer table SPOOL?
be in sequence. A106) This is managed by JES. This is used for
Q242) Compare a subselect to a join? Queuing the Outputs that are intended for Printing
A242) Any subselect can be rewritten as a join, but not vice versa. Joins are usually more efficient and are first stored in SPOOLDASD. This can be
as join rows can be returned immediately, subselects require a temporary work area for inner managed Using
selects results while processing the outer select. Q107) For how long a job can be executed
Q243) What is the difference between IN subselects and EXISTS subselect? continuously in a mainframe ?
A243) If there is an index on the attributes tested an IN is more efficient since DB2 uses the index A107) 248 DAYS
for the IN. (IN for index is the mnemonic). Q108) Max. No of DD statements in a job ?
Q244) What is a Cartesian product? A108) 3273
A244) A Cartesian product results from a faulty query. It is a row in the results for every Q109) How much space OS allocates when you
combination in the join tables. create a PS or PDS?
15 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Q245) DB2 What is the difference between a package and a plan? How does one bind 2 versions A109) 56 KB
of a CICS transaction with the same module name in two different CICS regions that share the Q110) Min no of member’s (PDS) in one
same DB2 subsystem? directory block?
A245) Package and plan are usually used synonymously, as in this site. Both contain optimized A110) SIX(6)
code for SQL statements - a package for a single program, module or subroutine contained in the Q111) The maximum number of steps in a job?
database request module (DBRM) library. A plan may contain multiple packages and pointers to A111) 255
packages. The one CICS module would then exist in a package that could be referenced in two Q112) How much is memory space involved,
different plans. when we code BLOCKSIZE,TRK & CYL ?
Q246) What is an asychronous write? A112) One block constitutes 32KB of formatted
A246) It is a write to disk that may occur before or long after a commit. The write is controlled by memory/ 42KB of Unformatted memory,6 blocks
the buffer manager. makes one Track & 15 Tracks makes one
Q247) What is a lock? cylinder.
A247) A lock is the mechanism that controls access to data pages and tablespaces. Q113) What is DSNDB06 ?
Q248) What is meant by isolation level? A113) This is the Place where DB2 Catalog
A248) This is a key concept for any relational database. Isolation level is the manner in which resides
locks are applied and released during a transaction. For DB@ a 'repeatable read' holds all locks Q114) What is the use of DSNDB07 ?
untile the transaction completes or a syncpoint is issued. For transactions using 'cursor stability' A114) This is the area where sorting takes place in
the page lock releases are issued as the cursor 'moves', i.e. as the transaction releases DB2
addressability to the records. Q115) What is DATACOM db?
Q249) What are leaf pages? A115) It is a database used with VSE.
A249) They are the opposite of root pages. Leaf pages are the lowest level index pages - the pages Q116) What is a Dummy Utility and what it does
that contain index entries and information to the corresponding table rows. ?
Q250) What is a precompiler? A116) IEFBR14 is a Dummy utility and it is used
A250) It is a DB2 facility for static SQL statements - it replaces these statements with calls to the for the sake of EXEC PGM= .... statement in
DB2 language interface module. JCL[when used it wouldn't perform any task]. e.g.
Q251) What is a root page? While Allocating a dataset you don't have to run
A251) The opposite of a leaf page; it is the highest level index page. An index can contain only the any utility [this could be done by giving disp=new
one root page; all other index pages are associated to the root. inDD statement]. But for a PGM name must be
Q252) What is a thread? given in EXEC statement, it is used.
A252) A thread is the connection between DB2 and some other subsystem, such as CICS or Q117) What 3 guidelines do we have to follow
IMS/DC. when concatenating DD statements?
Q253) Which transaction use a command thread ? A117) Datasets must be of the same type (disk or
A253) Only the DSNC transaction uses a command thread. tape), All datasets must have the same logical
Q254) What is the purpose of the DSNC transaction ? record length, The dataset with the largest
A254) The DSNC transaction is used for controlling the CICS Call Attach Facility(CAF) and for blocksize must be listed first.
Displaying CAF statistics. Q118) On the DD statement, what is the main
DB2 Utilities difference between creating a new sequential flat
Q255) What does the CHECK Utility do ? file and a partitioned dataset?
A255) The CHECK Utility checks the referential integrity of table relations and checks the A118) SPACE=(n,m) for a sequential file,
integrity of the indexes by matching index column values to table column values. SPACE=(n,m,p) for a PDS where n, m, and p are
Q256) what types of copies can be made with the COPY Utility ? numbers. The p designates how many directory
A256) The copy Utility can make a full image copy or an incremental image copy . blocks to allocate.
Q257) Why might full image copies be faster to implement than an incremental image copy? Q119) What is the difference between
A257) Because an incremental image copy has to search for changed data and cannot make use of IEBGENER, IEBCOPY and REPRO in IDCAMS
sequential pre fetch. Conversely, a full image copy has no checking to do as it takes advantage of utility?
sequential pre fetch. A119) IEBGENER -- This is a dataset utility for
Q258) How could one combine a set of incremental image copies into a single copy? copying sequential datasets which produces a PDS
A258) By using the MERGECOPY Utility. or a member from a
Q259) What is the purpose of the QUIESE Utility? sequential dataset.
A259) The QUIESE Utility prevents the start of any new table space activity while it gives active IEBCOPY -- This is a dataset utility for copying
threads a chance to finish their tasks. Once all thread are inactive, it records information to one PDS to another or to merge PDSs.
establish a point of consistency for future recovery. REPRO -- This is for copying sequential datasets.
Q260) What does the REORG Utility do? More or less same as the IEBGENER.
A260) The REORG Utility will sort the index space and table space to conform with the primary Q120) How do you submit JCL via a Cobol
index or clustering index specified in the DDL. It will also reclaim the space from dropped simple program?
table spaces. A120) Use a file //dd1 DD sysout=(*,intrdr)write
Q261) What can the SET option of the Repair Utility accomplish? your JCL to this file. Pl some one try this out.
A261) The set option of the Repair utility can reset a copy pending, check pending, and recover Q121) How to execute a set of JCL statements
pending flags. from a COBOL program ?
Q262) What can the Locate option of the Repair Utility accomplish? A121) Using EXEC CICS SPOOL
A262) The Locate option of the Repair Utility can delete a row from a table space, repair broken WRITE(var-name) END-EXEC command.
table space pages, and replace data as specific locations in a table space or index. var-name is a COBOL host structure containing
Q263) What does the RUNSTATS Utility do? JCL statements.
A263) The RUNSTATS Utility collects statistical information for DB2 table spaces, partitions, Q122) What is the difference between static call &
indexes, tables and columns and stores this data in the DB2 Catalog. Dynamic call ?
Q264) Why use RUNSTAT Utility? A122) In the case of Static call, the called program
A264) Because the DB2 Optimizer need accurate data in order to formulate the most efficient is a stand along program, it is an executable
access path given the state of the environment and because the information will help the DBA to program . During run time we can call it in our
monitor the condition of the object in the DB2 subsystem. called program. As about Dynamic call, the called
Q265) What statistic will tell the DBA how must space can be reclaimed from dropped table program is not an executable program it can
spaces on the next reorg run? executed thru the called program
A265) The DBA can see this in the PERCDROP column of the SYSIBM.SYSTABLEPART Q123) What is the difference between catalogue
catalog table. procedure and In-Stream procedure?
Q266) What DB2 Catalog column tell you when an index needs table reorganized ? A123) In Stream procedures are set of JCL
A266) The FAROFFPOS column of the SYSIBM.SYSINDEXPART table. statements written between JOB and EXEC
Q267) What is the STOSPACE Utility used for? statements, start with PROC and end with PEND
A267) The STOSPACE Utility updates the DB2 catalog with the DASD utilization of the table statement. Mainly used to test cataloged
space and index space data sets. procedures. Cataloged procedure is cataloged on
Q268) What is a SELECT statement? the procedure library and is called by specifying
A268) A select statement is an SQL statement that retrieves data from a table or view. the procedure name on the EXEC statement.
Q269) What is the syntax of SELECT statement when embedded in a COBOL program? Q124) What do you feel makes a good program?
A269) Exec SQL A124) A program that follows a top down
SELECT col_name1,col_name2,col_name3 approach. It is also one that other programmers or
INTO hos:_var1,hos_var2,hos_var3 users can follow logically and is easy to read and
FROM owner.tablename understand.
WHERE condition Q125) Can we browse or edit the GDG dataset if
END_EXEC. it is a tape entry?
16 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Q270) What are column-name qualifiers used? A125) No, You can’t edit or browse the GDG if it
A270) Column-name qualifier are used as table designator to avoid ambiguity when the column resides on tape.
names referenced exist in more than one table used in the SQL statement. Column-name qualifiers Q126) What are the maximum and minimum sizes
are used in correlated references. of any CONTROL AREA (VSAM datasets) ?
Q271) What is correlation names? A126) Minimum Size : 1 track Maximum size : 1
A271) IT is a special type of column designator that connects specific column in the various levels cylinder
of a multilevel SQL query. Q127) How to get cursor position from system in
Q272) How do you define a correlated name? CICS environment ?
A272) A correlated name can be defined in the FROM clause of a query and in the first clause of A127) Get it from EIBCURPOS !
an UPDATE or DELETE statement. Q128) How many parameters are there to a DISP
Q273) What is subquery ? statement and what are their uses ?
A273) A subquery is a query that is written as part of another query’s WHERE clause. For A128) There are three(3) parameters. Parameter
example : 1: current data set disposition(new, shr, old, mod)
SELECT col_name1,col_name2 Parameter 2: normal close action for data set
FROM table_A (catlg, keep, delete) Parameter 3:abend action for
WHERE col_name3 < ( SELECT Avg(col_name) data set (catlg, keep, delete).
FROM table_A Q129) What is the error code SOC01 indicate ?
WHERE col_name4 = ‘constant’ ) A129) Operation exception error For e.g. a dataset
Q274) What is correlated subquery? open error
A274) A correlated subquery is one that has a correlation name as a table or view designator in the Q130) What is a procedure?
FROM clause of the outer query and the same correlation name as a qualifier of a search A130) A set of precoded JCL that can be modified
condition in the WHERE clause of the subquery. For example: through the use of parameters or override cards.
SELECT col_name1,col_name2 Note: Procedures can be catalogued or instream.
FROM table_A x1 Q131) What is the difference between specifying
WHERE col_name3 < DISP=OLD and DISP=SHR for a dataset?
( SELECT Avg(column_name3 A131) OLD specifies exclusive use of a dataset,
FROM table_A SHR allows multiple jobs to concurrently access
WHERE col_name4 = x1.col_name4 ) the dataset Note: When updating a dataset, you
Q275) How does the processing of a correlated subquery differ from a non correlated subquery? would normally use OLD.
A275) The subquery in a correlated subquery is reevaluated for every row of the table or view Q132) What are the three basic types of
named in the outer query, while the subquery of a non correlated subquery is evaluated only once. statements in a jobstream?
Q276) What is a result table? A132) JOB(one per jobstream)EXEC(one or more
A276) A result table is the product of a query against one or more tables or views ( i.e. it is the per job)DD(one or more per jobstep)
place that holds the results of a query).
Q133) What does SYSIN * indicate?
Q277) What is a cursor?
A277) A cursor is a named control structure used to make a set of rows available to a program.
A133) Instream data follows this card and is
Q278) What is the syntax required for the creation of a cursor?
terminated when followed by a card containing //
A278) EXEC SQL
or /* in columns 1 and 2.
DECLARE cur_name CURSOR for
Q134) What are three major types of JCL
SELECT col1,col2
statements? What are their functions?
FROM table1
A134) JOB - indicates start of jobstream to the
WHERE col1 = search_condition
operating system and through parms coded on it,
END-EXEC.
certain details about the
Q279) When is the results table for the query in a DECLARE CURSOR statement created?
job (time, region, message level, job
A279) The results table for a query specified in a DECLARE CURSOR statement of a cursor is
accounting data).
created during the execution of the OPEN CURSOR statement.
EXEC - indicates the start of execution of a
Q280) What is read-only cursor?
particular job step, be that step a program or a
A280) A read-only cursor is one in which the result table was created by a query containing one of
proc.
the following :
DD - is a data definition, which is used to describe
·a DISTINCT keyword
the attributes of a data set (name, unit, type,
·a UNION operator
space,
·a column or scalar function
disposition).
·a GROUP BY clause
1. Distinguish between positional & keyword parameters
·a ORDER BY clause 2. How can you omit positional parameters ?
·a HAVING clause 3. How do u define the identifier field for a delimiter
·a read-only view in the FROM clause statement ?
·a FROM clause identifying more than one table or view 4. List some valid operation codes .
DB2 Catalog 5. What is the purpose of the MSGLEVEL parameter ?
Q281) Which DB2 catalog tables are used to produce a list of table column by table for all tables 6. What is the function of the following parameters :
in a database? I) MSGLEVEL=(0,0)
A281) The catalog tables to use are the SYSIBM.SYSTABLES and the ii) MSGLEVEL=(2,1)
SYSIBM.SYSCOLUMNS. iii) MSGLEVEL=(1,1)
Q282) Which catalog tables contain authorization information? 7. What is the purpose of the MSGCLASS parameter ?
A282) The SYSIBM table that contain authorization information are SYSCOLAUTH, 8. What are the parameters used with COND ?
SYSDBAUTH, SYSPLANAUTH, SYSTABAUTH and SYSUSERAUTH. 9. List down the different types of comparison operators &
Q283) Which catalog table stores referential constraints? their meaning .
A283) The SYSIBM.SYSRELS table. 10.What is the function of the TYPRUN parameter ?
DB2 Directory 11.What are the subparameters that can be used with
Q284) What Utility is used to migrate DB2 from one release to the next? TYPRUN?
A284) The DUMPCAT Utility. 12.What is the function of the TIME parameter?
Q285) How would one remove old reorg information from the DB2 catalog? 13. What is the purpose of the EXEC statement ?
A285) Run the MODIFY RECOVERY Utility. 14. What are the additional keyword parameters used on the
Q286) What happens to a tablespace when its recovery infromation has been removed and a full EXEC statement?
recovery is no longer possible? 15. What is the difference between the following statements
A286) The tablespace is put into copy pending status. :
Q287) Where is the access path logic created by the DB2 Optimizer stored? I) step#1 exec PGM=accpay
A287) The access path logic is stored as skeleton cursor tables in the SCT02 Directory table. ii) step#1 exec tbalance
Q288) When is the skeleton cursor table created? 16. What is the error in the following JCL statements :
A288) During the execution of the BIND PLAN command. I) //step#three exec pgm=hkbc762
Q289) How does one remove entries from the SCT02 table? ii) //step#3 exec pgm = hkbc762
A289) Run the FREE PLAN command. iii) //step#3 exec pgr = hkbc672
Q290) When one binds a PACKAGE ( of a plan ) what package information is stored and where 17. Name the system library from which modules are
it is stored? retrieved at execution time .
A290) The access path information for the PACKAGE is stored as skeleton package tables in the 18. What is the purpose of the JOBLIB statement ?
SPT01 table. 19. If JOBLIB & STEPLIB statements are both included in
Q291) Where besides the DB2 catalog is database object information stored by DB2? a job , then which statement would overide .
A291) DB2 also stores information about DB2 objects as database descriptors (DBDs) in the
17 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
DBD Directory table. 20. What is the purpose of the PARM parameter ?
Q292) Can you access the DB2 Directory table using SQL? 21. What is the pupose of the DD statement ?
A292) No. These tables are exclusively accessed by internal DB2 processes. 22. How would u specify the device for a dataset in a DD
DB2 Commands statement ?
Q293) Which DB2 command is used to retrieve environmental information? 23. What is the function of the following DD statement
A293) The DISPLAY command can return the following environmental data: DATABASE info, //ddname DD *
RLIMIT info, THREAD info, TRACE info, and UTILITY info. 24. What is the purpose of the SYSOUT Parameter in the
Q294) Which command is issued to establish the Boot Strap Data Set after an I/O failure? DD statement ?
A294) The DBA would issue a RECOVER BSDS command. 25. What are the two ways of specifying Temporary Data
Q295) How is the status of a utility reset after it has been stopped by DB2 ? Sets ?
A295) By issuing the START RLIMIT command. 26. What are the advantages of coding the DISP parameter
Q296) How can one determine the status of a tablespace? with MOD rather than NEW ?
A296) By using the DISPLAY DATABASE command. 27. Explain the function of the following Statement :
The following is the checklist to complete a DB2 batch or on-line program.... //ddname DD DISP=(NEW,CATLG,DELETE)
Batch DB2 COBOL program.... 28. What is the default value of the third DISP
1. If the program is main program it should have both DBB and DPK components. subparameter ?
2. If the program is linked (called) program it should have only DPK component. But the package generated 29. What is Backward Referencing ?
should be binded in Calling program DBB component. 30. What is the purpose of Concatenating Data Sets ?
For example the DBB component looks like .... 31. What is the result of a READ operation on a Dummy
BIND PLAN(????????) - **********>>> ENTER PLAN NAME Data set ?
PKLIST(SEALAND.????????, - **********>>> ENTER MEMBER NAME 32. What are the functions of the following ddnames :
SEALAND.????????, - **********>>> (MULTIPLE MEMBERS SYSUDUMP , SYSABEND , SYSMDUMP
SEALAND.????????) - **********>>> FOR EACH PLAN) 33. What are GDGs ?
QUALIFIER(TEST) - **********>>> MUST ALWAYS BE TEST
OWNER(????) - **********>>> ENTER YOUR TSO ID
ACTION(REPLACE) -
RETAIN -
VALIDATE(BIND) -
ISOLATION(CS) -
FLAG(I) -
ACQUIRE(USE) -
RELEASE(COMMIT) -
EXPLAIN(YES)
*********************************************************************
* THIS IS A SAMPLE DBB CARD FOR DB2 PACKAGING *
* *
* IF MULTIPLE MEMBERS ARE ENTERED IN PKLIST, *
* THERE MUST BE A DPK CARD FOR EACH ONE. *
*********************************************************************
The following is the format of the DPK card....
BIND PACKAGE(SEALAND) -
MEMBER(????????) - ***********>>> ENTER MEMBER NAME
VALIDATE(BIND) -
OWNER(????) - ***********>>> ENTER YOUR TSO ID
EXPLAIN(NO) -
QUALIFIER(TEST) ***********>>> MUST ALWAYS BE TEST
***********************************************************************
* *
* THIS IS A SAMPLE DPK CARD FOR DB2 PACKAGING *
* *
* *
***********************************************************************
3. As we are all aware that RCT is a concept of CICS. So batch DB2 program will not have any RCT entry.
4. To run this DB2 program the following the is the model JCL...
//TESTXXX JOB (AAAA),'ACCOUNTS PAYABLE',CLASS=A,
// USER=XXXX,MSGCLASS=H,REGION=4096K
/*JOBPARM SYSAFF=B158
//JOBLIB DD DSN=TEST.JOBLIB,DISP=SHR
/*
//STEP010 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=DB2T.DSNEXIT,DISP=SHR
// DD DSN=DB2T.DSNLOAD,DISP=SHR
// DD DSN=TEST.JOBLIB,DISP=SHR
//INPUT1 DD DSN=XYZ.ABC.DBF,DISP=SHR
//OUTPUT1 DD DSN=XYZ.BCD.LEY,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=122,BLKSIZE=2440),UNIT=SYSDA,
// SPACE=(CYL,(10,2),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSERR DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//TESTDUMP DD SYSOUT=*
//SYSMSG DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2T)
RUN PROG(TESTPROG) PLAN(TESTPLAN)
END
//*
As shown in above JCL program IKJEFT01 is used to run DB2 program (TESTPROG in our example).
In the above JCL program name and plan names are specified in SYSTSIN dataset as in-stream data.
The following is the check list to complete CICS(on-line) DB2 program...
1. If the program is main program it should have both DBB and DPK components.
2. If the program is LINKed, XCTLed program it should have only DPK component. But the
package generated
should be binded in Calling program DBB component.
18 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
3. RCT entry has to be created if the program is main program(which consists of TRANSID). If the
program is
LINKed or XCTLed it need not have a RCT entry. RCT entry basically used to attach CICS
system to DB2
system.
4. No JCL business here because it is on-line.
5. The DBB and DPK s shown for batch program are also applicable to this.
1. What does SQLCODE +100 means
2. What does the SQLCODE +818 means
3. What are the pars of a SELECT statement
4. What is DB2 etc....,
19 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Any BLL Cell, Data type of Length Option field, HHMMSS type of data fields
A2) Any BLL Cell - S9(8) COMP
Data type of Length Option field - S9(4) COMP
HHMMSS type of data fields - S9(7) COMP3
Q3) Specify CICS transaction initiation process. (From the perspective of CICS control programs and
control tables.)
A3) TCP places data in TIOA and corresponding entry into TCT.
KCP acquires the transaction identifier from TIOA and verifies if it is present in PCT.
SCP acquires Storage in Task Control Area (TCA), in which KCP prepares control data for the task.
KCP then loads the application programs mentioned in PCT by looking for it in PPT.
If resident - real storage memory location is not present in the PPT the control is passed to PCP that
loads the application programs from the physical storage location address given in PPT. The control is
then passed to the application program (LOAD module).
Q4) List the sequence of steps used to achieve “Modification in Skip Sequential Mode.”
A4)
I. READNEXT command
II. Issue the ENDBR command
III. Issue the READ command with UDTAE option.
IV. Manipulate the record (DELETE or REWRITE command)
V. Issue START command
VI. Issue two READNEXT commands (One for dummy skip)
VII. Go to step two.
Q5) Specify the requirements for Automatic Task Initiation. (Mention the control table, it’s entries and
the corresponding Procedure division CICS command).
A5) DFHDCT TYPE=INTRA,
DESTID=MSGS,
TRANSID=MSW1,
TRIGLEV=1000
EXEC CICS WRITEQ TD
QUEUE(‘MSGS’),
FROM(DATA-AREA),
LENGTH(MSG_LEN)
END-EXEC.
Q6) What are the commands used to gain exclusive control over a resource (for Ex a Temporary
storage queue.)?
A6) EXEC CICS ENQ EXEC CICS DEQ
RESOURCE(QID) RESOURCE(QID)
END-EXEC END-EXEC
Q7) What is the EIB parameter and the CICS command used to implement Pseudo-Conversational
technique using single PCT - Single PPT entry?
A7) EIBCALEN - To check if COMMAREA has been passed in terurn command.
EXEC CICS RETURN
TRANSID(data-name)
COMMAREA(data-area)
LENGTH(data-value)
END-EXEC
Q8) Mention the 5 fields available in the symbolic map for every ‘NAMED’ field in the DFHMDI
macro? Give a brief description of these fields (Not exceeding a line).
A8) FIELD+L - Return the length of text entered (or for dymanic cursor positioing)
FIELD+F - Returns X(80) if data entered but erased.
FIELD+A - Used for attributes reading and setting
FIELD+I - Used for reading the text entered while receiving the map.
FIELD+O - Used for sending information on to the MAP.
Q9) What are the two ways of breaking a CPU bound process to allow other tasks to gain access to
CPU.
A9) EXEC CICS DELAY EXEC CICS DELAY
INTERVAL(hhmmss) TIME(hhmmss)
END-EXEC END-EXEC
POST and WAIT commands also achieve the same result.
Q10) How do you initiate another transaction? The transaction initiated should be in a position to
retrieve
information pertaining to which transaction has initiated it and from which terminal. (Code the
required CICS
commands)
A10) EXEC CICS START
INTERVAL(hhmmss)/TIME(hhmmss)
TRANSID(‘TRAN’)
TERMID(‘TRM1)
FROM(data-area)
LENGTH(data-value)
RTRANSID(EIBTRNID)
RTERMID(EIBTRMID)
END-EXEC
EXEC CICS RETRIEVE
INTO(data-area)
LENGTH(data-value)
RTRANSID(data-name)
RTERMID(data-name)
END-EXEC
Q11) Mention the option (along with argument type) used in a CICS command to retrieve the response
code after
execution of the command.
A11) RESP( S9(8) COM.)
Q12) What’s the CICS command used to access current date and time?
A12) ASKTIME.
Q13) Into what fields will the date and time values be moved after execution of the above command?
A13) EIBDATE & EIBTIME.
20 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
21 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
dataset registered in FCT as “EMPINFOR”. The map and the working storage section of the
emp-info are given for reference. If the employee id is found the information has to be sent to the
screen (Status field) with the message “Emp Id: XXX found.”. If the emp-id key is not found then
status field should array the message “Key not found.” and the ‘EMP ID” field should be set to
bright. If the Exit option is set to “Y” then the task has to terminated. Use pseudo-conversation
technique three (Single PCT and PPT).
EMP ID : XXX
DEPARTMENT : @@@@@@@@@@
SALARY : $$$$$$$
STATUS : @@@@@@@@@@@@@@@@@@@@
EXIT : X
X - Input Field
Mapname - EMPFORM
Mapsetname - EMPFORM
Label given to various ‘named’ fields on the DFHMDF macro while defining the map shown above.
EMPID, EMPNAME, EMPDESIG, DEPART, SEX, SALARY, STATUS and EXITINP.
Working-Storage Section.
01 EMP-IOAREA.
05 EMP-REC.
10 EMP-SEX PIC X.
WORKING-STORAGE SECTION.
01 STATUS.
02 NORMAL.
01 EMP-IOAREA.
05 EMP-REC.
10 EMP-SEX PIC X.
22 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
LINKAGE SECTION.
01 DFHCOMMAREA.
PROCEDURE DIVISION.
………..
IF EIBCALEN=0
MAP(‘EMPFORM’)
MAPSET(‘EMPFORM’)
ERASE
END-EXEC.
MOVE 3 TO LENGTH-OF-AREA
TRANSID(‘EMPS’)
COMMAREA(‘SEC’)
LENGTH(DATA-VALUE)
END-EXEC.
MAP(‘EMPFORM’)
MAPSET(‘EMPFORM’)
END-EXEC.
ELSE
MAP(‘EMPFORM’)
MAPSET(‘EMPFORM’)
ERASE
END-EXEC.
MOVE 3 TO LENGTH-OF-AREA
TRANSID(‘EMPS’)
23 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
COMMAREA(‘SEC’)
LENGTH(LENGTH-OF-AREA)
END-EXEC.
END-EXEC.
END-EXEC.
24 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
25 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
1. LINK: To pass control to another program at the lower level, expecting to be returned.
2. XCTL: To pass control to another program at the same level, not expecting to be returned.
3. RETURN: To return to the next higher-level program or CICS.
4. LOAD: To load a program.
5. RELEASE: To release a program.
Q56) How is addressability achieved to the data outside programs working-storage.?
A56) The Base Locator for Linkage ( BLL ) is an addressing convention used to address storage
outside the Working Storage Section of an application program. If BLL is used for the input
commands (e.g.: READ, RECEIVE), it will improve the performance, since the program would be
accessing directly the input buffer outside of the program. In order to work as intended, the program
must construct BLL based on the following convention:
1). The parameter list must be defined by means of a 01 level data definition in the Linkage
Section as the first area definition to the Linkage Section, unless a communication area is being
passed to the program, in which case DFHCOMMAREA must be defined first. The parameter
list consists of a group of the address pointers, each of which is defined as the full word binary
field ( S9(8) COMP ). This is called the BLL cells.
2). The parameter list is followed by a group of 01 level data definitions, which would be the
actual
data areas. The first address pointer of the parameter list is set up by CICS for addressing the
parameter list itself. From the second address pointer onward, there is a one-to-one
correspondence between the address pointers of the parameter list and 01 level data definitions.
3). VS COBOL II provides CICS application programs with a significant improvements in the
area of addressability through the special ADDRESS register. Therefore, if an application
program is written in VS COBOL II, the program is no longer requires building the BLL cells in
the Linkage Section.
Q57) Explain the various ways data can be passed between CICS programs.
A57) Data can be passed between CICS programs in three ways- COMMAREA, TRASIENT DATA
QUEUE &
TEMPORARY STORAGE QUEUE.
Data can be passed to a called program using the COMMAREA option of the LINK or XCTL
command in a calling program. The called program may alter the data content of COMMAREA
and the changes will be available to the calling program after the RETURN command is issued
in the called program. This implies that the called program does not have to specify the
COMMAREA option in the RETURN command.
If the COMMAREA is used in the calling program, the area must be defined in the Working
Storage Section of the program (calling), whereas, in the called program, the area must be
defined as the first area in the Linkage Section, using reserved name DFHCOMMAREA.
Q58) What is the difference between using the READ command with INTO option and SET option?
A58) When we use INTO option with the READ command the data content of the record will
be moved into the specified field defined in the Working Storage Section of the program. When
we use SET option with the READ command , CICS sets the address pointer to the address of
the record in the file input / output area within CICS, so that the application program can
directly refer to the record without moving the record content into the Working Storage area
defined in the program. Therefore, the SET option provides a better performance than the
INTO option.
Q59) Can we define an alternate index on VSAM/RRDS ?
A59) No
Q60) What is the difference between the INTO and the SET option in the EXEC CICS RECEIVE
MAP command?
A60) The INTO option moves the information in the TIOA into the reserved specified area, while
the SET option simply returns the address of the TIOA to the specified BLL cell or “address-of” a
linkage-section.
Q61) How to establish dynamic cursor position on a map? How to get the cursor position when we
receive a map?
A61) We dynamically position a cursor through an application program using a symbolic name
of the symbolic map by placing -1 into the field length field ( i.e., fieldname + L) of the field
where you wish to place the cursor. The SEND MAP command to be issued must have the
CURSOR option ( without value ). Also, the mapset must be coded with MODE = INOUT in
the DFHMSD macro. We get the cursor position when we receive a map by checking
EIBCPOSN, which is a halfword ( S9(4) COMP) binary field in EIB, and contains offset
position (relatively to zero ) of the cursor on the screen.
Q62) What is MDT?
A62) MDT ( Modified Data Tag ) is one bit of the attribute character. If it is off ( 0 ), it indicates
that this field has not been modified by the terminal operator. If it is on ( 1 ), it indicates that this
field has been modified by the operator. Only when MDT is on, will the data of the field be sent by
the terminal hardware to the host computer ( i.e., to the application program, in end ). An effective
use of MDT drastically reduces the amount of data traffic in the communication line, thereby
improving performance significantly. Therefore, BMS maps and CICS application programs should
be developed based on careful considerations for MDT.
Q63) What are the three ways available for a program to position the cursor on the screen?
A63)
I. Static positioning. Code the insert cursor (IC) in the DFHMDF BMS macro.
II. Relative positioning. Code the CURSOR option with a value relative to zero(position 1,1 is zero) .
III. Symbolic positioning. Move high values or -1 to the field length in the symbolic map(and code
CURSOR on the
SEND command).
Q64) Name three ways the Modified Data Tag can be set on?
A64) The Modified Data Tag can be set on:
1. When the user enters data into the field.
2. When the application program moves DFHBMFSE to the attribute character.
3. By defining it in the BMS macro definition.
Q65) What is a mapset?
A65) A mapset is a collection of BMS maps link-edited together.
Q66) What is the function of DFHMDF BMS macro?
A66) The DFHMDF macro defines fields, literal, and characteristics of a field.
Q67) Why is a TERM ID recommended in naming a TSQ?
A67) In order to avoid confusion and to maintain data security, a strict naming convention for
26 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
QID will be required in the installation. Moreover, for a terminal-dependent task (e.g.,
pseudo-conversational task), the terminal id should be included in QID in order to ensure the
uniqueness of TSQ to the task.
Q68) Explain the basic difference between Intra partition TDQ and Extra partition TDQ.
A68)
INTRA PARTITION TD QUEUEs It is a group of sequential records which are produced by the same and
/ or different transactions within a CICS region. These Qs are stored in only one physical file ( VSAM ) in a
CICS region, which is prepared by the system programmer. Once a record is read from a queue, the record
will be logically removed from the queue; that is the record cannot be read again. EXTRA PARTITION TD
QUEUEs It is a group of sequential records which interfaces between the transactions of the CICS region
and the systems outside of CICS region. Each of these TDQs is a separate physical file, and it may be on
the disk, tape, printer or plotter.
Q69) What are the differences between Temporary Storage Queue (TSQ) and Transient Data Queue
(TDQ).?
A69) Temporary Storage Queue names are dynamically defined in the application program, while
TDQs must first be defined in the DCT (Destination Control Table). When a TDQ contains certain
amount of records (Trigger level), a CICS transaction can be started automatically. This does not
happen when using a TSQ. TDQ(extra partition) may be used by batch application; TSQ cannot be
accessed in batch. The Transient Data Queue is actually a QSAM file. You may update an existing
item in a TSQ. A record in a TDQ cannot be updated. Records in TSQ can be read randomly. The
TDQ can be read only sequentially. Records in Temporary Storage can be read more than once,
while records stored in Temporary Data Queues cannot. With TDQs it is “one read” only.
Q70) What is the difference between getting the system time with EIBTIME and ASKTIME
command?
A70) The ASKTIME command is used to request the current date and time. Whereas, the
EIBTIME field have the value at the task initiation time.
Q71) What does the following transactions do?
A71) CEDF : CICS-supplied Execution Diagnostic Facility transaction. It provides interactive program
execution and debugging functions of a CICS programs.
CEMT : CICS-supplied Extended Master Terminal transaction. It displays or manipulates CICS
control environment interactively.
CEBR : CICS-supplied Temporary Storage Browse transaction. It displays the content of
Temporary Storage Queue ( TSQ ).
CECI : CICS-supplied Command Interpreter transaction. It verifies the syntax of a CICS command
and executes the command.
Q72) Explain floating maps with illustration.
A72) Maps which can position themselves relative to the previous maps on the screen or page are
known as
the floating maps. For this you have to use special positional operands to LINE and COLUMN
parameters of the BMS macro definition. They are SAME, NEXT. Actually this floating map
concept is there only in Full BMS where as it is not available in Min. or Standard BMS macros.
RECEIVE MAP is not recommended in the case of floating maps. Hence these maps are normally
used to send information such as selected records from a database to screen but not for data entry. A
mapset can contain more than one m ap in it, you may use all these maps to build a screen. In that
case there are two ways to send these maps on to the screen
i ) Use separate SEND MAP commands one for each map involved. or
ii) Use ACCUM operand along with SEND MAP command and while sending really on to the
screen use SEND PAGE to display them at one shot. The second one is called
cumulative mapping scheme where you also can use floating maps.
Let's take a situation where you have to build a screen like this
HEADER MAP (no. of A gr. employs)
DETAIL MAP (employee list )
TRAILER MAP (Press a key to continue...)
Under such situations whatever the detail map needed that is to be displayed again and again to
display all the information one screenful at a time. In this floating map concept helps.
Code the map like this
M1 DFHMDI ...... HEADER=YES,JUSTIFY=FIRST..................
M2 DFHMDI ...… ......................... LINE=NEXT....................
M3 DFHMDI ........TRAILER=YES,JUSTIFY=LAST...........................
Here M2 is detail map, which is coded as floating map. Procedure:
Every time using cumulative map technique send header (first) and followed by detail map next into
a page buffer once the page is full an overflow occurs by using CICS HANDLE OVERFLOW
command send first trailer map then header map ( This will do two things a) it sends previous map
on to the screen b) starts fresh page buffer ). Repeated this until no more records to be retrieved.
Here M2 is the one which holds the record values read from the file.
Q73) What is the function of the Terminal Control Table(TCT)?
A73) The TCT defines the characteristics of each terminal with which CICS can communicate.
Q74) What does it mean when EIBCALEN is equal to zeros?
A74) When the length of the communication area (EIBCALEN) is equal to zeros, it means that no
data was passed to the application.
Q75) How can the fact that EIBCALEN is equal to zeros be of use to an application programmer?
A75) When working in a pseudo-conversational mode, EIBCALEN can be checked if it is equal to
zero. A programmer can use this condition as a way of determining first time usage(of the program).
Q76) Which CICS system program is responsible for handling automatic task initialization?
A76) The Transient Data Program(TDP).
Q77) In an on-line environment, how can you prevent more than one user from accessing the same
Transient Data
Queue at the same time?
A77) By issuing an EXEC CICS ENQ against the resource. When processing is completed, a DEQ
should be executed.
Q78) When an application is invoked via the EXEC CICS START command with the from option,
how does the
application gain access to the common area?
A78) An EXEC CICS RETRIEVE command will access the common area.
Q79) The DFHCOMMAREA is used to pass information from one application to another. What are
some other ways
that this function can be accomplished?
27 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
28 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A101) In COBOL storage was accessed via BLL cells using the SET option of ADDRESS commands.
In COBOL II the
special register, ADDRESS OF lets you reference the address of any Linkage Section field.
Q102) How does COBOL II and CICS release 1.7 provide for exceptional conditions and how does
that differ from
VS COBOL and earlier CICS releases?
A102) VS COBOL used the HANDLE CONDITION command to name routines to pass program
control when exceptional
conditions were encountered. COBOL II and CICS release 1.7 introduced the RESP option on
many CICS
commands.
Q103) What is the meaning and use of the EIBAID field?
A103) EIBAID is a key field in the execute interface block; it indicates which attention key the user
pressed to initiate the
task.
Q104) How do you control cursor positioning?
A104) It's controlled by the CURSOR option of the SEND MAP command using a direct (0 through
1919) or symbolic
value.
Q105) What are attribute bytes and how and why are they modified?
A105) Attribute bytes define map field characteristics (brightness, protection, etc); they are modified
prior to issuing a
SEND MAP command, eg. from normal to intense to highlight an error field.
Q106) How do you invoke other programs? What are the pros and cons of each method?
A106) There are three ways:
1) Use a COBOL II CALL statement to invoke a subprogram. This method is transparent to
CICS, which sees
only the one load module.
2) An EXEC LINK is similar to a call; it invokes a separate CICS program and ends with a
RETURN to the
invoking program. or
3) An EXEC XCTL which transfers control to another CICS program and does not get control
back.
Q107) What is BMS?
A107) BMS is Basic Map Support; it allows you to code assembler level programs to define screens.
Q108) What is the difference between FSET and FRSET?
A108) FSET specifies that the modified data tag should be turned on before the map is sent to the
screen. FRSET turns off
the attribute byte; it's used to transmit only changed data from the terminal.
Q109) What is the difference between the enter key, the PF keys and the PA keys?
A109) The enter and PF keys transmit data from the screen; the PA keys tell CICS that a terminal
action took place, but
data is not transmitted.
Q110) Explain the difference among the EXEC LINK, EXEC XCTL and Cobol II static call
statements in CICS.
A110) COBOL II allows for static calls which are more efficient than the LINK instruction which
establishes a new run-
unit.
Q111) Are sequential files supported by CICS?
A111) Yes, but not as part of the File Control Program. They are supported as extra partition transient
data files.
Q112) What option can be coded on the RETURN command to associate a transaction identifier with
the next
terminal input?
A112) The TRANSID option.
Q113) What is an ASRA?
A113) An ASRA is the CICS interrupt code, the equivalent of an MVS abend code.
Q114) What is temporary storage?
A114) Temporary storage is either main or auxiliary storage that allows the program to save data
between task invocations.
Q115) What is transient data?
A115) Transient data provides CICS programs with a simple method for sequential processing, often
used to produce
output for 3270 printers.
Q116) What are the two types of transient data queues?
A116) They are intrapartition, which can only be accessed from within CICS and extrapartition, which
are typically used to
collect data online, but process it in a batch environment.
Q117) Where are transient data sets defined to CICS?
A117) They are defined in the destination control table (DCT).
Q118) Once a transient data queue is read, can it be reread?
A118) No, silly! That's why IBM calls it transient.
Q119) Name some commands used for CICS file browsing.
A119) STARTBR, READNEXT, READPREV, ENDBR and RESETBR.
Q120) What other file control processing commands are used for file updating?
A120) WRITE, REWRITE, DELETE and UNLOCK.
Q121) What is Journal Recovery and Dynamic Transaction Backout?
A121) Journal Recovery is recovery of changes made to a file during online processing. If a file has I/O
problems it is
restored from a backup taken before online processing began and the journalled changes are
applied. Dynamic
transaction backout is the removal of partial changes made by a failed transaction.
Q122) What tables must be updated when adding a new transaction and program?
A122) At a bare minimum the Program Control Table ( PCT) and Program Processing Table (PPT)
must be updated.
Q123) What is the meaning of the SYNCPOINT command?
A123) SYNCPOINT without the ROLLBACK option makes all updates to protected resources
29 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
30 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Q142) What is interval control and what are some of the CICS commands associated with it?
A142) CICS interval control provides a variety of time-related features - common commands are
ASKTIME,
FORMATTIME, START, RETRIEVE, and CANCEL.
Q143) What is task control and what are the CICS commands associated with it?
A143) Task control refers to the CICS functions that manage the execution of tasks. Task control
commands are
SUSPEND, ENQ, and DEQ.
Q144) What is the CICS LOAD command?
A144) The LOAD command retrieves an object program from disk and loads it into main storage - it's
primarily used for a
constant table that will be available system-wide.
Q145) What is the ABEND command and when would you use it?
A145) The ABEND command forces a task to end abnormally. It creates a transaction dump and
invokes the dynamic
transaction backout.
Q146) DB2 What is the difference between a package and a plan. How does one bind 2 versions of a
CICS
transaction with the same module name in two different CICS regions that share the same DB2
subsystem?
A146) Package and plan are usually used synonymously, as in this site. Both contain optimized code
for SQL statements - a
package for a single program, module or subroutine contained in the database request module
(DBRM) library. A
plan may contain multiple packages and pointers to packages. The one CICS module would then
exist in a package
that could be referenced in two different plans.
Q147) How to build up LU 6.2 communication?" and "what Pseudo-conversational and real
conversational
transaction are and their differences."
A147) Pseudo-conversational transactions are almost always the preferred method. In these mode
CICS releases resources
between responses to user input, i.e. the task is ended awaiting the user response.
Q148) Why is it important not to execute a STOP RUN in CICS ?
A148) Stop run will come out from the CICS region.
Q149) Why must all CICS programs have a Linkage Section ?
A149) To pass parameters from appl. Program to CICS.
Q150) A mapset consists of three maps and 10 fields on each map . How many of the following will be
needed ?
A150) a) DFHMSD statements 1
a b) DFHMDI statements 3
b c) DFHMDF statements 30
Q151) How are programs reinitiated under CICS ?
A151) START COMMAND , RETURN COMMAND
Q152) Why doesn’t CICS use the Cobol Open and Close statements ?
A152) CICS AUTOMATICALLY OPENS AND CLOSES THE FILES THOSE ARE PLASED IN
FCT
Q153) What is the difference between a Symbolic map and Physical map ?
A153) SYMBOLIC MAP IS USED BY USER AND PHYSICAL MAP IS USED BY SYSTEM
Q154) Can a program change protected field ?
A154) NO
Q155) How is the stopper byte different from an auto skip byte ?
A155) STOPPER command will stop after completing its field , whereas AUTOSKIP command Will
skip to next
unprotected field after completing its field.
Q156) By which CICS defined field can you determine the position of the cursor on the map ?
A156) ATTRIB FIELD
Q157) How will you place cursor on a field called ‘EMPNO’. This field belongs to mapset
‘MAPEMPG’
and map ‘MAPEMPM’ and Symbolic map ‘Empid-Rec’ ?
A157) BY INSERTING IC IN THE ATTRIB COMMAND
Q158) How do you place the cursor on a particular position on the screen? - GS
A158) Move -1 to the length attribute of the field and use the CURSOR option.
Define the field with IC in the BMS map.
Use CURSOR(n m)??
Q159) What are the two outputs created as a result of generation of a map? - GS
A159) The map copybook and the load module.
Q160) What is the difference between physical map and symbolic map? - GS
A160) The physical map is the load module and the symbolic map is the data structure.
Q161) What is the attribute byte? - GS
A161) Defines the display/transmission of field. most cases is an output field from the program.
Q162) How do you use extended attributes ?
A162) Define EXTATT=YES and the correct terminal type.
Q163) What are the 3 working storage fields used for every field on the map? - GS
A163) Length, attribute and input/output field.
Q164) What is MDT? What are FSET, FRSET ?
A164) MDT: Bit in the attribute byte indicating modification of field on screen. Happens on an input
operation.
FSET: Sets MDT on to ensure field is transmitted. Happens on an output operation.
FRSET: Resets MDT. Until this happens, field continues to be sent.
Q165) What is the use of DSECT parameter in BMS?
A165) Is the parameter to generate a symbolic map.
Q166) Do you receive the attribute byte in the symbolic map?
A166) On EOF yes.
Q167) How do you make your BMS maps case sensitive?
A167) Use ASIS???
Q168) What is effect on RECEIVE MAP when PF key is pressed? PA key is pressed?
31 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A168) When PF key is pressed, Data transmission may happen. When PA key is pressed, Data
transmission will not
happen.
Q169) What is the difference between a PF key & a PA key ?
A169) PF keys wake up the task and transmit modified data, PA keys only wake up the task.
Q170) Name the macros used to define the following: MAP MAPSET FIELD
A170) DFHMSD DFHMDI DFHMDF
Q171) Can you use OCCURS in a BMS map? If you do, what are the issues related with its use?
A171) Yes. cannot use group by clause???
Q172) Can you define multiple maps in a BMS mapset?
A172) Yes.
Q173) How is the storage determined in the symbolic map, if you have multiple maps?
A173) Storage for maps redefine the first. This means largest map has to be the first.
Q174) What is the meaning of BMS length of field = 0?
A174) Data was not entered in the field
Q175) Can you simply check if length = 0 for checking if a field was modified?
A175) No, not if ERASE EOF was used.
Q176) What do you do if you do not want characters entered by the user to be folded to uppercase ?
A176) Use ASIS option on RECEIVE.
Q177) What does the BUFFER option in RECEIVE mean ?
A177) Brings the entire datastream from the terminal buffer.
Q178) What are the steps you go through to a create a BMS executable?
A178) Assemble to create CSECT and Link
Q179) When you compile a CICS program, the (pre)compiler puts an extra chunk of code. Where does
it get
included and that is it called? What is its length? - GS
A179) DFHEIBLK, DFHCOMMAREA.
Q180) List all the CICS tables and explain their contents. - GS
A180) PPT SIT
PCT JCT
FCT SNT
DCT SRT
RCT TCT
Q181) I have written a CICS program. What tables should I setup to run this program? - GS
A181) PPT, PCT, (FCT, DCT, RCT (if needed)).
Q182) In which table would you make an entry for a BMS map? - GS
A182) PPT
Q183) What is the content of the PPT entry? - GS
A183) Length, Source, Use count, Lang, Res count DFHRPL number
Q184) For a CICS-DB2 program, how is the plan referenced? - GS
A184) Uses a RCT table.
Q185) How is dynamic memory allocated within a CICS application program? - GS
A185) Use a GETMAIN
Q186) What is the use of a TDQ, TSQ? - GS
A186) Temporary data stores.
Q187) How do you read from a TSQ? - GS
A187) Temp storage read command
Q188) If I create a TSQ from one transaction, can I read it from another transaction? - GS
A188) Yes. As long as they run in the same region.
Q189) What are extra partition & intra partition TDQs?
A189) Extra partition TDQs are datasets used for communication b'n CICS and other CICS/Batch
regions. Intrapartition
TDQs are queues for communication within regn.
Q190) What is trigger level in the context of TDQs?
A190) For intrapartition TDQs specify the # records at which ATI happens. not applicable for extra
partition TDQs.
Q191) How do you fire a batch job from a CICS transaction ?
A191) Define an extrapartition TDQ as an internal reader and write the JCL to it. Terminate the JCL
with /*EOF.
Q192) What is ATI? What kind of TDQ can be used?
A192) Automatic Task Initiation. Intra partition TDQ.
Q193) Do you require a table entry for a TSQ?
A193) If recovery is needed.
Q194) Is there any entry for TSQs in CICS tables?
A194) Yes in the DFHTST.
Q195) What is the use of DCT?
A195) Destination Control Table used to define TDQs
Q196) What is ENQ, DEQ ?
A196) Task control commands to make resources serially reusable.
Q197) Can you issue SQL COMMIT from a CICS program? - GS
A197) Yes.
Q198) What is the other way of terminating a transaction? - GS
A198) EXEC CICS SYNCPOINT. Assuming it is a LUW. This will not end the Xn.
Q199) What is an ASRA abend ?
A199) Any data exception problem SOC7, SOC4 etc.
Q200) What is an AEY9 abend ?
A200) DB2/IDMS not up.
Q201) What are the situations under which NEWCOPY is required ?
A201) When a program has been used in CICS atleast once and then changed and recompiled.
Q202) What is EXEC CICS RETRIEVE ?
A202) Used by STARTed tasks to get the parameters passed to them.
Q203) Name some important fields in the EIB block ?
A203) EIBRESP, EIBCALEN, EIBRRCDE, EIBTASK, EIBDATE, EIBTIME
Q204) Can you use DYNAMIC calls in CICS ?
A204) Yes, the called routine must be defined in PPT and the calling program must use CALL
identifier..
Q205) How do you handle errors in CICS pgms ?
32 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A205) Check EIBRESP after the call or use the HANDLE condition.
Q206) Suppose pgm A passes 30 bytes to pgm B thru commarea and pgm B has defined its
DFHCOMMAREA to be
50 bytes . Is there a problem ?
A206) Yes, if B tries to access bytes 31-50.
Q207) When an XCTL is done, does the tranid change ? Is a new task created ? Does it cause an
implicit
SYNCPOINT to be issued ?
A207) No, No, Yes.
Q208) How do you execute a background CICS transaction ?
A208) With a START or ATI.
Q209) What is the difference between START and XCTL ?
A209) START is used to start a new task. It is a interval control command. XCTL is used to pass
control to a program
within the same task. It is a program control command.
Q210) What is the usage of language in the PPT entry?
A210) Language interface and call parameters???
Q211) Can you have CICS code in a copybook? If yes, what happens during compilation?
A211) Yes. Needs to be preprocessed.
Q212) What is an AICA abend?
A212) Runaway Task.
Q213) How would you resolve an ASRA abend?
A213) In COBOL II start with CEBR, and get the offset/instruction.
Q214) I invoke a transaction from CICS. The program has a code: MOVE DFHCOMMAREA TO
WS-AREA.
What happens to this transaction? What happens to the other transactions?
A214) Junk may get moved in. Will cause Storage violation. ????
Q215) When you do a START, what will the value of EIBCALEN?
A215) Zero.
Q216) How are VSAM files Read in CICS pgms? - GS
A216) File Control Commands. Random, Sequential, forward and backward.
Q217) How will you access a VSAM file using an alternate index?
A217) Thru the path. Define path as an FCT and use normal File control commands.
Q218) How do you rollback data written to an ESDS file?
A218) Define the file as recoverable. in cases where records have been inserted into the file, you may
need to run a batch
program to logically delete the inserted records.
Q219) I have done a START BROWSE on a VSAM dataset. Can I do another START BROWSE
without doing an
END BROWSE?
A219) No.
Q220) Can you access QSAM (seq ) files from CICS ?
A220) No.
Q221) Can you access ESDS files from CICS ?
A221) Yes.
Q222) In the CICS command level all the re-entrancy issues are handled by the System(True or False).
A222) True
Q223) What are the three BMS options ?
A223) Minimum, Standard, Full
Q224) What are the beginning and end points of an LUW called?
A224) Sync point
Q225) The DL/I database is a hierarchical database and the DL/I access method isthe access method
of the
Information Management System (IMS)(True or False)
A225) True
Q226) Before you can use a Temporary Storage Queue you must first define the Queue name in the
CICS
Temporary Queue Table)( True or False).
A226) False
Q227) The process of writing its own type of journal records by the application program, other than
the automatic
journalling provided by CICS is called
A227) Explicit Journalling
Q228) In order to display a formatted screen, a terminal must receive a series of data stream called
Native Mode
Data Stream(True or False).
A228) True
Q229) Which is the CICS control program which governs the flow of control among the CICS
application
programs?
A229) Program Control Program
Q230) What is the option of the DFHDCT macro which makes it possible to recover logically deleted
records from
an Intrapartition TDQ?
A230) REUSE=YES
Q231) CICS and DB2 can exist in the same region under the Operating system (True or False)
A231) True
Q232) What is the name of the facility provided by CICS to free the application program form the
problems caused
by NMDS (device and format dependence)?
A232) Terminal Paging
Q233) What is the command which will delete a program LOADed into the main storage using LOAD
command?
A233) RELEASE
Q234) Which is the option of the HANDLE AID command that will pass control to the specified label
when any key
is pressed?
33 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A234) ANYKEY
Q235) What is the name of the mapset definition macro?
A235) DFHMSD
Q236) What is the access method used by DB2?
A236) SQL
Q237) What is the command that is used to add a new record to the file?
A237) READ with UPDATE followed by REWRITE
Q238) What will happen when the resource security check has failed on the program which has been
specified in the
PROGRAM option of the LOAD command?
A238) INVREQ
Q239) What is the command used to send a map to a terminal?
A239) SEND MAP
Q240) What is the command used to request notification when the specified time has expired?
A240) POST
Q241) If DATAONLY option is specified in the SEND MAP command what will happen?
A241) Only the symbolic map will be send
Q242) What will happen if the TDQ that you want to delete is not in the DCT?
A242) QIDERR will occur
Q243) The read of a record from an Intrapartition TDQ is not destructive(True or False).
A243) True
Q244) An XCTL uses more CPU time than LINK (True or False)
A244) False
Q245) What is the primary function of the Sign-on Table?
A245) Register security information of all programs
Q246) Native Mode Data Stream (NMDS) is a mixture of Buffer Control Characters(BCC) and text
data (True or
False).
A246) True
Q247) When there are 2 records with the same key specified in a DELETE operation what will
happen?
A247) DUPKEY condition will be set
Q248) The application programs that contain the SQL statements must be Pre-compiled for converting
the SQL
statements into equivalent COBOL statements (True or False)
A248) True
Q249) What are the databases that CICS can access?
A249) DB2, DL/I, ORACLE
Q250) The first step in the development of an application system is the Requirement Analysis(True or
False).
A250) True
Q251) CICS provides an interface through which the all the DL/I services can be used under
CICS(True or False).
A251) True
Q252) How to get the sign-on user-id from an application program?
A252) ASSIGN command with USERID option
Q253) What is a Logical Unit of Work (LUW)?
A253) A sequence of operations logically tied together
Q254) Translation Time is not reduced if the Pre-compilation is done first(True or False).
A254) True
Q255) What is the general Command format of CICS ?
A255) EXEC CICS followed by the command
Q256) If you use the OPTIMIZE compiler option the size of the program can be reduced by 5 to
10%(True or
False).
A256) True
Q257) For multithreading an application program need not be re-entrant(True or False).
A257) True
Q258) Before issuing an ASKTIME command what will be the values in the EIBDATE and EIBTIME
fields if the
EIB?
A258) The date and time at the task initiation
Q259) What is the error condition that is set when the file specified in the NAME option is not in the
FCT?
A259) PGMIDERR
Q260) For protecting a transaction using the transaction security function, the two things that must be
done are:
1. in the SNT entry of the user who you which to allow to access a protected transaction, specify
SCTKEY=n
2. In the PCT entry of the transactions that you wish to protect specify the TRANSEC=n. (True
or False)
A260) True
Q261) What are the various types of accesses that can be allowed by the SERVREQ option of the
DFHFCT?
A261) ADD,BROWSE,DELETE,READ,UPDATE
Q262) ‘CICS' system services provides an interface between CICS and the operating system and
carries out the
functions like loading and releasing of application programs, acquiring and freeing of storage , task
scheduling, etc (True or False).
A262) True
Q263) What are the parameters that you have to give when you are using the CSSN transaction?
A263) None
Q264) What is the command that is used to delay the processing of a task for a specified time interval
or until a
specified time?
A264) WAIT
Q265) NMDS is both device dependent and format dependent (True or False)
34 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
A265) True
Q266) Which is the EIB field that gives the date when a task was started?
A266) EIBDATE
Q267) Which is the AID that will not be identified in the ANYKEY option of the HANDLE AID
command?
A267) CLEAR
Q268) Reading a record from a TSQ will logically delete the record from the Queue (True or False).
A268) True
Q269) What is the option that is used to erase all unprotected fields during a SEND MAP operation?
A269) ERASEAUP
Q270) What is the CICS command that is used to receive the un-formatted data from the terminal or
logical unit of
a communication network?
A270) RECEIVE
Q271) What is the command for reading a record form a TSQ?
A271) READQ TS, READQ
Q272) What will happen, if an out-of-range or negative value is specified in the LENGTH option of the
SEND
command?
A272) The OUTRAGE condition will be set
Q273) Which is the control table where you specify all the transaction that are to be started by CICS
after CICS
start-up?
A273) Sign-on table
Q274) A HANDLE CONDITION remains active until the end of the program or until another
HANDLE
CONDITION command (True or False).
A274) True
Q275) In the conversational mode the system waits for the user to enter his response and then press an
attention
key, and while waiting the resources are held by the program or task. So conversational mode of
programming is inefficient (True or False)
A275) True
Q276) Which is the macro used for making an entry in the PPT
A276) DFHPPT
Q277) The goal of a recovery process is to Maintain the integrity of the data processed by the system
and to
minimize the impact of a task or system failure (True or False).
A277) True
Q278) What is the primary objective of CICS ?
A278) To provide the control and services of the DB/DC system
Q279) If no exception handling is provided in the program, what will happen ?
A279) CICS will take the default action specified for the condition
Q280) What is the CICS supplied transaction which performs syntax checking of a CICS command?
A280) CEMT
Q281) What is the process of converting the CICS commands into the equivalent host language
statements called?
A281) Translation
Q282) What is the function of the LOAD command?
A282) To fetch a program, table or map to the main storage.
Q283) What is the CICS Command that is used for reading a record from the TDQ?
A283) READQ
Q284) LENGERR, NOTAUTH and PGMIDERR are some of the common exception conditions that
can occur with
LINK and XCTL (True or False).
A284) False
Q285) Which of the following are recoverable CICS resources?
A285) Data files and data bases, Intrapartition TDQs, Auxiliary TSQs
Q286) Which is the program which determines whether a transaction should be restarted ?
A286) DTB
Q287) What is the command used for receiving a map from a terminal?
A287) RECEIVE MAP
Q288) The mode of achieving conversation with the user, by sending him the message and while
waiting for his
response, freeing the system resources is called
A288) Pseudo-conversation
Q289) Which is the command used for terminating a browse operation?
A289) ENDBR
Q290) What is the primary function of the Processing Program Table (PPT)?
A290) To register all programs and maps
Q291) Sync points cannot be requested by the application programs(True or False).
A291) False
Q292) Which is the command that is used to dump the main storage areas related to a task?
A292) DUMP
Q293) What is the CICS command that is used to copy a screen image of a terminal into another
terminal?
A293) ISSUE COPY
Q294) What is the name of the log which contains the information needed to restart the system,
including the task
sync point information and system activity key points, snapshots of key system tables, etc.
A294) Dynamic Log
Q295) The EIB field which gives the last CICS command executed is
A295) EIBRCODE
Q296) The READ command with INTO option will read the record specified into the data area
specified (True or
false).
A296) False
35 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
Q297) The attribute character is an visible 1 byte character which precedes a screen field and
determines the
characteristics of the field (True or False).
A297) True
Q298) What is the function of the Terminal Control table?
A298) To register all CICS terminals
Q299) Which is the CICS control program that provides communication services between user written
application
programs and terminals?
A299) Terminal Control Program
Q300) CICS Command level is
A300) Low level version of CICS macro level
Q301) TSQs can be written in the Main storage or Auxiliary storage (True or False).
A301) True
Q302) what is difference between call and link ?
A302) In case of call , whenever you do changes to the called program you need to compile the
calling program also. In case of link , it is not needed .
Q303) what are the differences between DFHCOMMAREA and TSQ ?
A303) Both are used to save data among tasks. but 1. COMMAREA is private to that transaction
only . like every transaction has its own COMMAREA created by CICS as soon as the transaction
is initiated . however TSQ , if queue id is known can be accessed by other transactions also 2.
COMMAREA length is s9(4) comp i.e. 65k . but TSQ can have any length.3. COMMAREA is
available only during the transaction is running. TSQ if created with auxiliary option resides in aux
memory and available even if main memory crashes.4.normally COMMAREA is used to transfer
data from one task to another while tsq is used widely within the task as a scratch pad.
Q304) What is Communication Area?
A304) Communication Area is used to pass data between the program or between the task.
Q305) Which of the following statements correctly describe the syntax of CICS command
language?
A). If an EXEC CICS command must be continued onto a second line a hyphen (-)
must be coded in column 7 of the continued line.
B). If an EXEC CICS command must be continued onto a second line an 'X' must be
coded in column 72 of each line to be continued.
C). An EXEC CICS command CANNOT be coded within a COBOL IF statement,
between the IF command and the period (.) ending it.
D). The END-EXEC delimiter is optional and never needs to be placed at the end of a
CICS command.
E). The options specified within an EXEC CICS command can be in any order.
A305) E. The options specified within an EXEC CICS command can be in any order. For
example 'exec CICS Send From(Msg1) Length(30) End-Exec' can also be coded 'exec Cics Send
Length(30) From(Msg1) End-Exec'
Q306) A CICS program ABENDS with an ASRA ABEND code. What is its meaning?
A) A link was issued to a program whose name does not exist in the PPT (Program
Processing Table).
B) A program attempted to use a map that is not defined in the PCT (Program Control
Table).
C) A security violation has occurred. The operator is not defined with the proper
authority in the SNT (Sign-
on Table) to use a particular file
D) A program interrupt (0C0 or 0C1 or 0C2 or ...) has occurred in a CICS program.
E) An I/O error has occurred when attempting to use a VSAM file from a CICS program
A306) A program interrupt (0C0 or 0C1 or 0C2 or ...) has occurred in a CICS program.
Q307) Which of the following commands, when issued by 2 different programs running at the
same time, will prevent simultaneous use of resource 'SINGLE'?
B) EXEC CICS PROTECT RESOURCE('SINGLE') LENGTH(6) END-EXEC.
C) EXEC CICS HOLD RESOURCE('SINGLE') LENGTH(6) END-EXEC.
D) EXEC CICS TASK SINGLE('SINGLE') LENGTH(6) END-EXEC.
E) EXEC CICS EXCLUSIVE RESOURCE('SINGLE') LENGTH(6) END-EXEC.
A307) EXEC CICS EXCLUSIVE RESOURCE('SINGLE') LENGTH(6) END-EXEC
Q308) The map shown below is displayed with:
EXEC CICS SEND MAP('MAP1') MAPSET('MAP1S') MAPONLY END-EXEC. After the
screen is displayed, the operator enters 1 character, the letter 'X'. Where will the cursor now
appear on the screen?
MAP1S DFHMSD
TYPE=MAP,MODE=INOUT,CTRL=(FREEKB,FRSET),LANG=COBOL, X
TIOAPFX=YESMAP1
DFHMDI SIZE=(24,80) DFHMDF POS=(5,1),ATTRB=UNPROT,LENGTH=1FIELD2
DFHMDF
POS=(5,3),ATTRB=UNPROT,LENGTH=1FIELD3 DFHMDF
POS=(5,5),ATTRB=(UNPROT,IC),LENGTH=1FIELD4 DFHMDF
POS=(5,7),ATTRB=ASKIP,LENGTH=1FIELD5 DFHMDF
POS=(5,9),ATTRB=UNPROT,LENGTH=1,INITIAL='Z' DFHMDF
POS=(5,11),ATTRB=ASKIP,LENGTH=1 DFHMSD TYPE=FINAL
A) In the field with a POS=(5,1) B) In FIELD2. C) In FIELD3. D) In FIELD4. E) In FIELD5.
A308) In FIELD5
Q309) How can you accomplish breakpoint in intertest?
A309) U-for unconditional breakpoint, C-for conditional breakpoint, and A-for automatic
breakpoint
Q310) How many ways are there for initiating a transaction? what are they?
A310) There are six ways in initiating a transaction.they are as follows.
1. embedding four character transid on the top left most corner of the screen.
2. making use of EXEC CICS START TRANSID ( )
3. making use of EXEC CICS RETURN TRANSID ( )
4. By defining the transid in DCT (destination control table) to enable ATI (AUTOMATIC TASK
INITIATION)
5. Making use of PLT ( program list table)
6. By associating four character transid in PCT (program control table)
36 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
37 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
screen.
Q329) How To Set MDT(Modified Data Tag) Thru Application Program?(Dynamically)?
A329) You have to move the following macro DFHBMFSE to the Attribute field of that particular Variable.
Q330) What CICS facilities can you use to save data between the transactions?
A330) COMMONAREA, TSQ & TDQ.
Q331) How would you release control of the record in a READ for UPDATE?
A331) By issuing a REWRITE,DELETE, or UNLOCK command or by ending the task.
Q332) What is the difference between a RETURN with TRANSID and XCTL ?For example
prog. A is issuing REUTRN with TRANSID to prog B. Prog A. is issuing XCTL to prog B?
A332) In RETURN with TRANSID the control goes to the CICS region and the user have to transfer the
control to prog. B
by pressing any of the AID KEYS.In XCTL the control is directly transfer to prog. B.
Q333) What will be the length of the eibcalen ,if the transaction is used to cics first time?
A333) The length will be 0(zero).
Q334) What is DFHEIBLK?
A334) DFHEIBLK is Execute Interface Block. It is placed in the linkage section automatically by CICS
translator program.
It must be the first entry in linkage section. CICS places values prior to giving control to the
program and we can
find almost any information about our transaction.
Q335) What is the difference between the XCTL and LINK commands?
A335) The LINK command anticipates return of control to the calling program, the XCTL command does
not. Return to
the calling program will be the result of the CICS RETURN command, specifying
TRANSID(name of the calling
program).
Q336) What CICS command would you use to read a VSAM KSDS sequentially in ascending
order?
A336) First issue a STARTBR(start browse), which will position the browse at the desired record. Retrieve
records by
using subsequent READNEXT commands. Indicate the end of sequential processing with the
ENDBR command. If
the generic key is specified in the STARTBR command positioning in the file will be before the
first record
satisfying the generic key.For reading in descending order use the READPREV instead of
READNEXT.
Q337) What is the difference between pseudo-conversational and conversational?
A337) Pseudo-conversational will start a new task for each input. By coding a CICS RETURN command
specifying ‘
TRANSID(itself). Conversational will have an active task during the duration of the data entry.
Q338) What is the COMMAREA(communications area)?
A338) An area used to transfer data between different programs or between subsequent executions of the
same program.
Needs to be defined in the Linkage Section.
1. What are the pros and cons of Conversation Vs Pseudo conversation programming ?
2. Explain IPC mechanisms and means in CICS?
3. Can we use EXEC SQL COMMIT/ROLLBACK in CICS? If so how? if not what are the
alternatives?
4. What are the advantages of TDQ?
5. How do you implement locking in CICS?
6. What is multithreading?
7. Name 3 cobol commands that cannot be used with CICS
8. Why is it important not to execute a STOP RUN in CICS ?
9. How are programs reinitiated under CICS ?
10. Why must all CICS programs have a Linkage Section ?
11. Why doesn’t CICS use the Cobol Open and Close statements ?
12. What is the difference between a Symbolic map and Physical map ?
13. If a physical map has six variable fields and nine constant fields, how many fields must the
symbolic map has ?
14. In which column must label begin ?
15. Code the parameter that will assign a start value to the filed
16. Can a program change protected field ?
17. How many columns will be needed on a screen to display a protected field that has 4 bytes of data
18. How many columns will be needed to on a screen to display an unprotected field that has 4 bytes
of data
19. What are the 2 categories of extended attributes ?
20. When using extended attributes , how many attribute bytes will be needed for each symbolic map
field ?
21. How is the stopper byte different from an autoskip byte ?
22. By which command do you preserve working storage fields ?
23. How do you restore working storage fields ?
24. Which command will release all the resources used by the program ?
25. What is the relationship between EIBCALEN and DFHCOMMAREA ?
26. How will you place cursor on a field called ‘EMPNO’. This field belongs to mapset ‘MAPEMPG’
and map ‘MAPEMPM’ and Symbolic map ‘Empid-Rec’ ?
27. How will the program know which key has been pressed.
28. By which CICS defined field can you determine the position of the cursor on the map ?
29. What is the function of a STARTBR ?
30. Assume that a file contains 100 records ,If one start browse and 99 read next commands have been
executed , which record will currently be in memory ?
31. True or False ? . In a browse program the program should remain active while a user is viewing a
screen
32. Which condition will be triggered if a user attempts to start a browse beyond end-of file ?
33. Which condition will be triggered if a user attempts to continue reading backward beyond the
beginning of file?
34. What will happen if a user enters a record key that is lower than the lowest record key in a file ?
35. How can this answer be affected by the Start-Browse option ?
38 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
39 of 40 9/21/2010 3:02 PM
Mainframes Interview Questions http://www.mainframesguru.com/beta/index.php?option=com_content&v...
114. Can a CICS region be attached to more than one DB2 subsystem ?
115. What determines the DB2 subsystem to which a particular CICS region is attached ?
116. What is the DSNC transaction used for ?
More Articles...
Page 1 of 2
40 of 40 9/21/2010 3:02 PM