Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What Is The Purpose Of The Verify Function Of Idcams?

Answer»

To re-sync the END of the FILE INFORMATION with the catalog information, the VERIFY FUNCTION is used.

To re-sync the end of the file information with the catalog information, the VERIFY function is used.

2.

What Are The Idcams Commands That Can Be Used For Vsam And Explain Each Of Them.

Answer»
  • To MODIFY the INFORMATION for a CATALOG, alternate index, cluster or a path, ALTER command is used
  • DEFINE command is used for ALTERNATE INDEX, CLUSTER or PATH
  • DELETE command is used for removing the catalog for a catalog, cluster, alternate index or path
  • LISTCAT command lists the information about the dataset.
  • PRINT command prints the contents of dataset - REPRO command is used to copy the records from one file to another.

3.

What Is Meant By Dirty Read In Vsam?

Answer»
  • HIGH degree of CONCURRENT access to VSAM files is achieved by dirty READ - It is done by avoiding the complications associated with CI and CA splits - The dirty read protocol is summarized as:
  • The VSAM file mandatorily be defined with cross-region SHARE POINTS 4. - The file allocation must be with DISP=SHR - ENQ must be followed for all operations of the files, for data set - Data set name is specified for ENQ name - Any string can be used for the ENQ gname - The user’s buffer must be refreshed with GET request, after obtaining a lock - No lock is held during a wait - DEQ function should be called at the end of all the file operations of enqueue.

4.

Difference Between Vsam And Database Tables

Answer»
  1. VSAM file can not run SQL QUERIES. -VSAM lacks any kind of relation -VIEWS and SYNONYMS can not be defined on VSAM files -RDBMS concepts can not be applied in VSAM files.
  2. SQL queries can be run in DATABASE table - Data FETCHING is more efficient than VSAM files - RDBMS concepts are applicable in DB2 database - ALIAS VIEWS can be defined on tables for sharing customized data.

5.

Explain The Differences Between Vsam And Non-vsam Files

Answer»
  1. The AMS program is used for creation of VSAM files - ISPF panel or a standard JCL is used for creation of a NON-VSAM dataset.
  2. The VSAM information is stored in catalogs - The NON-VSAM information is stored in VTOC as dataset labels
  3. The data set organization in VSAM files are Key SEQUENCED, Entry sequenced and Relative record data sets

A data set is a physical records that are stored on a disk or TAPE , is a COLLECTION with a unique name

The data set is normally identified by the MVS with labels

The label information need to be supplied in JCL

The data set organization in NON-VSAM files are sequenced, INDEXED Sequential, Direct and partitioned

A data set is a physical records that are stored on a disk or tape , is a collection with a unique name

The data set is normally identified by the MVS with labels

The label information need to be supplied in JCL

The data set organization in NON-VSAM files are sequenced, Indexed Sequential, Direct and partitioned

6.

Explain The Information Contained In Ci

Answer»
  • Control information consists of RECORD Descriptor Field and Control Interval Descriptor Field.
  • Each CI contains one CIDF that consists of the LAST 4 BYTES
  • CIDF consists of information about the offset and length of free SPACE in the CI
  • In case of fixed size records, each CI contains 2 RDFs each RDF is of 3 bytes length
  • In case of variable length size records, there will be a separate RDF for each record in the CI.
  • The data portion of the CI should be in the multiples of 512 bytes / 2048 bytes.
  • The maximum size of the CI is 32 KB. - The size of index portion of CI could be any of these
  • 512, 1024,2048,4096

7.

How Did You Refresh A Vsam File And How Frequently You Do It ?

Answer»
  • Refresh can be done on DAILY or weekly or monthly basis
  • Refreshing refers to DELETE / DEFINE the VSAM file

Step 1: Deleting the existing VSAM file:

IF LASTCC =8 ; SET MAXCC=0

Step 2: DEFINE VSAM-FILE(COND=(0,LT,STEP1)

Return-code = 8 when the file that is trying to delete does not exist.

Utilize the command VERIFY in TSO

Step 1: Deleting the existing VSAM file:

IF LASTCC =8 ; SET MAXCC=0

Step 2: DEFINE VSAM-FILE(COND=(0,LT,STEP1)

Return-code = 8 when the file that is trying to delete does not exist.

Utilize the command VERIFY in TSO

8.

How Do You Convert Flat Files To Vsam Files?

Answer»

Flat files are converted into VSAM files by following process:

  •  Identify the primary key, when the WHOLE record can be primary key.
  •  Alternate key can also be used, if needed
  •  File is to be sorted by primary key or the whole record
  •  Utilize the SORT STATEMENT for dropping duplicates.
  •  A JCL COMMAND ( IDCAMS – Define Cluster) need to be submitted by using the result of sorting mechanism(mentioned above) as input
  •  Use the command IDCAMS REPRO for loading the flat file into the VSAM file.

 

Flat files are converted into VSAM files by following process:

 

9.

We Can Define The Ksds Cluster By Two Ways By Using The File-aid Or By Using The Idcams Utility. Explain Them.

Answer»

KSDS cluster can be defined by

-Using the file-aid
-or by using IDCAMS utility:

The record can be defined with average length of 100 and maximum length of 150, in IDCAMS, with key length 10 starting at 0.

The following EXAMPLE illustrates :

//step01 EXEC pgm=IDCAMS
//SYSIN DD *
DEFINE CLUSTER(NAME(userid.name.sample) -
VOLUMES(MVS801) -
RECORDSIZE(100 150) -
TRACKS(10 20)
KEYS(10 0) -
INDEXED ) -
DATA ( NAME(userid.name.sample.data)) -
INDEX( NAME(userid.name.sample.index)) -
/*
//

KSDS cluster can be defined by

-Using the file-aid
-or by using IDCAMS utility:

The record can be defined with average length of 100 and maximum length of 150, in IDCAMS, with key length 10 starting at 0.

The following example illustrates :

10.

How Do You Define An Altindx ? How Do You Use Altindxs In Batch, Cics Programs?

Answer»
  1. Issue the command DEFINE ALTERNATEINDEX. Important parameters are RELATE where the database cluster name is SPECIFIED. KEYS, RECORDSIZE,SHAREOPTIONS,UNIQUEKEY(or NONUNIQUEKEY) DATA(data source name for the data component), INDEX(data source name for the index component).
  2. Then issue the command DEFINE PATH. Important parameters are NAME (data source name for the path), PATHENTRY (data source name of the alternate index name), UPDATE or NOUPDATE, that specifies the DETERMINATION of alt index is updated when an update to the database cluster occurs
  3. Then issue the command BLDINDEX. Important parameters are INDATASET (data source name of base cluster), OUTDATASET(data source name of AIX).

USING alternate indexes in batch programs:

JCL, has DD statements for cluster and for paths.

For the COBOL program :

The command SELECT ASSIGN TO ddname For the base cluster RECORD KEY IS...... ALTERNATE RECORD KEY IS… used

Using alternate indexes in CICS programs:

The creation of FCT entries are mandatory for both cluster and the path

Utilize the dd name of the path in CICS file control commands, by using the alternate index

Using alternate indexes in batch programs:

JCL, has DD statements for cluster and for paths.

For the COBOL program :

The command SELECT ASSIGN TO ddname For the base cluster RECORD KEY IS...... ALTERNATE RECORD KEY IS… used

Using alternate indexes in CICS programs:

The creation of FCT entries are mandatory for both cluster and the path

Utilize the dd name of the path in CICS file control commands, by using the alternate index

11.

What Is The Syntax Of Ams Modal Commands?

Answer»

The following is the syntax of AMS modal commands:

IF LASTCC(or MAXCC) >(or <,= etc..) value - THEN - DO -

command set (like DELETE, DEFINE etc..)

ELSE - DO -

command set

where

LASTCC - Condition CODE from the LAST FUNCTION(such as delete) executed

MAXCC - Max condition code that was returned by any of the prev functions

SET is also a valid AMS command. SET LASTCC (or MAXCC) = value

PS: These can be used only under IDCAMS and not from the TSO prompt.

The following is the syntax of AMS modal commands:

command set (like DELETE, DEFINE etc..)

command set

where

LASTCC - Condition code from the last function(such as delete) executed

MAXCC - Max condition code that was returned by any of the prev functions

SET is also a valid AMS command. SET LASTCC (or MAXCC) = value

PS: These can be used only under IDCAMS and not from the TSO prompt.

12.

What Are The Different Types Of Vsam Files Available? Explain Them

Answer»

Virtual STORAGE Access Method(VSAM) is a disk storage system.

It was implemented in OS/VS2 operating system.

SUBSEQUENTLY, it was used through out the MVS architecture.

VSAM comprises of the following access methods:

ESDS: Entry Sequence Data Set

KSDS: Key Sequence Data Set

RRDS: Relative Data Set

VSAM records can be of FIXED or variable length.

These are organized in fixed size blocks, known as Control Intervals, and later into larger divisions known as Control Areas.

CI sizes are measured in terms of bytes, while CA sizes are measured in terms of disk tracks or cylinders.

ESDS : It contains the files which are interface specific and

accessed through Relative Byte Address

KSDS : It contains the files which are interface specific and accessed through a secondary index

RRDS : It contains the files which are interface specific and accessed through Relative Record Number

Each file has two objects.

  1. File object - represents the file itself. The methods of the file are used to perform
  2. DELETE,READ,REWRITE,UNLOCK,WRITE,STARTBR operations.
  3. FileBrowse object - represents a browse operations on the file and the methods are used to perform
  4. ENDBR,READNEXT,READPREV,RESETBR

Virtual Storage Access Method(VSAM) is a disk storage system.

It was implemented in OS/VS2 operating system.

Subsequently, it was used through out the MVS architecture.

VSAM comprises of the following access methods:

ESDS: Entry Sequence Data Set

KSDS: Key Sequence Data Set

RRDS: Relative Data Set

VSAM records can be of fixed or variable length.

These are organized in fixed size blocks, known as Control Intervals, and later into larger divisions known as Control Areas.

CI sizes are measured in terms of bytes, while CA sizes are measured in terms of disk tracks or cylinders.

ESDS : It contains the files which are interface specific and

accessed through Relative Byte Address

KSDS : It contains the files which are interface specific and accessed through a secondary index

RRDS : It contains the files which are interface specific and accessed through Relative Record Number

Each file has two objects.

13.

What Is File Status In Vsam?

Answer»

The File STATUS clause of the FILE-CONTROL PARAGRAPH allows for each file to be associated with a file status key (i.e., the 2-character data ITEM specified in the FILE STATUS clause). If the FILE STATUS clause is specified for a given file, a value indicating the status of each I/O OPERATION against that file is placed in the associated file status key. This value is stored in the file status key as soon as the I/O operation is completed (and before execution of any EXCEPTION/ERROR declarative or INVALID KEY/AT END phrase associated with the I/O request).

Note: This element may behave differently when the CMPR2 COMPILER option is used. The file status key is divided into two status keys: the first character is known as file status key1; the second character is file status key 2.

The File STATUS clause of the FILE-CONTROL paragraph allows for each file to be associated with a file status key (i.e., the 2-character data item specified in the FILE STATUS clause). If the FILE STATUS clause is specified for a given file, a value indicating the status of each I/O operation against that file is placed in the associated file status key. This value is stored in the file status key as soon as the I/O operation is completed (and before execution of any EXCEPTION/ERROR declarative or INVALID KEY/AT END phrase associated with the I/O request).

Note: This element may behave differently when the CMPR2 compiler option is used. The file status key is divided into two status keys: the first character is known as file status key1; the second character is file status key 2.

14.

If You Wish To Use The Rewrite Command How Must The Vsam File Be Opened?

Answer»

It MUST be OPENED as I/O.

It must be opened as I/O.

15.

What Are The Types Of Vsam Datasets?

Answer»

Entry SEQUENCED dataset (ESDS), key sequenced DATA sets (KSDS) and relative record dataset (RRDS).

Entry sequenced dataset (ESDS), key sequenced data sets (KSDS) and relative record dataset (RRDS).

16.

What How Do You Initialize A Vsam File Before Any Operation? A Vsam With Alternate Index?

Answer»

Can write a DUMMY program that just opens the FILE for output & then CLOSES it.

Can write a dummy program that just opens the file for output & then closes it.

17.

How Do You Define An Altindx ? How Do You Use Altindxs In Batch, Cics Pgms?

Answer»

DEFINE ALTERNATEINDEX. Important parameters are RELATE where you specify the base cluster name, KEYS, RECORDSIZE, SHAREOPTIONS, UNIQUEKEY (or NONUNIQUEKEY), DATA(ds name for the data component), INDEX(ds name for the index component).

Then DEFINE PATH. Important paramters are NAME (ds name for the path), PATHENTRY (ds name of the alternate index name), UPDATE(or NOUPDATE) which specifies whether an alt index is updated when a update to the base cluster takes place.

Then BLDINDEX. Parameters are INDATASET(ds name of base cluster), OUT DATASET(ds name of AIX).

Using alternate indexes in batch pgms:

In the JCL, you must have DD stmts for the cluster and for the path(s). In the COBOL pgm, SELECT .. ASSIGN TO ddname for base cluster RECORD KEY IS... ALTERNATE RECORD KEY IS..

Using alternate indexes in CICS pgms:

FCT entries must be created for both base cluster & the path. To READ using the alternate index, use the dd name of the path in CICS FILE control commands.

DEFINE ALTERNATEINDEX. Important parameters are RELATE where you specify the base cluster name, KEYS, RECORDSIZE, SHAREOPTIONS, UNIQUEKEY (or NONUNIQUEKEY), DATA(ds name for the data component), INDEX(ds name for the index component).

Then DEFINE PATH. Important paramters are NAME (ds name for the path), PATHENTRY (ds name of the alternate index name), UPDATE(or NOUPDATE) which specifies whether an alt index is updated when a update to the base cluster takes place.

Then BLDINDEX. Parameters are INDATASET(ds name of base cluster), OUT DATASET(ds name of AIX).

Using alternate indexes in batch pgms:

In the JCL, you must have DD stmts for the cluster and for the path(s). In the cobol pgm, SELECT .. ASSIGN TO ddname for base cluster RECORD KEY IS... ALTERNATE RECORD KEY IS..

Using alternate indexes in CICS pgms:

FCT entries must be created for both base cluster & the path. To read using the alternate index, use the dd name of the path in CICS file control commands.

18.

How Do You Define A Ksds?

Answer»

DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also SPECIFY the ds name for the DATA COMPONENT & the ds INDEX component. Other important parms are RECORD SIZE, KEYS, SHARE OPTIONS.

DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also specify the ds name for the DATA component & the ds INDEX component. Other important parms are RECORD SIZE, KEYS, SHARE OPTIONS.

19.

Under Idcams , Multiple Functions Can Be Executed, Each Of Which Returns A Cond Code. What Will Be The Condition Code Returned To The Operating System?

Answer»

The maximum CONDITION CODE generated is RETURNED as the condition code of the IDCAMS step.

The maximum condition code generated is returned as the condition code of the IDCAMS step.

20.

Syntax Of Ams Modal Commands?

Answer»

Note: these can be used only under IDCAMS and not from the TSO prompt.

IF LASTCC(or MAXCC) >(or <,= etc..) value - THEN - DO -

command set (such as DELETE, DEFINE etc..)

ELSE - DO -

command set

LASTCC - Condition CODE from the last function(such as delete) executed

MAXCC - Max condition code that was returned by any of the prev functions

SET is also a valid AMS command. SET LASTCC (or MAXCC) = value

The maximum condition code is 16. A cond code of 4 indicates a warning. A cond code of 8 is usually encountered on a DELETE of a DATASET that is not present.

Note: these can be used only under IDCAMS and not from the TSO prompt.

command set (such as DELETE, DEFINE etc..)

command set

LASTCC - Condition code from the last function(such as delete) executed

MAXCC - Max condition code that was returned by any of the prev functions

SET is also a valid AMS command. SET LASTCC (or MAXCC) = value

The maximum condition code is 16. A cond code of 4 indicates a warning. A cond code of 8 is usually encountered on a DELETE of a dataset that is not present.

21.

Can Ams Commands Be Run From The Tso Prompt?

Answer»

Yes

Yes

22.

During Processing Of A Vsam File, Some System Error Occurs And It Is Subsequently Unusable . What Do You Do ?

Answer»

RUN VERIFY.

Run VERIFY.

23.

Assuming That The Define Jcl Is Not Available, How Do You Get Info About A Vsam File�s Organisation ?

Answer»

USE the LISTCAT COMMAND.

Use the LISTCAT command.

24.

What More Info You Should Give In The Dd Statement While Defining The Next Generation Of A Gdg?

Answer»

Give (+1) as the GENERATION number, give (NEW,catlg) for disp, give SPACE parameter, can give the dcb parameter if you want to OVERRIDE the dcb of the model DATASET.

Give (+1) as the generation number, give (new,catlg) for disp, give space parameter, can give the dcb parameter if you want to override the dcb of the model dataset.

25.

Suppose A Generation Of Gdg Gets Created In A Particular Step Of A Proc. How Would You Refer The Current Generation In A Subsequent Step? What Would Be The Disposition Of This Generation Now?

Answer»

Relative generation numbers are UPDATED only at the end of the JOB, not at the end of a STEP. To allocate a new generation, we would be using (+1) with a DISP of (NEW,CATLG,DELETE). To refer to this in a subsequent step in the same job, we would again use (+1) but with a DISP of SHR or OLD.

Relative generation numbers are updated only at the end of the job, not at the end of a step. To allocate a new generation, we would be using (+1) with a DISP of (NEW,CATLG,DELETE). To refer to this in a subsequent step in the same job, we would again use (+1) but with a DISP of SHR or OLD.

26.

Suppose 3 Generations Of A Gdg Exist. How Would You Reference The 1 St Generation In The Jcl?

Answer»

USE GDG NAME(-2).

Use GDG name(-2).

27.

How Are Different Versions Of Gdg Named ?

Answer»

base-file-name.GnnnnnV00 where nnnn= GENERATION NUMBER (UPTO 255).

nnnn will be 0000 for the 1ST generation.

base-file-name.GnnnnnV00 where nnnn= generation number (upto 255).

nnnn will be 0000 for the 1st generation.

28.

Do All Versions Of The Gdg Have To Be Of The Same Record Length ?

Answer»

No, the DCB of the model DATASET can be overridden when you allocate NEW VERSIONS.

No, the DCB of the model dataset can be overridden when you allocate new versions.

29.

How Do You Define A Gdg ?

Answer»

Use the DEFINE GENERATIONDATAGROUP command. In the same IDCAMS step, another dataset must be defined whose DCB parameters are used when new GENERATIONS of the GDG are created. This dataset is known as the MODEL dataset. The ds name of this model dataset must be the same as that of the GDG, so use a DISP of keep rather than catlg and also specify space=(trk,0)

Use the DEFINE GENERATIONDATAGROUP command. In the same IDCAMS step, another dataset must be defined whose DCB parameters are used when new generations of the GDG are created. This dataset is known as the model dataset. The ds name of this model dataset must be the same as that of the GDG, so use a disp of keep rather than catlg and also specify space=(trk,0)

30.

How Do You Load A Vsam Data Set With Records ?

Answer»

USING the REPRO COMMAND.

Using the REPRO command.

31.

What Is The Difference Between Sequential Files And Esds Files?

Answer»

Sequential(QSAM) FILES can be CREATED on TAPE while ESDS files cannot.

Also, you can have ALTINDEX for an ESDS while no such FACILITY exists for QSAM files.

Sequential(QSAM) files can be created on tape while ESDS files cannot.

Also, you can have ALTINDEX for an ESDS while no such facility exists for QSAM files.

32.

How Do You Calculate Record Size Of An Alternate Cluster? Give Your Values For Both Unique And Non-unique.

Answer»

Unique Case: 5 + ( alt-key-length + primary-key )
NONUNIQUE Case: 5 + ( alt-key-length + n * primary-key )
where n = # of DUPLICATE records for the alternate key
????Any ONE who KNOWS - can you EXPLAIN ?

Unique Case: 5 + ( alt-key-length + primary-key )
Nonunique Case: 5 + ( alt-key-length + n * primary-key )
where n = # of duplicate records for the alternate key
????Any one who knows - can you explain ?

33.

What Does A File Status Of 02 On A Vsam Indicate?

Answer»

DUPLICATE ALTERNATE key . Happens on both input and OUTPUT OPERATION

Duplicate alternate key . Happens on both input and output operation

34.

How Do You Initialize A Vsam File Before Any Operation? A Vsam With Alternate Index?

Answer»

Can write a dummy program that just opens the FILE for output &AMP; then CLOSES it.

Can write a dummy program that just opens the file for output & then closes it.

35.

What Happens When You Open An Empty Vsam File In A Cobol Program For Input?

Answer»

A VSAM file that has NEVER contained a record is treated as UNAVAILABLE. Attempting to open for input will fail. An empty file can be OPENED for output only. When you open for output, COBOL will WRITE a dummy record to the file & then delete it out.

A VSAM file that has never contained a record is treated as unavailable. Attempting to open for input will fail. An empty file can be opened for output only. When you open for output, COBOL will write a dummy record to the file & then delete it out.

36.

How Do You Define An Altindx ? How Do You Use Altindxs In Batch, Cics Pgms ?

Answer»

DEFINE ALTERNATEINDEX. Important paramters are RELATE where you specify the base cluster NAME, KEYS, RECORDSIZE, SHAREOPTIONS,UNIQUEKEY(or NONUNIQUEKEY), DATA(ds name for the data component), INDEX(ds name for the index component).

Then DEFINE PATH. Important paramters are NAME (ds name for the path), PATHENTRY (ds name of the alternate index name), UPDATE(or NOUPDATE) which specifies whether an alt index is updated when a update to the base cluster takes place.

Then BLDINDEX. Parameters are INDATASET(ds name of base cluster), OUTDATASET(ds name of AIX).

Using alternate indexes in batch pgms:

In the JCL, you MUST have DD stmts for the cluster and for the path(s). In the cobol pgm, SELECT .. ASSIGN TO ddname for base cluster RECORD KEY IS... ALTERNATE RECORD KEY IS..

Using alternate indexes in CICS pgms:

FCT entries must be created for both base cluster & the path. To READ using the alternate index, use the dd name of the path in CICS file control commands.

DEFINE ALTERNATEINDEX. Important paramters are RELATE where you specify the base cluster name, KEYS, RECORDSIZE, SHAREOPTIONS,UNIQUEKEY(or NONUNIQUEKEY), DATA(ds name for the data component), INDEX(ds name for the index component).

Then DEFINE PATH. Important paramters are NAME (ds name for the path), PATHENTRY (ds name of the alternate index name), UPDATE(or NOUPDATE) which specifies whether an alt index is updated when a update to the base cluster takes place.

Then BLDINDEX. Parameters are INDATASET(ds name of base cluster), OUTDATASET(ds name of AIX).

Using alternate indexes in batch pgms:

In the JCL, you must have DD stmts for the cluster and for the path(s). In the cobol pgm, SELECT .. ASSIGN TO ddname for base cluster RECORD KEY IS... ALTERNATE RECORD KEY IS..

Using alternate indexes in CICS pgms:

FCT entries must be created for both base cluster & the path. To read using the alternate index, use the dd name of the path in CICS file control commands.

37.

How Do You Define A Ksds ?

Answer»

DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also specify the ds name for the DATA component &AMP; the ds INDEX component. Other IMPORTANT parms are RECORDSIZE, KEYS, SHARE OPTIONS.

DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also specify the ds name for the DATA component & the ds INDEX component. Other important parms are RECORDSIZE, KEYS, SHARE OPTIONS.

38.

What Is The Meaning Of Each Of The Values In Shareopts(2 3)?

Answer»

Value of 2 for cross region means that the file can be PROCESSED SIMULTANEOUSLY by MULTIPLE users provided only one of them is an updater. Value of 3 for cross system means that any number of jobs can process the file for input or output (VSAM does nothing to ensure INTEGRITY).

Value of 2 for cross region means that the file can be processed simultaneously by multiple users provided only one of them is an updater. Value of 3 for cross system means that any number of jobs can process the file for input or output (VSAM does nothing to ensure integrity).

39.

What Is Shareopts ?

Answer»

SHAREOPTS is a parameter in the DEFINE and specifies how an object can be shared AMONG users. It is coded as SHAREOPTS(a b), where a is the cross region SHARE option ie how two or more jobs on a single SYSTEM can share the file, while b is the cross system share option ie how two or more jobs on different MVSes can share the file. Usual value is (2 3).

SHAREOPTS is a parameter in the DEFINE and specifies how an object can be shared among users. It is coded as SHAREOPTS(a b), where a is the cross region share option ie how two or more jobs on a single system can share the file, while b is the cross system share option ie how two or more jobs on different MVSes can share the file. Usual value is (2 3).

40.

How Do You Decide On Optimum Values For Ci, Freespace Etc..?

Answer»

CI size should be based on record length, type of processing. Usually CI is 4K. If record length is LARGER(>1K), choose 6K or 8K.

FREE SPACE should be large if more number of insertions are ENVISAGED. Usual values are (20 20) when heavy UPDATES are EXPECTED. CI size can be calculated.

CI size should be based on record length, type of processing. Usually CI is 4K. If record length is larger(>1K), choose 6K or 8K.

FREE SPACE should be large if more number of insertions are envisaged. Usual values are (20 20) when heavy updates are expected. CI size can be calculated.

41.

What Is Freespace ?

Answer»

CODED in the DEFINE as FREESPACE(CI CA) where ci is the percentage of each control interval to be left free for insertions, ca is the percentage of control intervals in each control area to be left empty.

Coded in the DEFINE as FREESPACE(ci ca) where ci is the percentage of each control interval to be left free for insertions, ca is the percentage of control intervals in each control area to be left empty.

42.

What Is Control Interval, Control Area ?

Answer»

Control Interval is analogous to a PHYSICAL block for QSAM files. It is the unit of i/o. Must be between 512 bytes to 32 K. Usually EITHER 2K or 4K. A larger control interval increases PERFORMANCE for sequential processing while the reverse is true for random access. Under CICS when a record is locked, the entire CI gets locked.

Control area is a group of control intervals. CA is used during allocation. CA size is calculated BASED on the allocation type (cyl, tracks or records) and can be max of 1 cylinder

Control Interval is analogous to a physical block for QSAM files. It is the unit of i/o. Must be between 512 bytes to 32 k. Usually either 2K or 4K. A larger control interval increases performance for sequential processing while the reverse is true for random access. Under CICS when a record is locked, the entire CI gets locked.

Control area is a group of control intervals. CA is used during allocation. CA size is calculated based on the allocation type (cyl, tracks or records) and can be max of 1 cylinder

43.

Under Idcams , Multiple Functions Can Be Executed, Each Of Which Returns A Cond Code. What Will Be The Condition Code Returned To The Operating System ?

Answer»

The MAXIMUM condition code GENERATED is RETURNED as the condition code of the IDCAMS step.

The maximum condition code generated is returned as the condition code of the IDCAMS step.

44.

Syntax Of Ams Modal Commands ?

Answer»

Note: these can be used only under IDCAMS and not from the TSO prompt.

IF LASTCC(or MAXCC) >(or &LT;,= etc..) value - THEN - DO -

command set (such as DELETE, DEFINE etc..)

ELSE - DO -

command set

LASTCC - Condition code from the last FUNCTION(such as delete) executed

MAXCC - Max condition code that was returned by any of the prev functions

SET is also a VALID AMS command. SET LASTCC (or MAXCC) = value

The maximum condition code is 16. A cond code of 4 indicates a warning. A cond code of 8 is usually encountered on a DELETE of a DATASET that is not PRESENT.

Note: these can be used only under IDCAMS and not from the TSO prompt.

command set (such as DELETE, DEFINE etc..)

command set

LASTCC - Condition code from the last function(such as delete) executed

MAXCC - Max condition code that was returned by any of the prev functions

SET is also a valid AMS command. SET LASTCC (or MAXCC) = value

The maximum condition code is 16. A cond code of 4 indicates a warning. A cond code of 8 is usually encountered on a DELETE of a dataset that is not present.

45.

Can Ams Commands Be Run From The Tso Prompt ?

Answer»

Yes

Yes

46.

What Is Idcams ?

Answer»

IDCAMS is the Access Method Services PROGRAM. You run the IDCAMS program and SUPPLY AMS COMMANDS thru SYSIN. (examples of AMS commands are DELETE, DEFINE, REPRO etc..).

IDCAMS is the Access Method Services program. You run the IDCAMS program and supply AMS commands thru SYSIN. (examples of AMS commands are DELETE, DEFINE, REPRO etc..).

47.

What Is Buffering And How Does It Apply To Vsam Files ?

Answer»

When large blocks of data are used, more main storage is required than when smaller blocks are used, but large blocks save CPU time and disk space. ADDITIONALLY, extra buffers may save ELAPSED time since the program does not have to wait for an I/O to complete for it to CONTINUE processing.

In the JCL, you specify BUFNI (number of index buffers) and BUFND (number of data buffers) as sub parameters of the AMP parameter.

For random access, the BUFNI is one more than the number of index levels and a BUFND of 2 is FINE.

For SEQUENTIAL access, a BUFNI of 1 and a minimum of 5 for BUFND is fine.

For dynamic access, the values of each is the higher of the numbers for either random or sequential.

When large blocks of data are used, more main storage is required than when smaller blocks are used, but large blocks save CPU time and disk space. Additionally, extra buffers may save elapsed time since the program does not have to wait for an I/O to complete for it to continue processing.

In the JCL, you specify BUFNI (number of index buffers) and BUFND (number of data buffers) as sub parameters of the AMP parameter.

For random access, the BUFNI is one more than the number of index levels and a BUFND of 2 is fine.

For sequential access, a BUFNI of 1 and a minimum of 5 for BUFND is fine.

For dynamic access, the values of each is the higher of the numbers for either random or sequential.

48.

Name A Few Common Vsam Status Codes?

Answer»

00-OK
02-READ a DUPLICATE ALTERNATE key
10-end of file reached while doing a READ
22-trying to WRITE a duplicate primary key
23-record not found while doing a READ
97-file integrity VERIFIED, do an IDCAMS VERIFY

00-OK
02-READ a duplicate alternate key
10-end of file reached while doing a READ
22-trying to WRITE a duplicate primary key
23-record not found while doing a READ
97-file integrity verified, do an IDCAMS VERIFY

49.

What Parameter In The Define Aix Option Is Used To Determine The Maximum Number Of Duplicate Keys Allowable ?

Answer»

The RECORDSIZE parameter. There are 2 NUMBERS that follow this: the 1st is the average and the 2nd is the maximum. The values are equal to 5 + (CLUSTER KEY LENGTH) + N*(alternate key length), where N is the allowable number of DUPLICATES.

The RECORDSIZE parameter. There are 2 numbers that follow this: the 1st is the average and the 2nd is the maximum. The values are equal to 5 + (cluster key length) + N*(alternate key length), where N is the allowable number of duplicates.

50.

How Do You Create An Alternate Index ?

Answer»

You USE the IDCAMS UTILITY with the DEFINE AIX option after you build the cluster and then do another IDCAMS with the BLDINDEX option to populate the alternate index.

You use the IDCAMS utility with the DEFINE AIX option after you build the cluster and then do another IDCAMS with the BLDINDEX option to populate the alternate index.