Escolar Documentos
Profissional Documentos
Cultura Documentos
Q: You are writing Report Program with 4 levels of totals: City, State,
Region and Country. The codes being used can be the same over the
different levels, meaning a city code of 01 can be in any number of
states, and the same applies to state and region code. How do you do
your checking for breaks and how do you do add to each level?
A: Always compare on the highest level first, because if you have a
break at a highest level, each level beneath it must also break. Add to
the lowest level for each record but add to the higher level only on a
break.
Q: What is the maximum length of a field you can define using COMP-
3?
A: 10 Bytes (S9(18) COMP-3).
A: 5 times only. It will not take the value 10 that is initialized in the
loop.
Q: What is the difference between SEARCH and SEARCH ALL? What is
more efficient?
A: SEARCH is a sequential search from the beginning of the table.
SEARCH ALL is a binary search, continually dividing the table in two
halves until a match is found. SEARCH ALL is more efficient for tables
larger than 70 items.
TOPIC: JCL
Open this file and write the JCL statements into this file.
Example:
MOVE '//TESTJOB JOB 1111,VISVEISH' TO JCL-REC.MOVE '//STEP01
EXEC PGM=IEFBR14' TO JCL-REC.and close this file. Then TESTJOB will
be submitted.
Q: How to pass the temp dataset form one JOB step to another?
A: By specifying the DISP as PASS for the temp dataset
Q: What is JCL?
A: It is an interface between operating system (MVS) & the application
program. When two related programs are combined together on
control statements, it is called job control language
Q: What is a GDG?
A: GDG - group of dataset that are logically or chronologically related,
referred by name and a relative generation number - an integer which
identifies the generation of a dataset and is coded in parentheses
after dataset name.
Absolute GDG name - GxxxxVyy, where xxxx-absolute generation
number, yy-version number.
GDGs can be sequential, direct, partitioned. (VSAM - no). They must
always be cataloged.
Advantages - all datasets have the same name and system keeps
track of adding new and retaining previous generations and deleting
oldest successive generation. To create a GDG we create a GDG index
in the system catalog with IDCAMS utility and then a model
(prototype, DSCB) on the same volume to supply DCB information.
Empty - when limit is reached all members are removed from the
index, otherwise only oldest. Scratch-removed members are
uncataloged & deleted, otherwise - removed & uncataloged, but
remain in the system (not members of GDG any more). GDG number
is updated at the end of the job. If number is not specified all
generations will be processed from the beginning
Q: What is DSNDB06?
A: This is the Place where DB2 Catalog resides;
Q: How many parameters are there to a DISP statement and what are
their uses.
A: There are three (3) parameters:
Parameter 1: Current data set disposition (NEW, SHR,OLD,MOD)
Parameter 2: Normal close action for data set (CATLG, KEEP, DELETE)
Parameter 3: Abend action for data set (CATLG, KEEP, DELETE)
Q: What is COMP?
A: COMP - HALF WORD BINARY
Q: What is a PROCEDURE?
A: A set of precoded JCL that can be modified through the use of
parameters or override cards. Note: Procedures can be catalogued or
instream.
Q: What is CICS?
A: CICS is a DB/DC system. It acts as an interface between the
operating system and the application program.
Q: How many ways are there for initiating a transaction? What are
they?
A: There are six ways in initiating a transaction. They are as follows:
Embedding four-character TRANS-ID on the top left most corner of
the screen.
Making use of EXEC CICS START with TRANSID
Making use of EXEC CICS RETURN with TRANSID
By defining the TRANS-ID in DCT (Destination Control Table) to
enable ATI (Automatic Task Initiation)
Making use of PLT (program list table)
By associating four character transid in PCT (program control table)
Q: What is Quasi-reentrancy?
A: There are times when many users are concurrently using the same
program, this is what we call multithreading. For example, 50 users
are using program A, CICS will provide 50 Working storage for that
program but one Procedure Division. And this technique is known as
Quasi-reentrancy
Q: What CICS facilities can you use to save data between the
transactions?
A: COMMONAREA, TSQ & TDQ.
Q: How would you release control of the record in a READ for UPDATE?
A: By issuing a REWRITE, DELETE or UNLOCK command or by ending
the task.
Q: What is DFHEIBLK?
A: 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.
Q: Which is the most widely used batch performance monitor for DB2?
A: DB2PM
Q: What are the different methods of accessing DB2 from TSO? How
is the connection established between TSO & DB2?
A: There are three ways in establishing TSO/DB2 connection 1. SPUFI
2. QMF 3. CATALOG VISIBILITY; A thread between TSO & DB2 is
established while attempting to make connection between TSO & DB2.
Q: How do you filter out the rows retrieved from a DB2 table?
A: One way is to use the SQL WHERE clause.
Q: What is a collection?
A: A collection is something that every programmer should
assign/specify for every package. This is about 1-18 characters long.
Q: What is the equivalent Cobol Data type for Decimal (x,y) in DB2?
What does the current SQLID register contain?
A: PIC S9(X-Y)V9(Y) COMP-3; The current SQLID contains the current
authorization ID.
Q: When can you be sure that a query will return only one row?
A: When you use the primary key and only the primary key in the
WHERE clause.
Q: Can all users have the privilege to use the SQL statement SELECT *
(DML)?
A: No. The users should be granted privilege to use it.
Q: What's the best locksize that you could use when you create a
tablespace?
A: The answer is LOCKSIZE = ANY. Unless you are sure what's the
Purpose of tablespace ie.,Read-only or Read/Write. If you use
LOCKSIZE = ANY, DB2 would automatically determine what type of
locks it should use.
Q: Can you define an Index if the table size is less than 10 PAGES?
A: NO
Q: When does the SQL statement gets executed when you use cursor
in the application programming?
A: SQL statement gets executed when we open cursor
Q: What does DML stand for and what are some examples of it?
A: Data Manipulation Language. Some examples are SELECT, INSERT,
DELETE, REPLACE.
Q: How to define the data items to receive the fetch items for the
SQL?
A: Using the DSECT, followed by lines of - 'dataitems DS datatype'.
Q: What technique is used to retrieve data from more than one table
in a single SQL statement?
A: The JOIN statement combines data from more that two tables
Q: How many key fields and search fields can a segment have?
A: One key field and as many search fields in the segment can be
declared.
Q: What is a Root?
A: The segment at the top of the Hierarchy, which is not a child to a
segment, is called the Root.
Q: What is a Segment?
A: A segment is the smallest unit of information that DL/I uses when
working with information in the database
Q: What is the return code you get after a successful IMS call?
A: Spaces.
Q: Define DBD?
A: DBD: Database Descriptor. IMS controls the structure of database
and access to the database via DBD. The DBD contains information
like, segment types, their location in hierarchy and sequence keys.
MISCELLANEOUS
Q: I ask this question every one that I interview. What do you mean
by an ADDRESS SPACE?
A: An ADDRESS SPACE is the amount of Virtual Storage Seen by the
Job. 2 GB for MVS/XA and MVS/ESA.TSO for on-line Users. Batch Jobs
execute in an Initiator Address Space