大型机(mainframe)复习题库

2009年03月16日  |  9:33 上午分类:大型机|Mainframe  |  标签:  |  

大型机复习题库

1) what’s mainframe?

Mainframes systems are designed for large amounts of data in many different and interconnected ways.

Mainframe is a machine that runs a mainframe operating system. In the IBM world, this operating system is z/OS, OS/390, MVS/ESA, VM/ESA and VSE/ESA.

2) what’s the advantage of mainframe?
Reliability(可靠性),recoverability,redundancy(冗余),safty,connectivity,concurrency

3) what’s OS/390?
OS/390 is a new, integrated(完整的) enterprise server operating system environment. It incorporates(合并) into one product a leading-edge and open communication server, distributed (分布式的)data and file services, parallel sysplex(系统综合体) support, object-oriented programming, DCE and open application interfaces.

4) what’s the OS390′S elements ?
DFSMS,SDSF,TSO,ISPF,DITTO,NETVIEW,SDFII,VTAM,JES2,RACF etc…

5) what’s the sysplex?

SYSPLEX is a collection of MVS systems that cooperate(合幷), using certain hardware and software products, to process work.

6) how many type physical storage are there in mainframe?
Central Storage (Main Storage)
Expanded Storage
Auxiliary Storage

7) what’s jes2?
A job entry subsystem (JES) is responsible for managing jobs in an OS/390 system.

8) what’s job process stage?

Input
Conversion
Execution
Output
Hardcopy
Purge

9) what’s catalog in mainfram?
Master catalog is the catalog that lists all the user catalogs, system datasets and their locations.
User catalog is the catalog that can be accessed and changed by users. It holds the user datasets.
There are one, and only one, master catalog.
The search order of catalog is:
STEP CAT in job
JOB CAT in job
Aliases(别名) in User CAT
Master catalog

10) How many type are There several types of DUMP?
SYMPTOM DUMP
SNAP DUMP
SYSDUMP
SYSMDUMP
SVCDUMP
STAND-ALONE DUMP

11)what’s ISPF?
ISPF (Interactive System Productivity Facility) is PDF (Program Development Facility)’s prerequisite(首先必备的) licensed program. ISPF must be installed either before or during the installation of PDF.

12) What is JCL ?
JCL stands for Job Control Language, JCL is a set of control statement that provide the specification necessary to process a job.

13) What is the difference between keyword and positional parameters ?
Positional parameters are characterized(表現特色) by their position in the operand(操作數) field in relation to other parameters.
Keyword parameters are positionally independent with respect to others of their type and consisting of a keyword followed by an equal sign and variable information.

14) What is a DISP ?
DISP is a keyword parameter which is defined on the DD statement and which consist of the following positional subparameters: DISP=(Status, Normal Disp, Abnormal Disp). The DISP parameter describes the current status of the dataset (old, new, or modified) and directs(指示) the system on the disposition(部署) of the data set (pass, keep, catalog, uncatalog, or delete) either at the end of the step or if the step abnormally terminates(. DISP is always required unless the data set is created and deleted in the same step.

15) What is DISP=SHR ?
DISP=SHR permits old data sets to be shared. SHR is identical(同样的) to OLD except that several jobs may read the dataset concurrently(并发的) in multiprogramming(多道程序设计) environments. SHR must be used only for input data sets; use OLD or MOD if data set is modified.?Sharing data set is necessary because public libraries like SYS1.LINKLIB or the subroutine(子程序) libraries should be available to every job in the system.

16) What is DISP=MOD ?
DISP=MOD modifies a sequential(顺序的) data set. It is a convenient(方便的) way to add data to the end of sequential dataset. If the data set doesn’t exist, the system changes MOD to NEW unless the VOL parameter request specific volume. When VOL is coded, the system expects to find data set on the specified volume and terminates the step if it cannot find it. MOD is the usual way of extended data sets in to several direct-access(随机存储) volumes.

17) What is DISP=PASS ?
PASS passes the data set on to subsequent(后来的) job steps, and each step can use the data set once. It is a positional subparameter of the DISP which could only be specified under normal termination action. Pass saves time because the system retains(保留) the data set location and volume information.

18) What are the parameters that have to be coded on a DD statement in order to retrieve(找回) a cataloged data set ?
The minimum parameters needed are DSN and DISP.

19) How does the system get information about the block size ?
DCB info comes from :-
1) Program – FD: BLOCK CONTAINS 3 RECORDS RECORD CONTAINS 100 CHARACTERS
2) The label – like a tape
3) From the VTOC – for Dasd
4) From the JCL – DCB=BLKSIZE=nnn.

20) What is a Label ?
LABEL is a keyword parameter which can be specified on DD statement and consists of the following subparameters:
LABEL=(Relative File #, Type of Label Processing)
The LABEL parameter tells the type of label, the relative file number,and whether the data set is to be protected for input or output.

21) When should be NL be specified as a type of label processing ?
NL should be specified when a program needs to process unlabeled tapes, NL can also be specified when the pgm wants to create unlabeled tape because the system’s default action, in cases(万一) when parameter is not specified, will create IBM standard label. Nonlabeled tapes are often used for sending tapes to another installation. That way you don’t have to worry about the tape label corresponding(相应的) to the standards at the other installation or about accidentally matching the volume serial(连续的) number of an existing tape at the installation.

22) How do you describe the input data which is a part of the input job stream ?
You should use either DD * or DD Data.

23) What is the difference between * and Data ?
DD * and DD DATA describe the input data which follows the above mention cards. If the input data contains record switch // in col 1 and 2 then DD Data should be used.

24) What is the purpose of SPACE parameter ?
It is a keyword parameter which should allocated(分配) he DD statement for the output data sets stored on the disk.It consists of the following subparameters:
SPACE=(BLKS/CYL/TRK,(primary,secondary,index),RLSE,CONTIG)

25) What is a RLSE ?
RLSE releases all unused space when the data set is closed. It permits you to allocate more space than perhaps, it needed without wasting space. Space is released only if the data set is not empty and if the data set is closed after being opened.

26) What is a CONTIG ?
CONTIG requests the primary space be allocated only on contiguous tracks and cylinders, that is all tracks on a cylinder are contiguous, and if more than one cylinder is needed, the cylinders are also contiguous. Always code CONTIG if track overflow is used. Contiguous-连续的

27) What is a PDS ?
PDS is a library type of data set organization consisting of Directory and Members. The directory consists of blocks, and each block is 256 bytes in length and can hold up to 5 members. Each member of the PDS is a sequential data set.

28) What is a Temporary Data Set ?
Temporary data sets are used for storage needed only for the duration of the job. If the DISP parameter doesn’t delete the data set by the end of the job, the system will delete it. Deleting a tape data set dismounts the tape, whereas deleting a dataset on a direct-access volume release the storage. A data set is marked temporary by omitting the DSN parameter or by coding DSN=&&dsname. The system assign a unique name to the data set when the DSN parameter is omitted, and any subsequent steps using the dataset refer back to the DD statement. Refer-提交

29) What is COND parameter ?
It is a keyword parameter which can be specified on the JOB or EXEC statements. COND consists of 3 subparameters:
code(0 thru 4095),logical operator, and stepname of the step that is going to be compared.
The purpose of the COND is to determine whether the step should be executed or bypassed. If condition specified in the COND parameter is true,the step is bypassed.

30) How do you specify a COND parameter for a job step so that the step will never be executed ?
COND=(0,LE) or COND=(4095,GE).

31) What does COND=ONLY mean ?
It means that this job step will be executed only if a previous step had abnormally terminated.

32) What does COND=EVEN mean ?
It means that this jobs step will be executed even if a previous step abnormally terminated.

33) What is a NAME ?
Name is a positional parameter which identifies the person or group responsible for a job.

34) What is a PRIORITY ?
It is a keyword parameter which specifies a job initiation priority within its job class. When the job is initiated, the system will convert the job’s priority into a dispatching priority so that job’s task can complete with other tasks for use of main storage and CPU resources.

35) How does the system determine the priority of a job for execution ?
First the system determines which job has the highest class. Each class has a job queue with jobs of different priorities. The system will select the job for execution that has the highest PRTY (0 thru 15) 15 is the highest priority.

36) What is a MSGCLASS parameter ?
It is a keyword parameter which specifies the output class to which system messages for your job are to be routed. Output class is an alphabetic (A thru Z) or numeric (0 thru 9) character. The default for MSGCLASS parameter will be A. System messages and output data sets can be routed to the same output class. You can code the MSGCLASS parameter in the Job statement and the SYSOUT parameter on the DD statement.

37) What is MSGLEVEL parameter ?
It is a keyword parameter which indicates what job output is to be written as a part of output listing. The following outputs can be requested: the Job statement;
all input job control statements;
allocation, disposition and allocation recovery messages(allocation/termination message)
MSGLEVEL=(statements, messages)
Statements:
- 0 – only the job statement is to be written;
- 1 – all input control statements, cataloged procedure statements and the internal representation of procedure statement parameters after symbolic parameters substitution are to be written;
- 2 – only input job control statements are to be written;
Messages:
- 0 – No allocation/termination messages are to be printed unless the job terminates abnormally;
- 1 – All allocation/termination messages are to be printed.

38) How can you check for syntax or JCL errors without actual execution of a job ?
TYPRUN=SCAN should be specified on a job card

39) What is the difference between the COND parameter specified on the EXEC statement and the one specified on the JOB statement ?
COND parameter specified on EXEC statement determines whether step should be bypassed or executed.
COND parameter defined on the JOB statement will determine whether Job should be terminated at a certain point or continued. When COND parameter is defined on the JOB statement, the system evaluates condition specified in the COND parameter before beginning of any job step and compares the code specified in the COND parameter with the return code of all previous jobsteps. If that condition is true, the rest of the job steps are bypassed.

40) What’s job card?

Every job will begin with a ‘Job Card’, which specifies the jobname, and other important information about how the job will execute.
Every job you code will have a Job Card. This is the first thing you must code for every job.

41) how many info are there in job statement?
-Accounting Information
-Programmer
-Class
-Message Class
-Storage Required 
-Conditional Testing 
-Notify 
-Message Level 
-Time 
-Other Information 

42) what’s track? And size?
Mainframe storage Unit: a track = 56664bytes=55.34KB

43) What’s DUMMY dataset?(虚拟的)
The special DD statement (DD DUMY) enables you to ignore a dataset for the current program execution.

44) What’s difference between joblib and jcllib?

JOBLIB:Identify a private library that the system is to search for the program named in each EXEC statement PGM parameter in the job. Only if the system does not find the program in the private library, does it search the system libraries.

JCLLIB:
Identify the names of the private libraries that the system uses for the job. The system searches the libraries for: Procedures named on any EXEC statements
Identify the names of the system procedure libraries and installation-defined
procedure libraries that the system uses for the job.
Identify the order in which the libraries are to be searched. The system
searches the libraries in the order in which you specify them on the JCLLIB
statement, prior to searching any unspecified default system procedure
libraries.

45) What’s differnce between in-stream procedure and catelog procedure?
In-stream procedure is storaged in a job,however cataloged procedure is separated into a private library or PDS.

46) what’s is COBOL?
COmmon Business Oriented Language, a structure language for massive regularity datum processing.

47) how many type are there in cobol call procedure?
STATIC: static is included in the global link of the program, the subroutine linked in to main program and always resident
DYNAMIC: separately linked proram are called with the program name in quotes, and the subroutine are loaded into memory only when called by calling program.

48) why use an internal sort?please explain the COBOL internal sort?
sort file name on ascending key-allow you to include logic to be preformed before and after sort, to alter datum immediately before sorting it/reduce need for separate programs.

In JCL allocate sort work space, in data division code SD, in procedure division use SORT statement with the ascending/descending key, using/ input procedure.
Please add a example done before.

49) Please distinguish “go to”, “exit”, “stop run”, “go back”, “continue”?
as book
50) How many different level numbers can be used in COBOL to describe a record?
01-49

51) Q What is level 88?
A The level 88 in the Data Division can be used to give condition names to the values that a field contain. When this level is specified you can use the condition name instead of is = to in the IF statement. Condition name should be specified under Level 88 immediately following the field description.

52) What is the difference between level 77 and 01? and which is more efficient?
A Level 77 can be used to describe independent elementary items in the Working-Storage or Linkage Sections.
Level 01 can be used to describe both elementary and group items. Any item described in Level 01, the system is putting on Double-Word boundary and inserts slack bytes if necessary

53) Name the different PERFORM statement?
PERFORM
PERFORM THRU
PERFORM ‘n’ of TIMES
PERFORM UNTIL
PERFORM VARYING with UNTIL Option.

54) What is a subscript?
A Subscript represents occurrence # of the Table Entry. Subscript can be represented explicitly and implicitly. Explicitly means thru occurrence # of the table entry; implicitly means thru a data name. That data name should be defined as an independent item in the W-S Section. The most efficient definition of Subscript is Full-Word binary.

55) What is an index?
Index is assigned to specific table thru INDEXED BY clause. Internally is represented by Index Register which is Full-Word binary. Specific index name can be used to reference a field from the table to which that index is assigned to index represents displacement value of the table entry from the beginning of the table.

56) What are the different ways of an internal table search?
a. Sequential Search statement. (SEARCH)
b. Binary search statement.(SEARCH ALL)

57) What is the difference between SEARCH and SEARCH ALL?
A Serial search (SEARCH) examines each table entry starting at the beginning, whereas a binary search (SEARCH ALL) starts looking at the mid-point of the table and works its way toward the argument depending upon if its too high or too low. A serial search can be used for unsorted tables, while a binary search is only useful if the tables is sorted.

58) How do change the value of an index in a COBOL programs?
A SET statement.

59) How many different data USAGEs can be used in COBOL?
DISPLAY, COMP, COMP-3, INDEX, POINTER.

60) in CICS MAP field, what’s the DFHMDF’s L indicator variable ?

61) what’s the conversation transaction?
programs share the same procedure division but have separate working
storage

62) what’s non-conversation transaction?
program is not kept in main storage while waiting for input from
terminal/program is transaction driven /release resources between executions of a task information passed
between programs and task via commarea or temporary storage

63)Please explain the following concept and abbreviation:
PCT
PPT
JCT
SNT
SIT
FCT
TCT
DCT

PCT PROGRAM CONTROL TABLE
TRANSACTIONS
One entry for every type
PPT PROGRAM PROCESSING TABLE
PROGRAMS/MAP SETS
Use count
JCT JOURNAL CONTROL TABLE : record system log and users’ journal
JOURNALS
SNT SIGN ON TABLE :define users’ right
SIT SYSTEM INITIALIZATION TABLE:set cics system initialized parameter
FCT FILE CONTROL TABLE:define all files that are used in cics
TCT TERMINAL CONTROL TABLE :define terminal and system connections
DCT DESTINATION CONTROL TABLE

64) What’s the link in CICS?
Link sub-modules invoked/subroutines at same
Logical level via twa/both pgms remain in main
Storage \
Link to another program anticipating retu

65) could you please introduce the utility’s function below?

idcams DEFINES, CONSTRUCTS, BACKUP, PRINTS, DELETES
iebcompr COMPARES LOGICAL RECORDS
iebcopy COPY, COMPRESS, MERGE
iehlist LIST ENTRIES IN SYSTEM CATALOG/VTOC
IEHMOVE MOVES OR COPIES DATA SETS OR VOLUMES
IEHPROGM/IDCAMS GDGS
IEBGENER COPY/REBLOCK DS

66) Explain the differences between a Transaction and a Task.
Under CICS, a user can’t directly invoke a program. Instead, the user invokes a transaction, which in turn specifies the program to be run. When a user invokes a transaction, CICS locates the associated program with the transaction, loads it into storage (if it is not there), and starts a task. Where Task is a unit of work which is scheduled by CICS. The difference between transaction and task is that while several users may invoke the same transaction, each initiates a separate task.

67) Distinguish between Multitasking and Multi-threading.
Multi-tasking means that the OS allows more than one task to run (be executed) concurrently, regardless of whether the task use the same program or different programs. Multi-threading is the system environment, where multiple tasks share the same program under the multi-tasking environment. Programs are shared by several tasks, and for each task the program work as if it executes the instructions only for that task.

68) What is the differences between operation of Pseudo-Conversational and a conversational program ?
In a conversational mode, the program accomplishes the conversation by simply sending a message to the terminal, and waiting for the user to respond, and receiving the response from the terminal. The system that sits idle without allowing an other operation while waiting for the data is called a conversational program.
In a Pseudo-Conversational program, a program attempts a conversation with a terminal user, it terminates the task after sending a message with a linkage for the next task. When the user completes the response the next task is automatically initiated. Pseudo-conversational program’s uses the CICS resources such as control tables efficiently.

69) What is a PROGRAM CONTROL TABLE (PCT) ?
The primary function of the PCT is to register the control information of all CICS transactions. PCT contains a list of valid Trans-id paired with the name of a program CICS will load when the transaction is initiated with that transaction identifier. It identifies priority and security level (RSLC) of transaction.

70) What is a PROCESSING PROGRAM TABLE (PPT) ?
The Primary function of PPT is to register all CICS application programs and BMS mapsets. The PPT keeps track of which applications are loaded on the CICS address Space (storage). CICS uses this information to determine whether new copy of the program need to be loaded from Disk or it exists on storage. It contains information such as Location in memory, Library address of the disk and language being used.

71) What is FILE CONTOL TABLE (FCT) ?
The Primary function of FCT is to register the control information of all files, which are used under CICS. FCT contains the name and type of each file and in addition lists the file control operations that are valid for each file. It lists whether the existing records can be read sequentially or randomly, deleted or modified. Others control tables used are TCT to register terminals, DCT, TST, RCT, SIT, SRT and SNT.

72) What are the the basic steps of a CICS program development ?
Develop a complete set of program specifications(规格). The minimum the specifications should include program overview(概况), a screen layout for each map being used, a listing of copy members of each file used by the program. Others that are needed are include decision tables, editing rules, …

Design the program. Most standard COBOL programs are designed around a basic looping structure that controls the overall(总体) program execution. In a pseudo-conversational CICS program there is no basic looping structure, Instead CICS invokes your program whenever there is an interaction(互动) with a user. CICS program is to be designed to respond(回应) appropriately(适度) for each type of user action.

Create the necessary CICS table entries. Before you can test a CICS program, you need to make sure that all of the CICS table entries required to support the program are in place. For most programs the entries need to be added to PPT, PCT and FCT tables.

Prepare the BMS mapset by coding the assembler(汇编) language BMS macros(巨集) or using mapset generator.

Code the program. Coding the CICS programs involves writing of standard COBOL code with special CICS commands to invoke CICS services.

Compile the program. By either using the Foreground(前景) command level translator or a JCL, compile the CICS application program. Under which the CICS commands are commented out and replaced by appropriate calls and move statements during the pre-compile(预编译) / Translation step. In addition to translation the CICS commands the translator also inserts other code needed to process the CICS instructions. Now the Cobol Source is compiled and link-edited similar to a standard Cobol program.

Test the program under CICS test region. Load and run the program under the test environment and check for the functionality(功能). You can use CEMT, CEDF and CECI transactions during the test cycle.

73) What is a BMS Map ?
The primary objective of Basic Mapping Support system is to free the Application Program from device dependent codes and Format. A screen defined through BMS is called a Map. There are two type of maps: Physical Map ,Symbolic Map

74) What is a Physical Map ?
It is the assembly language program, which are created and placed in a load (program) library. It controls the screen alignment plus sending and receiving of constants and data from and to the terminal, and has the terminal information.

75) What is a Symbolic Map ?
It defines the map fields used to store variable data referenced in a COBOL program. They may be placed by BMS into a Copy library and be added to the Cobol program at the compile time.

76) What is a Map Set ?
A group of maps, which are link-edited together is called a Mapset.

77) What are the BMS Macros to generate Maps ?
DFHMSD – Data Facility Hierarchical Map Set Definition.It is used to define a mapset
DFHMDI – Data Facility Hierarchical Map Definition Information.It is used to define a map.
DFHMDF – Data Facility Hierarchical Map Data Field.It is used to define a Field in the map.

78) What are the 3 working storage fields used for every field on the map? What other fields are generated ?
Length field, Flag Field and Attribute field. In addition Input & Output field are also created. Others are extended Color & Extended Highlighting attributes created only if MAPATTS and DSATTS are specified.

79) What is the IBM supplied Copybook,with all modifiable attribute bytes that can be used with symbolic maps ?
DFHBMSCA

80) How do you place the cursor on the particular position on the screen (map)?
Define the field with IC in the BMS map. Move -1 to the length attribute of the field and use the CURSOR option without displacement value. (symbolic positioning). Use the CURSOR(nnn) option with SEND MAP, where nnn = (row-1)*80+(col-1) (physical positioning).

81) What is MDT ?
Bit in the attribute byte indicating modification of field on screen.If the user keys in any data into the field, it turns the MDT ON indicating that the data is modified. To save transmission time , 3270 terminal sends a field over the TC line only if the MDT is on. Otherwise, the field value is not transmitted.

82) What is DFHCOMMAREA ?
DFHCOMMAREA in the Linkage section is used to pass the data in working storage commarea from one to program to another program. It should be defined with as at least one byte long. As the working storage section is freshly allocated for every execution.

83) What is Execution Interface Block (EIB) ?
EIB is a CICS area that contains information related to the current task, which can be used for debugging the program. The most widely used variables are EIBDATE, EIBTIME, EIBAID, EIBCALEN, EIBCPOSN, EIBRESP, EIBRSRCE (resource), EIBFN (recent CICS command code), EIBTRMID and EIBTRNID.

84) What are the important tables used in the CICS-DB2 environment ?
CICS manages it’s communication with DB2 with special interface modules called CICS/DB2 Attachment Facility. When a CICS program issues a SQL statement, CICS requests the attachment facility to establish a connection with DB2 called a thread. The information about the CICS transaction and DB2 is entered in Resource Control Table (RCT). The plan information is referenced through the RCT Entries.

85) What are the various commands used to browse through a dataset ?
STARTBR, READNEXT, READPREV and RESETBR. The options used are DATASET, RIDFLD, RRN/RBA, GENERIC, and KEYLENGTH for the 3 commands, and INTO, LENGTH for READNEXT and READPREV command, and EQUAL/GTEQ for STARTBR only. RESP can be used with any. ENDBR is used to end the browse operation.

86) What is 2 phase commit ?
It occurs when a programmer Issue’s an Exec CICS Syncpoint command. This is called a two phase Commit because CICS will first commit changes to the resources under its control like VSAM files, before DB2 changes are committed. Usually CICS signals DB2 to complete the next phase and release all the locks.

87) What are ASRA,AICA,AEY9 abend ?
ASRA – Any data exception problem SOC7, SOC4 etc
AICA – Runaway Task.
AEY9 – DB2/IDMS Database is not up.

88)What’s transaction
A serial of operation set
Atomicity
Consistency
Isolation
Durability

89) What are the differences between TSQ and a TDQ ?
In Temporary Storage Queues Data is read randomly, While in Transient Data Queues data must be read sequentially.
In a TSQ data can be read any number of times as it remains in the queue until the entire Queue is deleted. In TDQ data item can be read once only. To reuse the TDQ it must be closed and reopened.
Data can be changed in TSQ, but not in TDQ.
TSQ can be written to Auxiliary or Main Storage, while TDQ is written to Disk. Temporary storage is a holding place, while Transient data is always associated with destination.
TSQ name is defined dynamically, while a TDQ name need to be defined in the DCT. Note: An application uses TSQ ’s to pass info’ from task to task, while a TDQ to accumulate records before processing or send data for external use, such as a print operation or other.

90) What are Extra partition & Intra partition TDQs ?
Extra-partition TDQ’s are datasets used for communication between CICS and other CICS/Batch regions. Intra-partition TDQ’s are queues for communication within CICS region. CICS stores the Intra-partition TDQ in a dataset ‘DFHNTRA’ on the Disk. Extra-partition TDQ doesn’t have to be a disk file, it can reside on any device that’s a valid QSAM/VSAM. The DCT entry contains the destination-Id, type of TDQ, Destination, Trigger level if needed

91) How is an Abend handled in a CICS program ?
The HANDLE ABEND command is used to trap and Handle errors. It has 4 possible options and only one of them can be used with this command at a time. The options are Program(…) to transfer control to the program, Label(…) to transfer control to the specified paragraph, Cancel option keeps the earlier Handle Abends from being executed. Reset option will reactivate the Handle Abend commands, which were previously cancelled.

92) What is Quasi-reentrancy ?
There are times when many users are concurrently using the same program, this is what we call Multi-Threading. 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.

93) What’s the DB2I?

DB2I DB2 INTERACTIVES TO DEVELOP AND RUN APPLICATION

PROGRAMS/RUNS UNDER TSO/ISPF
PRECOMIPLIATION PROCESS PRODUCES A DATA BASE
REQUEST MODULE (DBRM) FOR BIND
BIND ESTABLISHES A RELATIONSHIP BETWEEN PROGRAM AND
DB2 DATA/VALADATES SQL STATEMENTS/CHECKS
AUTHORIZATION/BUILD AND STORES AN APPLICATION
PLAN TO ALLOW DB2 TO ACCESS DB2 DATA WHEN
PROGRAM EXECUTES
SPUFI SQL PROCESSOR USING FILE INPUT
RUN UNDER ISPF ALLOWING USER
TO ENTER SQL COMMANDS FROM
TERMINAL
DCLGEN PL/1 OR COBOL COPYBOOKS
BIND
RUN

94) what’s SQL?
SQL STRUCTURED QUERY LANGUAGE

95) what’s DDL?
DDL DATA DEFINITION LANGUAGE DEFINE OBJECTS
CREATE
ALTER
DROP

96) What are the different data types in DB2?
Smallint
Integer
DECIMAL
FLOAT
Character,Varcharacter
Graphic,Vargraphic
Date
Time
Timestamp

97)What is a view ? What are the advantages and restrictions of using a view ?
A view is a virtual table derived from one or more base tables. It prevents unauthorized users from having access to sensitive data. Cannot insert, delete or update a view, which is based on more than one base table.

98) What is a Subquery ?
A subquery is a query that is written as part of another query’s WHERE clause.

99) Q What is DB2 bind ?
A bind is a process that builds ‘access paths’ to DB2 tables. A bind uses the Database Request module(s) from the DB2 precompile step as input and produces an application plan. It also checks the user’s authority and validates the SQL Statements in the DBRM.

100) What is a plan?
A plan is a DB2 (produced during the bind process) that associates one or more database request modules with a plan name.

101) Q What is DCLGEN?
A DCLGEN stands for declarations generator; it is a facility to generate DB2 sql data structures in COBOL or PL/I programs.

102) What is deadlock ?
Deadlock occurs when transactions executing at the same time lock each other out of data that they need to complete their logical units of work.

103) What is the equivalent cobol definiton for the datatypes in DB2 ?
Smallint – S9(4) COMP or S9(4) COMP-4
Integer – S9(9) COMP or S9(9) COMP-4
Char(N) – PIC X(N)
Varchar(N) – 01 NAME.
49 NAME-LEN PIC S9(4) USAGE COMP.
49 NAME-TEXT PIC X(N).
DECIMAL(P,S) – If p<19: S9(p-s)V9(s) COMP-3
Float – USAGE COMP-2
Date – pic x(10).
Timestamp – pic x(26).

104) How do you add columns to an existing table ?
ALTER table command can be used to add columns to an existing table.

105) Name a few utilities available in DB2 ?
LOAD
MERGE
MODIFY
QUIESCE
REBUILD
RECOVER
REORG
REPORT
REPAIR
RUNSTATS

106) Q What are the different COLUMN functions ?
A SUM-Returns the total value.
MIN-Returns the minimum value.
AVG-Returns the average value.
MAX-Returns the maximum value.
COUNT-Returns the number of selected rows.
STDDEV-Returns the standard deviation of the column values.
VARIANCE- Returns the variance of the column values.

107) Q What is commit and rollback ?
A commit occurs automatically at the end of the program, or by request one or more times during the execution of the program. Releases all locks acquired by the program since the last commit, so that other programs and users may obtain access to the data. Any open cursors are automatically closed. All database changes are made permanent.If any changes made to the tables are not appropriate, then all the changes must by rolled back resulting in the same state of data as they were prior to making changes. Release all locks acquired by the program.

108) What are the types of VSAM datasets ?

Entry sequenced datasets (ESDS)
Key sequenced datasets (KSDS)
Relative record dataset (RRDS)
Linear datasets(LDS).

109) What is an ESDS ?
Entry Sequenced Data Set is like a standard sequential data set.Its records are processed one at a time in the order in which they were loaded.

110)What is a KSDS ?
Key Sequenced Data Set is like an ISAM file, its records may be processed sequentially or randomly based on a key value. A KSDS is often called an indexed file.

111)What is a RRDS ?
Relative Record Data Set is like a nonVSAM relative file. Its records can be accessed based on their relative positions in the file.

112) What is a LDS ?
VSAM data set that contains data but no control information. A linear data set can be accessed as a byte-addressable string in virtual storage.

113)What is a CONTROL INTERVAL (CI) ?
unit of data that is transferred between auxiliary storage and virtual storage when an I/O request is made. It contains records, free space and control information.

114) Explain the information contained in CI ?
Control information consists of RDF (Record Descriptor Field) and CIDF (Control Interval Descriptor Field). Every CI contains one CIDF which is a field consisting of the last 4 bytes of a CI. It contains information about the offset and the length of free space in the CI. In case of fixed size records each CI contains two RDF’s and each RDF is 3 bytes in length. In case of the variable size records,there is a separate RDF for each record in the CI. The size of the Data portion of the CI should be multiple of 512 bytes or 2,048 bytes. Max size of the CI is 32K. The size of the index portion of CI could be one of the following: 512, 1024, 2048, 4096.

115) What is a CA, control area ?
A group of control intervals makes up a control area.

116) What is a sequence set ?
A Sequence set is the part of the index that points to the CA and CI of the record being accessed.

117) What is an index set ?
A Index set is the other part of the index. It has multiple levels with pointers that ultimately reach to the sequence set.

118) What is a CI SPLIT ?
The movement of some records from an existing CI to another free CI in the same CA because a record add or update cannot be accommodated in the existing one. This results in two half-empty CI’s instead of one full and one empty CI. CI split require a number of I/O operations and this degrades the performance of the VSAM file. A right amount of the space should be allocated for the CI (internal percentage of free space allocation).

119) What is a CA SPLIT ?
A The movement of the half of the records in an existing CA to a new CA because a record add or update cannot be accommodated in the existing CA. This results in two approximately half-full CA’s instead of one full and one empty CA. This is very unsufisient because it involves a lot of I/O operations.

120) 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.

121) What is Free space ?
Free space is reserved within the data component of a KSDS to accommodate inserting new records and the updating of records.

122) What is a RECORD KEY ?
Record Key indicates to the system where in the record of the VSAM file the key is located. Record key should be described in the File Section.

123) What is the purpose of the START command ?
To position a current record pointer on a desired record. This command should be followed by a Read statement which bring that record into the pgm.

124) Name some common VSAM error conditions and codes?
Common Error codes are: End of file (10), Duplicate key (22), Record not found (23), VSAM logic error (92) and Resource not available (93).

125) What are the IDCAMS commands that can be used for VSAM and explain each of them?
ALTER modifies information for a catalog, alternate index, cluster or path. BLDINDEX builds the alternate index, ofcourse. DEFINE is used for ALTERNATEINDEX, CLUSTER or PATH. DELETE removes the catalog entry for a catalog, cluster, alternate index or path. LISTCAT lists information about the dataset. PRINT prints the dataset contents. REPRO copies records from one file to another.

126) What is the purpose of the VERIFY function of IDCAMS ?
The purpose of verify is to re-sync the end of file info with the catalog info.

127) In the COBOL SELECT statement what is the ORGANIZATION for a KSDS ?
The Organization is INDEXED.

128) In the COBOL SELECT statement for a KSDS what are the three possibilities for ACCESS ?
ACCESS can be SEQUENTIAL, RANDOM or DYNAMIC.

129) How can you find out information about VSAM Clusters in a Catalog ?
This information is listed in the report produced by Listcat Entries function of the IDCAMS utility.

130) What is the relation between the Master Catalog, User Catalog, and Data Sets which could be cataloged in the User Catalog ?
Master Catalog should contain pointers to the User Catalogs. All data sets cataloged in the user catalog should have a higher level qualifier equal to the name of the user catalog.

131) If you wish to use the REWRITE command how should the VSAM file be opened ?
It must be opened as I/O.

132) What is the significance of the SHAREOPTIONS parameter ?
It specifies how the file may be shared between jobs and between batch and CICS environments and between systems.

喜欢本文,那就收藏到: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

发表您的评论