MVS QUESTIONS


  1. What is Mainframe ?
  2. What is System SW and Application SW?
  3. Clasify IBM’s Operating Systems
  4. What is Virtual Machine?
  5. What are the classification of MVS
  6. What is MVS/ESA ?
  7. What are the specialities of MVS/370 System?
  8. What are the 3 type of Memory available?
  9. What are the two type of Secondary Storage device?
  10. What is Channel?
  11. What are main characteristics of mainframe computers?
  12. What is Virtual Storage?
  13. What is Multiprogramming?
  14. What is Spooling?
  15. What is Batch Processing?
  16. What is Time Sharing?
  17. What is Logical Transfer and Physical Transfer of data?
  18. What is Direct and Indirect method of data transfer?
  19. What is Paging System?
  20. What is Swapping System?
  21. What is Fore-ground processing and Back-ground processing?
  22. What is meant Volume?
  23. What is meant by Unit?
  24. What is meant by Disk?
  25. What is meant by Tracks?
  26. What is meant by Cylinder?
  27. What is meant by DASD?
  28. What is DATASET?
  29. What is Label? What are the 2 types of labels?
  30. What is DASD Lable and what are the 2 types of DASD Lable.
  31. What is Tape Label?
  32. What is Volume Label?
  33. What is File Label?

  1. What is meant by VTOC and DSCB?
  2. What is CATALOG?
  3. What are the 2 types of CATALOGS?
  4. What is Master Catalog?
  5. What is User Catalog?
  6. Are 2 Master Catalogs available in one system?
  7. What is OS Catalog?
  8. What is VSAM Catalog?
  9. What is ICF?
  10. What is VDDS / SDDS?
  11. What is SYSADM?
  12. what are the DATA SET Organisation types available?
  13. What is Non-VSAM?
  14. What is VSAM ?
  15. What is PS,IS,DA and PDS?
  16. What are types dataset available in VSAM?
  17. What is EDS,KSDS,RRDS and LDS?
  18. What is AMS (Access Method Service)? Explain its 3 steps.

JCL QUESTIONS

  1. What is JCL?
  2. Difference between JCL and COBOL-II
  3. What is JOB?
  4. What is PROC?
  5. What are the difference between JOB and PROC?
  6. List all JCL statements
  7. What is EXEC statement?
  8. What is DD statement?
  9. What is meant by // and /* and //*
  10. What is PROC and PEND statement?
  11. What is OUTPUT statement?
  12. How many EXEC statement allowed in a single JCL? (255)
  13. How many DD statement allowed in a single JCL? (3273)
  14. Explain JCL coding format
  15. What is Parameter? Tell its 2 types.
  16. What is POSITIONAL PARAMETER?
  17. What is KEYWORD PARAMETER?
  18. What is JOBNAMEs? Explain its rules.
  19. What is 2 parts of POSITIONAL PARAMETER?
  20. Explain Accounting Information in POSITIONAL PARAMETER
  21. Explain Programmer Information in POSITIONAL PARAMETER
  22. What is KEYWORD PARAMETER? How do u find it ? (By = sign)
  23. What is CLASS Parameter?
  24. What is PRTY Parameter?
  25. What is MSGCLASS Parameter?
  26. What is MSGLEVEL Parameter?
  27. Explain MSGLEVEL(0,1), MSGLEVEL(0,2), MSGLEVEL(1,1),

MSGLEVEL(1,2), MSGLEVEL(2,1),MSGLEVEL(2,2).

  1. What is COND Parameter?
  2. What is meant by Return code?
  3. RC=0, RC=8 , RC>8 , RC=3000 explain it
  4. What is the range of the RC (0-4095)
  5. Explain TIME Parameter

  1. How do terminate a job? (3 methods COND, // , TIME)
  2. Explain RESTART Parameter
  3. Explain TYPERUN Parameter
  4. What is HOLD and SCAN ?
  5. Explain ADDRSPC Parameter
  6. What is REAL and VIRT? (Default is VIRT)
  7. Explain REGION Parameter
  8. Explain NOTIFY Parameter
  9. List all JOB Parameters.
  10. What is EXEC Statement? How many EXEC statement allowed in a JCL?
  11. What is PGM, PROC, PARM, COND and TIME Parameters?
  12. Explain ONLY / EVEN in COND Parameter.
  13. What is the difference between JOB COND and EXEC COND parameters?
  14. What us PARM Parameter? Can u explain it with a COBOL Program?
  15. What is DD Stands for?
  16. Explain the DD statement rules
  17. What is the difference between DD Statement and PARM statement (3 points)
  18. What is the difference between DD * , DD Data and DUMMY statement.
  19. What is DLM? Can we use // or /* in DLM statement?
  20. What is meant by DSN?
  21. What is DISP? What are its parameters? (D1,D2.D3)
  22. Explain about NEW, OLD, SHR and MOD.
  23. Explain about KEEP, DELETE, PASS, CATLG and UNCATLG.
  24. Explain about third parameter in DISP Parameter. (D3)
  25. What is UNIT ? Explain its parameters.
  26. What is VOL? Explain its parameters
  27. What is LABEL Parameters?
  28. What is SPACE Parameters?
  29. What is Load Data Set?
  30. What is JOBLIB?
  31. What is STEPLIB?
  32. What is the difference between JOBLIB and STEPLIB?
  33. What is SYSIN and SYSOUT?
  34. What is OCB. Explain its 5 parameters

  1. What is LRECL. Explain it with COBOL statement.
  2. What is BLKSIZE. Explain it with COBOL statement.
  3. What is RECFM. Explain it with COBOL statement.
  4. What is DSORG. Explain it with COBOL statement.
  5. What is EROPT. Explain it with COBOL statement.
  6. What is V, F, U, VB, VF, VBA and FBA?
  7. What is PROCEDURE? What are its 2 types?
  8. What is Instream procedure?
  9. What is catalog procedure?
  10. Explain the coding rules for a Procedure? (4 points)
  11. Explain the coding rules for a Instream Procedure.(4 points)
  12. What is IIP, DIP, ICP, DCP and IAP?
  13. How many types of Parameters are in Procedure.
  14. What is Symbolic Parameters?
  15. What is Overriding Parameter?
  16. Explain filecopy method in Mainframe
  17. What is meant by JCL Utilities?
  18. What are the rules for JCL Utilities?
  19. What is IEBGENER?
  20. What is IEBCOPY?
  21. What is IEBPTPCH?
  22. How do u copy all members from one DSN to other DSN?
  23. How do u copy a particular members from one DSN to other DSN?
  24. How do u copy other than selected members from one DSN to other DSN?
  25. What is meant by System Utilities?
  26. What is IEHPROGM?
  27. What are the rules for System Utilities?
  28. Explain RENAME, NEWNAME, UNCATLG, CATLG and DELETE
  29. What are the differece between System Utilities and JCL Utilities
  30. Explain about Other Utilities?
  31. Explain SORT Utility
  32. Explain SORT FIELDS parameter.
  33. Explain if SORT Parameter CH has the value BI or X or PD or ZD or AC or CH.

PRACTICAL QUESTIONS (JCL)

  1. Create a PDS and 5 Memebers
  2. Create a PS and 5 members
  3. Write COBOL program for Addtion of 2 numbers (ADDPRG)
  4. Write COBOL program for subtraction of 2 numbers (SUB PRG)
  5. Write COBOL program for multiplication of 2 numbers (MULPRG)
  6. Write COBOL program for division of 2 numbers (DIVPRG)
  7. Write a JCL program to excute ADDPRG using DD *
  8. Write a JCL program to excute ADDPRG using DD Dummy..
  9. Write a JCL program to excute ADDPRG,SUBPRG,MULPRG and DIVPRG.
  10. Write a JCL prgram to set TIME for above program and watch.
  11. Write a JCL program to create a PS
  12. Write a JCL program to create a PDS.
  13. Write a JCL catalog procedure for ADDPRG and call it from other JCL program.
  14. Write a JCL instream procedure for ADDPRG and call it.
  15. Write a JCL procedure with Symbolic Parameter.
  16. Write a JCL procedure with Overriding Parameter
  17. Write a COBOL Program to copy records from one file to other file.

18. Write a JCL program to copy data from PS to PS using IEBGENER.

19. Write a JCL program to copy all data from PDS to PDS using IEBCOPY.

20. Write a JCL program to copy selected data from PDS to PDS using IEBCOPY.

21. Write a JCL program to copy other than selected data from PDS to PDS using IEBCOPY.

22. Write a JCL program to print all data from PS using IEBPTPCH

23. Write a JCL program to Rename a Dataset using IEHPROGM

24. Write a JCL program to Delete a Dataset using IEHPROGM

25. Write a JCL program to Catalog a Dataset using IEHPROGM

26. Write a JCL program to Un-Catalog a Dataset using IEHPROGM

27. Write a JCL program to sort records in Ascending order using SORT

28. Write a JCL program to sort records in Descending order using SORT

29. Write a JCL program to sort records with atleast 2 fields order using SORT

VSAM Faq's

Question: help i need information about files none vsam direct

Answer: i dont the answer

Question: How do you fix the problem associated with VSAM out of space condition?

Answer: 1. Define new VSAM dataset allocated with more space. 2. Use IDCAMS to REPRO the old VSAM file to new VSAM dataset. 3. Use IDCAMS to ALTER / rename the old VSAM dataset or se IDCAMS to DELETE the old VSAM dataset. 4. Use IDCAMS to ALTER / rename the new VSAM dataset to the name of the original VSAM dataset.

Question: What is the meaning of VSAM RETURN-CODE 28?

Answer: Out of space condition is raised.

Question: Correction to the previous question - Yor can have ALT INDEX only on KSDS and ESDS - not RRDS.

Answer: See the question for correction - you cannot have ALT INDEX for RRDS.

Question: How amny Alternate Indexes you can have on a dataset? - Remember ALT INDEX is possibleonly on KSDS and RRDS.

Answer: 255 - but you must be a nut to have so many ALT Indexes on a dataset!

Question: Is it slower if you access a record through ALT INDEX as compared to Primary INDEX?

Answer: Yes. Why? Because the alternate key would first locate the primary key, which in turn locates the actual record. Needs twice the number of I/Os.

Question: What is RECOVERY and SPEED parameters in DEFINE CLUSTER command?

Answer: RECOVERY (default) and SPEED are mutulally exclusive. Recovery preformats the control areas during the initial dataset load, if the job fails, you can restart but you must have a recovery routine already written to restart the job. SPEED does not preformat the CAs. It is recommended that you specify SPEED to speed up your initial data load.

Question: describe SHAREOPTIONS parameter (SHR) in Define Cluster command.

Answer: It defines the cross-region and cross-system sharing capabilities of the dataset. Syntax is SHR(CRvalue CSvalue) value 1 means multiple read OR single write (read integrity) 2 means multiple read AND single write (Write integrity) 3 means Multiple read AND multiple write 4 is same as 3, which refreshes the buffer with every random access. default is SHR(1 3).

Question: What does the KEYRANGES parmater in Define Cluster commend do?

Answer: It divides a large dataset into several volumes accoring to the Keyranges specified. e.g., KEYRANGES ((0000001 2999999) (3000000 5999999)). if the activity on the key ranges are evenly distributed, cuncurrent access is possible, which is a performance improvement.

Question: What are the optional parameters to the input dataset While loading the empty cluster with the data records?

Answer: 1)FROMADDRESS(address) 2)TOADDRESS(address) where 'address' specifies the RBA value of the key of the input record. 3)FROMNUMBER(rrn) 4)TONUMBER(rrn) where 'rrn' specifies the relative record number of the RRDS record 5)FROMKEY(key) 6)TOKEY(key) where 'key' specifies the key of the input record 7)SKIP(number) 8)COUNT(number) where 'number' specifies the number of records to skip or copy Ex: REPRO INFILE(DD1) OUTFILE(DD2) SKIP(9000) COUNT(700) - Skips the first 9000 records and begins copying at 9001 and copies 700 records from DD1 to DD2.

Question: What is GDG means in VSAM???

Answer: Generation Data Group

Question: What is GDG means in VSAM???

Answer: I don't know

Question: What is IDCAMS? and what is the purpose of it?.

Answer: IDCAMS is an access method services utility used for creating, deleting, altering VSAM files and copying sequential file to a VSAM file, etc.

Question: How to delete a member using JCL.

Answer: Using IDCAMS a member can be deleted. DELETE 'XXX.YYY(member)

Question: What is the Difference between LDS & ESDS ?

Answer: These two datesets are VSAM datasets. ESDS maintains control information. But LDS does not maintains the control information.

Question: A. Is a delete operation possible in an ESDS?B.Is rewrite operation possible in ESDS ?

Answer: A. No delete operation is not possible in VSAM ESDS.B. Yes rewrite operation is possible in an ESDS.

Question: What is an alternet index and path ?

Answer: An alternet index is an another way of accessing key sequenced data record stored in a base cluster and path is the linkage which connect alternet index to its base cluster.

Question: How many buffers are alloted to VSAM KSDS and ESDS?

Answer: Ans:2 data buffers by default for ESDS.for KSDS it allots 2 data buffers and 1 index buffers. each buffer is about 4k.

Question: what's the biggest disadvantage of using a VSAM dataset?

Answer: FREE SPACE(FPSC)

Question: what's the device independent method to indicate where a Record is Stored?

Answer: The answer is : By USING RBA(Relative Byte Address).

Question: Q: HOW MANY TIMES SECONDARY SPACE ALLOCATED?

Answer: A: 122 TIMES

Question: what is the RRN for the first record in RRDS?

Answer: The answer is : 1

Question: what is a Base Cluser?

Answer: The Index and data components of a KSDS

Question: If fspc(100 100) is specified does it mean that both the control interval and control area will be left empty because 100 % of both ci and ca are specified to be empty?

Answer: no,they would not be left empty.one record will be written in each ci and 1 ci will be written for each ca.

DB2 Faq's

Question: How do you debug a DB2 STORED PROCEDURE

Answer: I want someone to answer it.

Question: maxx number of columns in a db2 table

Answer: 224

Question: What is RUNSTATS command in DB2?

Answer: .

Question: Question: Question: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

Answer: The query SELECT * FROM SYSIBM.SYSTABLES WHERE CREATOR = 'owner id' This displays the table names with that If you want only the number of tables give the following query. SELECT COUNT(*) FROM SYSIBM.SYSTABLES WHERE CREATOR = 'owner id' Make sure that you are in correct subsystem.

Question: Question: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

Answer: The query SELECT * FROM SYSTABLES WHERE OWNER= should work.

Question: Question: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

Answer: Answer to Ravi's query: Db2 records information for its operation in a catalog which is actually a group of tables. So we can use the SYSTABLES to get answer to ur query. So

Question: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

Answer: Can any one give me the answer for this?

Question: I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

Answer: Can any one give me the answer for this?

Question: What is JOIN and different types of JOIN.

Answer: The ability to join rows and combaine data from two or more tables is one of the most powerful features of relational system.Three type of joins:1. Equi-join2.Non-equijoin3.self-join

Question: can I alter a table (e.g. adding a column) when other user is selecting some columns or updating some columns from the same table?

Answer: yes possible. until the updation or selection is commited db2 table will not be restructured. new column definition will be there but it will not be included until all the tasks on the table are commited.

Question: How many subqueries can you combine together ?

Answer: Total 16 queries and subqueries are 15

Question: A. What are the different methods of accessing db2 from tso?B.How is the connection established between TSO & DB2?

Answer: A. There are three ways in establishing tso/db2 connection 1. SPUFI 2. QMF 3. CATALOG VISIBILITY B. A thread between TSO & DB2 is established while attempting to make connection between tso & db2.

Question: How many buffer bools are available in db2?

Answer: ten 32k size bufferpools and fifty 4k size buffer pools (bp0 to bp49)default buffer pools are bp0,bp1,bp2 & bp32

Question: b37 abend during spufi

Answer: the b37 abend in the spufi is because of space requirements , the query has resulted in so many rows that the spufi.out file is not large enough to handle it, increase the space allocation of spufi.out file.

Question: How many Bufferpools are there in DB2 and what are they?

Answer: There are 4 Bufferpools.They are BP0,BP1,BP2 and BP32.

Question: What is the command used by TSO users to invoke DB2?

Answer: DSN RUN

Question: what is the error code -803 ?

Answer: unique index violation

Question: How do you install DB2

Answer: Install DB2 according to the procedure fo the manual

Question: how do you filter out the rows retrieved from a Db2 table ?

Answer: one way is to use The Sql WHERE clause.

Question: what is a collection?

Answer: A collection is something that every programmer should assign/Specify for every package. this about 1-18 characters long.

Question: What is Skeleton cursor table (SKCT)?

Answer: The Executable form of a Plan. This is stored in sysibm.sct02 table.

Question: what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current SQLID register contain?

Answer: Pic s9(x-y)V9(Y) Comp-3; the current SQLID contains the current authorization ID.

Question: Can we declare DB2 HOST variable in COBOL COPY book?

Answer: NO.If we declare DB2 host variable in COBOL COPY book, at the time of Pre-compilation we get the host variable not defined, because pre-compiler will not expand COBOL COPY book. So we declare it either in DCLGEN with EXEC SQL INCLUDE Dclgenname END-EXEC or we directly hardcode it in the working storage section.

Question: What should be specified along with a cursor in order to continue updating process after commit?

Answer: With Hold option.

Question: WHAT IS THE NAME OF THE DEFAULT db2 CATALOG DATABASE?

Answer: DSNDB06

Question: When Can you be sure that a query will return only one row?

Answer: When you use the primary key and only the primary key in the where clause.

Question: what is the difference between join and union?

Answer: join is used to retrive data from different tables using a single sql statement.union is used to combine the results of two or more sql querries.

Question: What is a corelated subquerry?

Answer: In a subquerry, if the outer querry reffers back to the outcome of innerquerry it is called corelated subquerry. That's why the outer querry is evaluated first unlike an ordinary subquerry

Question: What are the functions of Bind?

Answer: BIND mainly performs two things syntax checking and authorization checking.It binds together all packages into an application plan hence the name BIND.Apart from this bind has optimiser as a subcomponent.Its function is to determine the optimum access strategy.

Question: MAX. NO OF ROWS PER PAGE

Answer: 127

Question: The only place of VSAM KSDS in DB2 is?

Answer: BSDS is a VSAM KSDS.

Question: CAN ALL USERS HAVE THE PRIVILAGE TO USE THE SQL STATEMENT SELECT * (DML)?

Answer: NO THE USER SHOULD BE GRANTED PRIVILAGE TO USE IT.

Question: What is the size of a data page?

Answer: 4K to 8K

Question: what's the best locksize that you could use when you create a tablespace?

Answer: The answer is Locksize = ANY.Unless you are Sure what's the Purpose of tablespace ie.,Read-only or R/W.If you use lock size =any, Db2 would automatically determine what type of locks it should use.

Question: what's the error code for Unique Index Voilation:

Answer: -803

Question: what's the percentage free space for

Answer: ZERO

Question: Can you define an Index if the table size less than 10 PAGES?

Answer: the Answer is : NO

Question: What's the Maximum Length of SQLCA and what's the content of SQLCABC?

Answer: The Max length is 136. and the SQLCABC has the Value of SQLCA.

Question: what's the percentage free space for

Answer: The answer is ZERO.

Question: What's the maximum number of volumes that can be added to a STOGROUP?

Answer: The answer is 133.Usually it will be difficult monitor more than 3 or 4 volumes to a Stogroup.

Question: What's the maximum number of characters that a tablename can have?

Answer: The answer is 18 characters.

Question: What is the meaning of -805 sql return code?

Answer: Program name not in plan. Bind the plan and include the DBRM for the program named as part of the plan.

Question: when does the sql statement gets executed when you use cursor in the application programming ?

Answer: sql statement gets executed when we open cursor

Question: What does CURRENTDATA option in bind indicate

Answer: CURRENTDATA option ensures block fetch while selecting rows from a table. In DB2V4 the default has been changed to NO. Therefore it is necessary to change all the bind cards with CURRENTDATA(YES) which is default in DB2V3 & earlier to CURRENTDATA(NO).

Question: What is the difference between TYPE 1 index & TYPE 2 index

Answer: TYPE 1 & TYPE 2 are specified when an index is created on the table. TYPE 2 index is the option which comes with DB2V4. With TYPE 2 index data can be retreived faster as only the data pages are locked and not the index pages. Hence TYPE 2 index is recommended.

Question: What are the levels of isolation available with DB2V4

Answer: CS RR UR( added new for DB2V4 which stands for uncommited read which allows to retreive records from the space which has exclusive locks also but data integrity will be affected if this option is used )The best available option for data integrity & data concurrency is CS.

Question: How do you achieve record locking in DB2 in the versions which donot support record level locking?

Answer: Y'day I had posted this que. The answer shud hv read as follows:By having the record length more than half of the page size !Sorry again& Thanx

Question: How do u achieve record level locking in DB2 versions when record level locking is not allowed?

Answer: By having the length of the record greater than that of a page!

Question: In a DB2-CICS program which is acts as co-ordinator and which is participant?

Answer: DB2 - participant CICS- coordinator

Question: What does DML stand for and what are some examples of it?

Answer: Data Manipulation Language. Some examples are SELECT, INSERT, DELETE, REPLACE.

Question: How to define the dataitems to receive the fetch items for the SQL?

Answer: Using the DSECT, followed by lines of - 'dataitems DS datatype'.

Question: Re:How will you delete duplicate records from a table?

Answer: Delete From Table1Where Id In (Select Id From Tabel1 As Temp Group By Id Having Count(*) >1)

Question: What is the difference between Where and Having Clause

Answer: WHERE is for Rows and HAVING is for Groups

Question: How to see the structure of db2 table??

Answer: Using QMF.

Question: How do you declare a host variable (in COBOL) for an attribute named EMP-NAME of type VARCHAR(25) ?

Answer: 01 EMP-GRP. 49 E-LEN PIC S9(4) COMP. 49 E-NAME PIC X(25).

Question: What is the maximum number of tables that can be stored on a Partitioned Table Space ?

Answer: ONE

Question: Name the different types of Table spaces.

Answer: 1. Simple Table Space2. Segmented Table Space and3. Partitioned Table Space

Question: what are the max. & min. no. of partitions allowed in a partition tablespace?

Answer: minimum is 4.maximum is 64.

Question: what is the maximum number of tables that can be joined ?

Answer: fifteen

Question: What technique is used to retrieve data from more than one table in a single SQL statement?

Answer: The Join statement combines data from more that two tables

Question: What is a foreign key?

Answer: It identifies a releated row in another table and establishes a logical relationship between rows in two tables.

Question: Explain the use of the WHERE clause.

Answer: It directs DB2 to extract data from rows where the value of the column is the same as the current value of the host variable.