Thursday, November 17, 2011

VSAM Interview Questions 1

What are the types of VSAM Datasets?
Entry sequenced Datasets (ESDS), Key sequenced Datasets (KSDS) and relative record Dataset
(RRDS), LDS (linear Data Set).
Why do VSAM take more disk space than other utilities?
VSAM increases the disk space requirements of
systems. This is because VSAM offers certain capabilities like partial
self-reorganization to make things more efficient in data sets that can be
modified.
What are the distinctive features of a KSDS, Key sequenced Dataset?
The index and the distributed free space. CI and CA splits upon updates. Record length may be changed during update. The records are accessed by a particular Key.
How are records stored in an ESDS, entry sequenced Dataset?
They are stored without respect to the contents of the records and in the order in which they are Included in the file.
What's a LDS (Linear Data Set) and what's it used for?
LDS is a VSAM Dataset in name only. It has unstructured 4k
(4096 bytes) fixed size CIs which do not contain control fields. There is no
free space, and no access from Cobol. LDS is essentially a table of data
maintained on disk. The 'table entries' must be created via a user program and
can only be logically accessed via a user program. When passed, the entire LDS
must be mapped into storage, then data is accessed via base and displacement
type processing.
In ESDS, do we have the facility of accessing the records randomly?
YES, Random access of records is possible. Records however cannot be deleted. We can do it By referring the RBA (relative byte address).
Why is the space is kept in data component of the KSDS Dataset?
Free space specified during the allocation of the KSDS is left at regular intervals during the initial load of the data set. This space helps keep the data component in physical sequence in
spite of Random insertions.
What is the difference b/w the ESDS and KSDS?
ESDS doesn’t have imbedded free space.The KEYS parameter has no meaning in the context of ESDS.ESDS has no index component.An additional parameter, NONINDEXED is used to tell AMS that an ESDS is being allocated.
How is LDS different from ESDS?
An LDS is a data set; very similar to an ESDS without the control information .It has no records and used for fast random access. It takes advantages of the computer’s very fast paging hardware for retrieval and storage and the bytes are implicitly divided into 4K blocks or pages, and the paging hardware reads and writes blocks from disk. There is no free space, unused
space, control field in LDS.
What is a CI, Control Interval?
A Control Interval is the unit of information that VSAM transfers between virtual and auxiliary storage.
What is Control Interval Split?
A new record stored in same CI, only if there is enough space. If not VSAM locates the free CI within the same CA, moves approximately half of the records to next CI and stores the new record at the correct position. This is called Control Interval Split. Whenever CI split
occurs the sequence set is updated.
What is a CA, control area?
A group of Control Intervals makes up a control area.
What are the types of VSAM Datasets?
Entry sequenced Datasets (ESDS),Key sequenced Datasets (KSDS),Relative record
Dataset (RRDS),LDS (linear Data Set).
Why do VSAM take more disk space than other utilities?
VSAM increases the disk space requirements of systems. This is because VSAM offers certain capabilities like partial self-reorganization to make things more efficient in data sets that can
be modified.
What are the distinctive features of a KSDS, Key sequenced Dataset?
The index and the distributed free space. CI and CA splits upon updates. Record length may be changed during update. The records are accessed by a particular Key.
How are records stored in an ESDS, entry sequenced Dataset?
They are stored without respect to the contents of the records and in the order in which they are Included in the file.
What's a LDS (Linear Data Set) and what's it used for?
LDS is a VSAM Dataset in name only. It has unstructured 4k (4096 bytes) fixed size CIs which do not contain control fields. There is no free space, and no access from Cobol. LDS is essentially a table of data maintained on disk. The 'table entries' must be created via a user program and
can only be logically accessed via a user program. When passed, the entire LDS
must be mapped into storage, then data is accessed via base and displacement
type processing.
In ESDS, do we have the facility of accessing the records randomly?
YES, Random access of records is possible.
Records however cannot be deleted. We can do it By referring the RBA (relative
byte address).
Why is the space is kept in data component of the KSDS Dataset?
Free space specified during the allocation of the KSDS is left at regular intervals during the initial load of the data set. This space helps keep the data component in physical sequence in spite of Random insertions.
What is the difference b/w the ESDS and KSDS?
ESDS doesn’t have imbedded free space.The KEYS parameter has no meaning in the context of ESDS.ESDS has no index component.An additional parameter, NONINDEXED is used to tell AMS that an ESDS is being allocated.
How is LDS different from ESDS?
An LDS is a data set; very similar to an ESDS without the control information .It has no
records and used for fast random access. It takes advantages of the computer’s
very fast paging hardware for retrieval and storage and the bytes are implicitly
divided into 4K blocks or pages, and the paging hardware reads and writes blocks
from disk. There is no free space, unused space, control field in LDS.
What is a CI, Control Interval?
A Control Interval is the unit of information that VSAM transfers between virtual and
auxiliary storage.
What is Control Interval Split?
A new record stored in same CI, only if there is enough space. If not VSAM locates
the free CI within the same CA, moves approximately half of the records to next
CI and stores the new record at the correct position. This is called Control
Interval Split. Whenever CI split occurs the sequence set is
updated.
What is a CA, control area?
A group of Control Intervals makes up a control area.
If the records are larger than the CI size, for ex. if a record extend CI boundary and extends unto 3 CI, and there is still some space left in last i.e. third CI, will that be used by other CI Datasets ?
NO. Some records are larger than the CI size, the records extend across CI boundaries (only for ESDS and KSDS). A spanned record begins on a CI boundary and it occupies two or more CIs in a CA.
The unused space in the last CI can only be used to extend the record, it cannot
contain any other record i.e. a new record has to be added in a new
CI.
What is a sequence set?
This is the part of the index that points to the CA and CI of the record being
accessed.
What is a cluster?
A cluster is the combination of the index, sequence set and data portions of the Dataset. The operating system gives program access to the cluster, i.e. to all parts of the Dataset
simultaneously.
What is the index set?
This is the other part of the index. It has multiple levels with pointers that ultimately
reach to the sequence set.
What is a Catalog?
The catalog contains the names of all Datasets, VSAM and non-VSAM. It is used to
access these Datasets.
What is an alternate index?
An AIX is a file that allows access to a VSAM Dataset by a Key other than the
primary one. The Alternate Key-pointer pair records are stored in an index
cluster. This index cluster is known as Alternate index. The alternate
Key-pointer pair records are loaded into the alternate index cluster by the
command BLDINDEX.AIX can be built over a KSDS and ESDS, but not over an
RRDS.
What could be the maximum number of the AIXs per base cluster?
There can be a maximum of 253 AIXs per base cluster. It is
not advisable to have more than 5 AIXs per base cluster because of additional
overhead during updates and retrievals.
Can AIX be defined over an ESDS, which does not have any Key?
Although an ESDS does not have a primary Key, an AIX can be defined over an ESDS. In the case of an ESDS it is the relative byte address of the corresponding record in the base cluster that
is stored.
Can we access records in VSAM only by a single Key, i.e. primary Key?
It is also possible to access the records in a sequence other than that of the primary Key. Such Keys are called alternate Keys and they can be non-unique.For Example, in a pay-roll system where employee number is the unique primary Key and the Employee name as alternate
Key.
What is the 'verify' command in the VSAM files?
This command is used to close those files that are kept open after the abnormal termination of the file. It also brings the index component in sync with the data components and updates the catalog.
What is a path?
A path is a file that allows you to access a file by alternate index - the path provides an association between the AIX and the base cluster.
What is the upgrade set?
The upgrade set is the list of all AIXs that VSAM must maintain for a specific base cluster, so
that when data in the base cluster is updated, the AIX files are also updated.
What is free space?
Free space is reserved within the data component of a KSDS to accommodate inserting new records.

CICS Interview Questions 1

Question: what are the differences between DFHCOMMAREA and TSQ ?
Answer :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. 64k .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.
Question: How can you accomplish breakpoint in intertest?
Answer :U-for unconditional breakpoint, C-for conditional breakpoint, and A-for automatic breakpoint.

Question: what is difference between call and link ?
Answer :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 .
Question: Which is the program which determines whether a transaction should be restarted ? Answer :DTB
Question: The EIB field which gives the last CICS command executed is ?
Answer :EIBRCODE
Question: If no exception handling is provided in the program, what will happen ?
Answer :CICS will take the default action specified for the condition.
Question: Which is the macro used for making an entry in the PPT ?
Answer :DFHPPT
Question: What is the error condition that is set when the file specified in the NAME option is not in the FCT?
Answer :PGMIDERR
Question: Why is it important not to execute a STOP RUN in CICS ?
Answer :Stop run will come out from the CICS region.
Question: Why must all CICS programs have a Linkage Section ?
Answer :To pass parameters from appl. Program to CICS.
Question: What is the CICS LOAD command?
Answer :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.

Question: What is the ABEND command and when would you use it?
Answer :The ABEND command forces a task to end abnormally. It creates a transaction dump and invokes the dynamic transaction backout.
Question: What are the two outputs created as a result of generation of a map?
Answer :The map copybook(Symbolic map) and the load module(physical map).

Question: Why doesn't CICS use the Cobol Open and Close statements ?
Answer :CICS automatically opens & closes the files those are used in the program.
Question: If you use the OPTIMIZE compiler option the size of the program can be reduced by 5
to 10%(True or False)?
Answer :TRUE
Question: What is the attribute byte?(MAPS)
Answer :Defines the display/transmission of field. Most cases is an output field from the
program
Question: which CICS defined field can you determine the position of the cursor on the map ? Answer :ATTRIB FIELD FCT

Wednesday, November 16, 2011

JCL

2GB - Maximum region available for Job through REGION parameter.
8 - Maximum length of stepname/ddname/operation name.
15 - Maximum number of Jobs steps in a JCL.
15 - Maximum Instream Procedure in a Job.
16- Maximum number of extents for PS.(Extents - Non contigeous memory locations on a volume.)
20 - Maximum length of Programer Name.
22 - Maximum number of qualifiers in dataset name.
44 - Maximum lengthl of dataset name (Including periods).
80 - Maximum number of charecters in one line/record can be passed to Program through ACCEPT.
100 - Maximum number of characters passed through PARAM parameter.
123 - Maximum number of Extents for VSAM.
142 - Maximum number of characters coded in Accounting Information.
255 - Maximum number of EXEC steps in a Job.
255 - Maximum number of buffers coded in DCB parameter (BUFNO).
255 - Maximum number of JOB steps in a Procedure.
255 - Maximum number of generations within one GDG.
3273 - Maximum number of DD statemets in a single EXEC.
4095 - Maximum comparision code in COND condition.