Cap[1]

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Cap[1] as PDF for free.

More details

  • Words: 19,966
  • Pages: 74
Question 3: The following procedures are required to create an Alternate Index: 1. Define Alternate Index 2. Define Path 3. Build Alternate Index 4. Define Base Cluster 5. Load records to Base Cluster Which of the following are correct sequences of performing the procedures? A. B. C. D. E.

3, 4, 1, 1, 4,

5, 5, 3, 2, 5,

2, 1, 4, 3, 1,

4, 3, 2, 4, 2,

1 2 5 5 3

Question 4: How many active VSAM master catalogs can exist in an operational MVS system? A. 123 B. 2 C. 0 D. 1 E. There is no limit to the number of active VSAM master catalogs. Question 5: Which of the following statements correctly describe the use of SQLERRMC? A. It is a variable contained in the SQLCA. B. It is the data structure that contains the SQLCODE variable. C. It provides additional information associated with an error returned by the execution of the last SQL statement. D. It is the field used to pass parameters used by the SQL ROLLBACK command. E. It is part of the group structure variable SQLERRM. Question 6: Which of the following statements correctly describe the following JCL code? //JOB1 JOB 3,TEST,CLASS=A,MSGCLASS=X,TIME=(3,20),REGION=2094K,RESTART=STEP2 //STEP1 EXEC PGM=PR001,REGION=6M,TIME=(1,20) //DD1 ... //STEP2 EXEC PGM=PRM=PR002,TIME=(1,20)

//DD2 ... //STEP3 EXEC PGM=PR003,REGION=0M A. If STEP1 TIME = 1M20S and STEP2 TIME = 1M20S, the maximum time that will be allowed for STEP3's execution can be determined by the following formula: STEP3 TIME = JOBTIME - (STEP1 TIME + STEP2 TIME) B. The amount of storage allocated to STEP1 is 8M, because storage is allocated in 4M increments. C. The amount of storage allocated to STEP2 is 2092K. D. Only storage taken from the private storage area below the 16MB line will be allocated to the steps in JOB1. E. Because the REGION parameter on the JOB statements overrides the REGION parameters on the individual steps, all the steps that execute will be allocated the same amount of storage. Question 7: Which of the following methods should be used to determine the number of Control Intervals (CI) in the Control Area (CA) for an existing VSAM data set? A. Print the Data Component using IDCAMS. B. Print the Data Component using IEHDASDR. C. Print the Cluster using IDCAMS. D. List the Cluster's entry in the VSAM Catalog. E. Execute the IDCAMS DIAGNOSE command. Question 8: Which of the following statements correctly describe stored procedures? A. Stored procedures always commit changes automatically before control is returned to the calling program. B. Stored procedures can access non-DB2 data. C. Stored procedures can execute other stored procedures. D. The load module used by a stored procedure resides at the client location. E. The DB2 command START PROCEDURE is used by a program to execute a stored procedure. Question 9: A VSAM file is loaded such that each Control Interval (CI) has only one record. The CI size is 512 bytes. All records are the same length - 100

bytes. Which of the following statements are true? (Note: All RBA values are in decimal representation.) A. The RBA of the first record is 1 for a KSDS file and 0 for an ESDS file. B. The RBA of the second record is 512. C. The RBA of the first record is 1. D. The RBA of the first record is 0. E. The RBA of the second record is 110 Question 10: The COBOL program below needs to be embedded with the functionality to retrieve records from an employee table using the full last name or partial string from the employee’s last name as the search criteria. Which of the following lines of code can be substituted for the ****XX**** and ****YY**** to obtain the required output? ****XX**** EXEC SQL SELECT * FROM DBNAME.EMPLOYEE_DETAIL ****YY**** END-EXEC. A. XX:INSPECT WS-LAST-NAME REPLACING LEADING SPACES BY * B. YY:WHERE LAST_NAME = :WS-LAST-NAME C. YY:WHERE LAST_NAME BETWEEN :WS-LAST-NAME AND :WS-LAST-NAME D. YY:WHERE LAST_NAME LIKE :WS-LAST-NAME E. XX:INSPECT WS-LAST-NAME REPLACING ALL SPACES BY %

Question 11: Program PGM1 has been coded. One of the host variables used in the program has not been defined. Which of the following statements correctly describe the impact this omission has on the preparation and execution of PGM1? A. The DB2 precompiler will issue a warning message. B. The DB2 precompiler will define the host variable for you. The program will bind and execute successfully. C. The DB2 precompiler will issue an error message. D. The COBOL compiler will issue an error message. E. The omission will not be discovered until PGM1 is executed. Question 12: Which of the following parameters must be coded on the BIND command to enable plan PLNA to use I/O parallelism?

A. B. C. D. E.

REOPT(VARS) STREAMS(MANY) DYNAMICRULES(RUN) DEGREE(ANY) Parallelism cannot be enabled via the bind command.

Question 13: Three tables exist upon which RI is defined. TABLEA is the parent table that currently contains 100 rows. TABLEB currently contains 175 rows, and is defined as a child of TABLEA. TABLEC currently contains 250 rows, and is also defined as a child of TABLEA. Each of the child tables is defined with ON DELETE CASCADE. The LOAD utility is executed against TABLEA with the REPLACE, ENFORCE CONSTRAINTS, and LOG YES options specified. The input file to the LOAD utility is empty. Which of the following statements correctly describe the state of the three tables immediately following the execution of the LOAD utility? A. All three tables are empty. B. TABLEA contains 0 rows, TABLEB contains 175 rows and TABLEC contains 250 rows. C. TABLEB and TABLEC are in 'check-pending status'. TABLEA is not in any restricted status. D. All three tables can only be read and not updated since each of them are in 'check-pending status'. E. TABLEA contains 100 rows, TABLEB contains 175 rows and TABLEC contains 250 rows.

Question 14: The KSDS (Key Sequenced Data Set) processed by the program below consists of 3 records with keys: 1, 3, 5. What will be the results of executing the highlighted code?

10

PROCEDURE DIVISION. OPEN INPUT IN-FILE. MOVE 5 TO RECORD-KEY. START IN-FILE KEY IS NOT < RECORD-KEY. READ NEXT IN-FILE. A. Line 10 will cause a compilation error because the 'NOT <' is invalid syntax. B. The record with key 1 will be returned to the program. C. The record with key 5 will be returned to the program.

D. The File Status will be set to '10'. E. An end-of-file condition will occur.

Question 15: Which of the following statements about the DCB parameter and sub-parameters are incorrect? A. All sub-parameters of the DCB parameter can be coded as parameters. B. There is a maximum value that can be specified in the LRECL sub-parameter. C. If the BLKSIZE sub-parameter is not coded, the system will determine an optimal block size value for data sets that contain blocked records. D. If SMS is active, the DCB parameter is not required. E. LRECL=0 can only be coded if RECFM=U.

Question 16: A COBOL programmer writes the code below in order to calculate the factorial of a number N. The number N is derived from the terminal, N!=1*2*3*...(N-1)*N. FACT stores the final value and can store any large value. Which of the following lines of COBOL code can be substituted for the ****X**** in the code below to obtain the required output? DISPLAY 'An Integer'. ACCEPT N. ****X**** DISPLAY 'Factorial' FACT. A. MOVE 1 TO X. PERFORM UNTIL X>N ADD 1 TO X MULTIPLY X TO FACT GIVING FACT END-PERFORM. B. PERFORM WITH TEST AFTER VARYING X FROM 1 BY 1 UNTIL X>N MULTIPLY X TO FACT GIVING FACT END-PERFORM. C. PERFORM VARYING X FROM 1 BY 1 UNTIL X>N MULTIPLY X TO FACT GIVING FACT END-PERFORM. D. PERFORM N TIMES MULTIPLY X TO FACT GIVING FACT END-PERFORM. E. PERFORM VARYING X FROM N BY -1 UNTIL X<2

MULTIPLY X TO FACT GIVING FACT END-PERFORM. Question 17: Which of the following PROCEDURE DIVISION statements are consistent with the FD entries for a file in the COBOL code below? SELECT EMP-FILE ASSIGN TO D12A301 RESERVE 10 AREAS ORGANIZATION IS INDEXED ACCESS MODE IS RANDOM RECORD KEY IS EMP-NO ALTERNATE RECORD KEY IS EMP-MAILID WITH DUPLICATES FILE STATUS IS FILE-STS. A. OPEN OUTPUT EMP-FILE. REWRITE OUT-REC FROM OUT-EMP INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. B. OPEN I-O EMP-FILE. REWRITE OUT-REC FROM OUT-EMP INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 999-WRITE-PARA. C. OPEN INPUT EMP-FILE. READ EMP-FILE INTO EMP-REC AT END 100-EXIT NOT AT END 500PROCESS END-READ. D. OPEN I-O EMP-FILE. START EMP-FILE KEY IS EMP-NO INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. E. OPEN EXTEND EMP-FILE. DELETE EMP-FILE RECORD INVALID KEY DISPLAY 'INVALID-KEY' NOT INVALID KEY PROCESS 100-PROCESS. Question 18: What is the most efficient size for a Control Area (CA)? A. 32768 bytes B. Track C. 65436 bytes D. Cylinder E. None of the above.

Question 19: What are the maximum number of extents allowed for a non-UNIQUE VSAM cluster? A. 1 B. 16 C. 256 D. 123

E. There is no limit to the number of extents for a NON-UNIQUE VSAM cluster. Question 20: It is expected that about 10% of the records will be added to a KSDS data set after the initial load and the added records will not be randomly distributed. Which is the most efficient parameter that can be substituted for the asterisks (********) below? DEFINE CLUSTER (NAME(VSAM.FILE)) DATA (NAME(VSAM.FILE.DATA) VOLUMES(TEST01) RECORDSIZE(500 1000) CYLINDERS(50 10) ******** KEYS(50 10)) INDEX (NAME(VSAM.FILE.INDEX)) A. B. C. D. E.

-

FREESPACE(20 20) FREESPACE(0 0) FREESPACE(50 10) FREESPACE(50 0) FREESPACE(0 50)

Question 21: A VSAM data set is defined on one volume - VOL001. Which of the following IDCAMS commands can be used to change the volume definition to two volumes VOL001 and VOL002, without destroying the contents of the file? A. IMPORT B. CNVTCAT C. ALTER D. DEFINE CLUSTER E. DEFINE ALIAS Question 22: Consider the COBOL code snippet below that uses the SEARCH ALL function. Which of the following lines of code comprise the correct WORKING STORAGE definition for this code? SEARCH ALL DISC-TABLE AT END PERFORM 100-EXIT WHEN ORDER-IN = CUST-ORDER(X) AND ORDER-PRICE(X) = PRICE-IN

MULTIPLY AMT-PURCHASE BY DISC-PCT(X) GIVING FINAL-AMT END-SEARCH. A. 10 AMT-PURCHASE PIC 99. B. 01 TABLE. 05 DISC-TABLE OCCURS 50 TIMES. C. 01 TABLE. 05 DISC-TABLE OCCURS 50 TIMES ASENDING KEY CUST-NO INDEXED BY X. D. 10 CUST-NO PIC 9999. 10 CUST-ORDER PIC 999. 10 ORDER-PRICE PIC 99V99. 10 DISC-PCT PIC 9V99. E. 01 DISC-TABLE OCCURS 50 TIMES ASENDING KEY CUST-NO INDEXED BY X.

Question 23: What is the name of the base cluster when the alternate index is defined as follows? DEFINE AIX (NAME(VSAM.FILE1) RELATE(VSAM.FILE2) VOL(VOLUME1) RECORDSIZE(30 30) NONUNIQUEKEY FSPC(5 10) SPEED) DATA (NAME(VSAM.FILE3) IX (NAME(VSAM.FILE4) CATALOG(VSAM.FILE5) A. B. C. D. E.

-

VSAM.FILE3 VSAM.FILE4 VSAM.FILE1 VSAM.FILE2 VSAM.FILE5

Question 24: Considering the TABLE declaration of a country's population below, which of the following PERFORM statements can be used to compute the number of states that have a population greater than 1 million? 01 POPULATION-TABLE.

05 STATE OCCURS 50 TIMES. 10 DISTRICTS OCCUR 10 TIMES PIC 9(10). A. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 MOVE 1 TO COUNT. CHECK-PARA. IF STATE(X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. B. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2,X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. C. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X1,X2) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. D. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10 MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. E. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>500 MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE.

Question 25: Which of the following statements correctly describe the following JCL code and possible results when the JCL is submitted for execution? //JOB1 JOB (123,456-T),TEST-JOB,CLASS=A,MSGCLASS=A,TYPRUN=HOLD //STEP1 EXEC PGM=PR001 //DD1 ... //STEP1 EXEC PROC=PR001 //DD1 ... A. Restrictions will be placed on the way in which data definition statements are coded, because of the use of non-unique STEP names. B. JOB1 will cause a JCL error since the PROGRAMMER NAME parameter contains a special character which is not enclosed by parentheses or

apostrophes, or both. C. JOB1 will only run if an initiator is available and started for class A. D. JOB1 will cause a JCL error since the program and the procedure name are identical. E. The output produced by JOB1 will need to be released by an operator before it will print because of the TYPRUN=HOLD parameter.

Question 26: Batch program ABC has performed a combination of 2 million INSERT, UPDATE, and DELETE statements. It has been executing for 3 hours and has not issued an SQL COMMIT statement. Since this program has never executed for this length of time before, it is canceled. Which of the following statements correctly describe what happens when the cancel command is issued? A. The job is canceled. The tables that were changed are in an unusable state. B. The job is canceled. All changes are rolled back. C. The job is canceled. However, the job does not end immediately. D. The cancel is put into a pending status until a commit or rollback is issued. E. The job is canceled. All changes are committed.

Question 27: In COBOL, which of the following PROCEDURE DIVISION entries enable a user to read and then update a sequential file? A. OPEN INPUT EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC. B. OPEN OUTPUT EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS.

IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC. C. OPEN I-O EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD WRITE FILE-REC FROM OUT-REC. D. OPEN EXTEND EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC. E. OPEN I-O EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC.

Question 28: Which of the following DB2 utilities can be executed to remove the 'check pending' status from a DB2 tablespace containing tables with RI? A. CHECK INDEX B. REPAIR C. CHECK DATA D. RESET CHECK PENDING E. REORG

Question 29: Table T1 contains 3 columns. C1 is defined as CHAR(8), and C2 and C3 are defined as SMALLINT. The following SQL statement exists in a program: EXEC SQL SELECT C2 + C3 INTO :HV-CALC FROM T1 WHERE C1 = :HV1 END-EXEC. How must the host variable HV-CALC be defined in the WORKINGSTORAGE section?

A. B. C. D. E.

01 01 01 01 01

HV-CALC HV-CALC HV-CALC HV-CALC HV-CALC

PIC PIC PIC PIC PIC

S9(8) S9(4) S9(4) S9(9) S9(4

COMP. COMP. COMP-3. COMP.

Question 30: Which of the following VSAM objects can be described as follows: -It is structured as a KSDS cluster with two key ranges -It has Index and Data components -It occupies its own Data Space which it can share with other VSAM objects -It contains self-describing records A. B. C. D. E.

Basic Catalog Structure (BCS) VSAM Volume Data Set (VVDS) VSAM (non-ICF) User Catalog VSAM (non-ICF) Master Catalog Control Volume Catalog (CVOL

Question 31: Program PGM has been modified and is ready to be precompiled. The following are the parameters that are specified for the precompile: HOST(COB2),APOST,APOSTSQL,VERSION(AUTO),LEVEL(0002) Which of the following statements correctly describe the result of the precompile? A. The host language is COBOL. B. The LEVEL parameter is used for consistency token creation. C. A package version will not be generated. D. A consistency token will not be generated. E. If the program was previously precompiled and bound using the same parameters and the SQL statements have not been changed, then the program can be executed without rebinding. Question 32: Which of the following statements correctly describe the following JCL code and possible results when the code is submitted for execution?

//JOB1 JOB //JOBLIB DD DSN=LIB1,DISP=SHR // DD DSN=LIB2,DISP=SHR //STEP2 EXEC PR001 //STEPLIB DD DSN=LIB3,DISP=SHR //DD1 DD ... //STEP2 EXEC PGM=PR002 //DD2 DD ... A. If a production copy of program PR002 is stored in library LIB2, and a test copy of program PR002 is stored in LIB1, the production copy will be executed. B. Only the JOBLIB concatenation will be searched for program PR001. C. If job JOB1 terminates abnormally the error will indicate that PR001 is not found in LIB3, LIB2, or LIB1. D. The job will terminate with a JCL error because LIB2 has no DDNAME. E. The STEPLIB statement has no purpose and should be removed.

Question 33: The first record on KSDS-FILE has a key of 1. of the following statements, when substituted for the line of asterisks (********), will enable line 10 to successfully delete the record?

10

INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT KSDS-FILE ASSIGN TO INFILE ORGANIZATION IS INDEXED ACCESS IS SEQUENTIAL RECORD KEY IS KEY-1 FILE STATUS IS WS-STATUS. ... PROCEDURE DIVISION. OPEN I-O KSDS-FILE. ******** DELETE KSDS-FILE. A. READ NEXT KSDS-FILE.

Which

B. C. D. E.

MOVE 1 TO KEY-1. START KSDS-FILE. READ KSDS-FILE. The record with a key of 1 will be deleted if the asterisks are removed and no code is added.

Question 34: The following 2 aliases have been created on DB2 sub-system DSN1: CREATE ALIAS A1 FOR OWNERA.T1 CREATE ALIAS A2 FOR DSN2.OWNERA.T2 The following is pseudocode for program PGM that exists on DSN1: insert 1 row into A1 insert 1 row into A2 commit Which of the following statements correctly describe the result when PGM is executed? A. It will complete successfully committing the changes on both sub-systems. B. It will fail because data cannot be modified in multiple sub-systems within a single unit of work. C. It will fail unless PGM1 is also bound on DSN2. D. It will fail unless a connect is issued to DSN2 before inserting into A2. E. It will complete successfully. The only insert committed will be the one to A2, which was the last sub-system accessed. S

Question 35: Which of the following statements about the SPACE parameter are incorrect? A. The SPACE parameter has no meaning when creating new data sets on tape and is ignored. B. The SPACE parameter, if coded on a data definition statement that specifies an existing data set, overrides the SPACE value used to create the data set. C. Space can be allocated starting at a specific location on a volume. D. If SMS is active, the AVGREC parameter must be coded if the

SPACE parameter is coded. E. If SMS is active, the SPACE parameter is not required.

Question 36: Which of the following statements correctly describe reasons for using stored procedures? A. They enable a client program to use distributed relational database technology (DRDA). B. They provide a method of calling a sub-program from DB2. C. They enable access to database and operating system features that are only available on the database server. D. They help reduce network traffic. E. They provide a way to implement code reuse.

Question 37: An RRDS (Relative Record Data Set) is loaded with records with relative numbers from 1 to 100. Which record will be deleted by the following COBOL code? FILE-CONTROL. SELECT RRDS-FILE ASSIGN TO RRDSFL ORGANIZATION IS RELATIVE ACCESS IS RANDOM RELATIVE KEY IS KEY-1 FILE STATUS IS WS-STATUS. ... PROCEDURE DIVISION. OPEN I-O RRDS-FILE. MOVE 21 TO KEY-1. DELETE RRDS-FILE INVALID KEY PERFORM ERROR-RTN. A. B. C. D. E.

20 1 21 22 No record will be deleted. ERROR-RTN will be performed.

Question 38: Which of the following statements correctly describe the DSNTIAR module? A. It is the only way to successfully exit a DB2 program. B. It generates the message text associated with any SQLCODE. C. It determines if a rollback must be performed. D. It is the program DB2 automatically calls in the event of a severe error. E. It is the routine that performs all the error processing in a program. Question 39: Given the following information describing a VSAM file Control Interval (CI) size is 512 bytes Record size is 80 bytes All records are the same size Every Control Interval contains at least 4 records Number of records in the file is 1000 What is the size of the Control Fields in the Control Interval (CI)? A. B. C. D. E.

4 7 3 10 The size varies depending on the organization of the VSAM file (KSDS, ESDS or RRDS).

Question 40: A VSAM file contains records with an average size of 500 bytes and a maximum size of 512 bytes. If the file is processed mostly sequentially, which of the following Control Interval sizes of the Cluster's Data Component is the most efficient? A. 2048 bytes B. 512 bytes C. 1024 bytes D. 3072 bytes E. 4096 bytes

Question 41: Column DEPT_NO is defined as the following: DEPT_NO

INTEGER

Which of variable DEPT_NO? A. 01 B. 01 05 05 C. 01 05 05 D. 01 E. 01

the following statements will correctly define a host in the WORKING-STORAGE section for use with the column

\

DEPT-NO DEPT-NO. DEPT-NO-IND DEPT-NO-DATA DEPT-NO. DEPT-NO-IND DEPT-NO-DATA DEPT-NO DEPT-NO

PIC S9(8) PIC S9(4) PIC S9(9)

COMP.

COMP. COMP.

PIC S9(4) COMP. PIC S9(8) COMP. PIC S9(9) COMP. PIC S9(9).

Question 42: Table T1 has been defined with 6 columns. T1 has a primary key consisting of columns C1 and C2. The following SQL INSERT statement exists in program PGM1: EXEC SQL INSERT INTO T1 (C1, C2, C3, C4, C5) VALUES (:HV1, :HV2, :HV3, :HV4, :HV5) END-EXEC. Which of the following statements correctly describe what happens when the above statement is executed in PGM1? A. The statement will fail because only 5 of the 6 columns are specified. B. If an SQLCODE -803 is encountered, an update statement can be issued to modify the non-key columns of T1. C. The statement will succeed if each of the columns is defined as NOT NULL WITH DEFAULT. D. PGM1 will automatically be rolled back if the values for HV1 and HV2 already exist. E. The statement will return an SQLCODE -104.

Question 43: Which of the following statements about registering stored procedures are correct? A. A package must be created for each stored procedure. B. A plan must be created for each stored procedure. C. The CREATE PROCEDURE SQL statement is used to define a stored procedure. D. If a client program uses a package, it must reside in the same collection as the stored procedure's package. E. Schemas can be used to maintain multiple versions of a stored procedure.

Question 44: Which of the following SEARCH statements can be used for the TABLE declaration in the COBOL program below? 01 TABLE-1. 05 TABLE-ENTRY1 OCCURS 10 TIMES INDEXED BY TE1-INDEX. 10 TABLE-ENTRY2 OCCURS 10 TIMES INDEXED BY TE2-INDEX. 20 KEY1 PIC X(5). 20 KEY2 PIC X(10). A. SET TE1-INDEX TO 1. SEARCH TABLE-ENTRY2 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY2(TE1-INDEX, TE1-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH B. SET TE1-INDEX TO 1. SEARCH TABLE-ENTRY1 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY1(TE1-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH C. SET TE1-INDEX TO 1. SET TE2-INDEX TO 1. SEARCH TABLE-ENTRY1 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY1(TE1-INDEX, TE2-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH D. SET TE1-INDEX TO 1. SET TE2-INDEX TO 1. SEARCH TABLE-ENTRY2 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY2(TE1-INDEX, TE2-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE

END-SEARCH E. SET TE1-INDEX TO 1. SET TE2-INDEX TO 1. SEARCH TABLE-ENTRY1,TABLE-ENTRY2 AT END MOVE 4 TO RETURNCODE WHEN TABLE-ENTRY2(TE1-INDEX, TE2-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH

Question 45: With reference to the JOB statement, which of the following statements are correct? A. If jobs are stacked in the input queue, the null statement marks the end of the preceding job. B. The JOB statement cannot be coded in source JCL for started tasks. C. If the JOB statement is not coded in the source JCL, the system will generate one using system supplied defaults when the job is submitted. D. None of the keyword or positional parameters on the JOB statement are required. E. If the same parameters with different values are specified on both the JOB and EXEC statements, the parameters specified on the JOB statement always override those specified on the EXEC statement. Question 46: Which of the following SEARCH statements in COBOL will support the table declaration below? 01 TABLE-CTRS. 05 COUNTER OCCURS 100 TIMES INDEXED BY X 10 FIELD-1 PIC 999. 10 FIELD-2 PIC 99. A. SEARCH TABLE-CTRS WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. B. SEARCH TABLE-CTRS AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10

PERFORM 100-PROCESS-PARA END-SEARCH. C. SEARCH COUNTER WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. D. SEARCH COUNTER AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. E. SEARCH COUNTER AT END PERFORM 100-EXIT. WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA. END-SEARCH. Question 47: TABLEA has the following primary key definition: PRIMARY KEY ( COL1 ) TABLEB has the following foreign key definition: FOREIGN KEY FK1 ( COLZ ) REFERENCES TABLEA ON DELETE CASCADE What is the result when the SQL INSERT statement below is executed? INSERT INTO TABLEA ( COL1, ... ) VALUES ( 45, ... ) A. The row will be inserted in all cases. B. The row is inserted in TABLEA. If no row exists in TABLEB containing a value of 45 for COLZ, a default row is inserted into TABLEB. C. The row is inserted only if no other row in TABLEA exists where 45 is the value for COL1. D. The row is inserted only if rows exist in TABLEB that contain the value of 45 for COLZ. E. The row will be inserted only if you also insert a row into TABLEB with a value of 45 for COLZ before the next COMMIT is issued. Question 48: Which of the following statements about the DCB attributes in the following JCL code are incorrect? //DD1 DD ... DCB=(LRECL=80,RECFM=F) //DD2 DD ... DCB=(*.DD1,LRECL=90) //DD3 DD ... DCB=(FILE1,RECFM=FB) A. Both DD2 and DD3 use the referenced data set labels to determine the DCB attributes.

B. The data set defined on DD2 will have a LRECL=90 and RECFM=F. C. FILE1 must be a cataloged data set that resides on DASD. D. The DCB attributes copied include DSORG, RECFM, LRECL, and BLKSIZE. E. Any other DCB parameters can be coded on both DD2 and DD3 to override or supplement the copied attributes. Question 49: Which of the following statements correctly complete the following sentence? It would be reasonable and efficient to establish an Alternate Index on a VSAM file ... A. whose base cluster will not be updated often and whose alternate key is needed for retrieval purposes. B. where 60% of file I/O will be through the Alternate Index which contains duplicate keys. C. whose large base cluster will be heavily updated and will require an UPGRADE option. D. where 90% of file I/O will be done through the Alternate Index which will not contain duplicate keys and 10% of file I/O will be done through the primary key. E. when records added to the file are not evenly distributed throughout the file. The Alternate Index will enable VSAM to process the additions more efficiently. Question 50: Which of the following statements do not correctly describe the following JCL code and possible outcomes when it is submitted for execution? //JOB1 JOB ... //JOBLIB DD DSN=LIB1,DISP=(NEW,CATLG) //JCLLIB ORDER=(PLIB1,PLIB2) //STEP1 EXEC PGM=COPY //STEPLIB DD DSN=ULIB1,DISP=SHR //DD1 DD DSN=ULIB1(PR001),DISP=SHR //DD2 DD DSN=LIB1(PR001),DISP=MOD //STEP2 EXEC PGM=PR001

// INCLUDE MEMBER=PR001J //STEP3 EXEC PGM=PR001 //STEPLIB DD DSN=SYS1.LINKLIB,DISP=SHR // INCLUDE MEMBER=PR001J A. LIB1 is searched for program PR001 in STEP2 and, if not found, the system libraries are searched. B. Only the system libraries are searched to locate program PR001 in STEP3. C. ULIB1 is searched for program COPY and, if not found, the system libraries are searched. D. PLIB1 and PLIB2 are searched for the included members in both STEP2 and STEP3. E. For the job to complete successfully, the STEPLIB statement in STEP1 needs a VOLUME and UNIT parameter added. Question 51: What will be the results of the execution of the following IDCAMS commands if the VERIFY command returns a condition code of 4? VERIFY FILE(VSAMFILE) IF LASTCC = 0 THEN DO PRINT INDATASET(VSAM.FILE) END ELSE IF LASTCC < 8 THEN DO SET LASTCC = 0 LISTCAT ENT(VSAM.FILE) END ELSE DO DELETE VSAM.FILE CLUSTER END A. B. C. D. E.

-

The catalog entry of VSAM.FILE will be listed. The last condition code will be set to 0. VSAM.FILE will be printed. VSAM.FILE will be deleted. The last condition code will be set to 4.

Question 52: A COBOL program needs to be designed to read an employee file and to display names of all employees who joined a firm on "25-01-2006". The ENVIRONMENT DIVISION entry for the program is

displayed below. Which of the following codes when integrated with the ENVIRONMENT DIVISION entry accomplish the specified task? SELECT INDEXED-EMP ASSIGN TO DISK1 ORGANIZATION IS INDEXED ACCESS IS DYNAMIC RECORD KEY IS EMP-NO ALTERNATE RECORD KEY IS EMP-DOJ WITH DUPLICATES. A. MOVE '25-01-2006' TO EMP-LAST-NAME. START INDEXED-EMP KEY = EMP-DOJ INVALID KEY DISPLAY 'NO EMPLOYEES FOUND' CLOSE INDEXED-EMP END-START. READ INDEXED-EMP NEXT RECORD AT END MOVE 'YES' TO NO-MORERECS END-READ. B. READ INDEXED-EMP INVALID KEY PERFORM 200-ERR-PARA NOT INVALID KEY PERFORM 200-PROCESS PARA END-READ. 200-PROCESS-PARA. IF EMP-DOJ = '25-01-2006' PROCESS 500-PROCESS-PARA C. READ INDEXED-EMP AT END MOVE 'YES' TO NO-MORE-RECS IF EMP-DOJ= '25-01-2006' PROCESS 200-PROCESS-PARA END-READ. D. MOVE '25-01-2006' TO EMP-LAST-NAME. READ INDEXED-EMP KEY = EMP-DOJ INVALID KEY DISPLAY 'NO EMPLOYEES FOUND' CLOSE INDEXED-EMP END-READ. E. MOVE '25-01-2006' TO EMP-LAST-NAME. START INDEXED-EMP KEY NOT < EMP-DOJ INVALID KEY DISPLAY 'NO EMPLOYEES FOUND' CLOSE INDEXED-EMP END-START. READ INDEXED-EMP NEXT RECORD AT END MOVE 'YES' TO NO-MORERECS END-READ. Question 53: Plan PGMA is currently valid and operative. It contains the following SQL SELECT statement: EXEC SQL SELECT COUNT(*) FROM Q.TBL WHERE COL1 = :HV1 END-EXEC. The following SQL ALTER statement is issued: ALTER TABLE Q.TBL ADD NEWCOL DATE NOT NULL WITH DEFAULT What impact does this alter statement have on PGMA? A. PGMA will abend with a system 806 abend code. B. Querying SYSIBM.SYSPLAN for PGMA will show that the column VALID equals A and that PGMA is still operative. C. The alter has no impact on PGMA. D. The next time PGMA is executed it will be automatically rebound. E. The alter will issue a warning message stating that PGMA must be rebound.

Question 54: The fact that one disk volume can be owned by one and only one catalog is characteristic of which of the following? A. An ICF catalog. B. A VSAM (non-ICF) catalog. C. A Volume Table of Contents (VTOC). D. A Control Volume Catalog (CVOL). E. None of the above. From kamash

Question 20: Only three records on ESDS data set ESDS.FILE must be printed. The records are in sequential positions of 5, 6 and 7 (relative to 1), from the beginning of the file. Which of the following IDCAMS commands can be used to obtain the desired results? A. PRINT INDATASET(ESDS.FILE) COUNT(3) STARTFROM(5) B. PRINT INDATASET(ESDS.FILE) SKIP(4) PRINTNUM(3) C. PRINT INDATASET(ESDS.FILE) COUNT(3) SKIP(4) D. PRINT INDATASET(ESDS.FILE) SKIP(5) PRINT(3) E. PRINT INDATASET(ESDS.FILE) SKIP(4) COUNT(3)

Question 21: Which of the following actions will result in an SQLCODE -904? A. A deadlock. B. An attempt to update a table that is in check-pending status. C. Acquiring too many locks on a tablespace that does not allow lock escalation. D. An attempt to update a table that is in read-only status. E. An attempt to read a table that is in copy-pending status.

Question 22: Which of the following statements correctly describe the following JCL code? //JOB1 JOB 1,T,CLASS=A,MSGCLASS=X,PERFORM=26, // PRTY=13,TYPRUN=SCAN //STEP1 EXEC PGM=PR001 A. The value assigned to PERFORM can only be modified, if the installation permits, while JOB1 is on the input queue, waiting to execute. B. The value assigned to PRTY can only be modified, if the installation permits, while JOB1 is executing. C. The TYPRUN parameter indicates that the entire job will only be scanned for syntax and allocation errors, but will not execute.

D. Both the PERFORM and PRTY parameters affect the time that JOB1 will take when measured from submit to job termination. E. For systems running in compatibility mode, the PERFORM parameter will be ignored if it has been specified on the EXEC statement instead of the JOB statement

Question 23: The following COBOL program writes records to a KSDS (Key Sequenced Data Set). In what sequence should records be written? INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT OUT-KSDS ASSIGN TO OUTFILE ORGANIZATION IS INDEXED RECORD KEY IS KEY-FIELD FILE STATUS IS WS-STATUS. .... PROCEDURE DIVISION. OPEN OUTPUT OUT-KSDS. ... WRITE OUT-RECORD. A. In alternate key sequence. B. In descending record key sequence. C. In ascending record key sequence D. No special sequence is required. E. In RBA sequence

Question 24: The following is a block of code that exists in the PROCEDURE DIVISION of a COBOL program: ... EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C2, C3, C4 FROM T1 WHERE C5 = :HV5 AND C6 = :HV6 END-EXEC. EXEC SQL FETCH CSR INTO :HV1, :HV2, :HV3, :HV4 END-EXEC. ... Which of the following statements correctly describe the result of an attempt to bind and execute this program based only on the code shown above? A. An SQLCODE -501 is returned upon execution of the fetch statement. B. The program fails the bind due to logic errors. C. The code executes successfully. Cursor CS Karthik_Vaiyapuri [6:24 PM]:

C. The code executes successfully. Cursor CSR is declared, and 1 row is returned by the fetch statement. D. An SQLCODE 100 is returned after execution of the fetch statement. E. An SQLCODE -502 is returned upon execution of the fetch statement

Question 25: What are the maximum number of extents allowed for a non-UNIQUE VSAM cluster? A. 16 B. 123 C. 256 D. 1 E. There is no limit to the number of extents for a NON-UNIQUE VSAM cluster Ans: B

Question 26: Which of the following statements correctly describe stored procedures? A. Stored procedures always commit changes automatically before control is returned to the calling program. B. Stored procedures can access non-DB2 data. C. The load module used by a stored procedure resides at the client location. D. Stored procedures can execute other stored procedures. E. The DB2 command START PROCEDURE is used by a program to execute a stored procedure Question 27: A VSAM file is only accessed for sequential processing. Records are never added to the file after it is created. Which of the following actions can improve performance when using the file? A. Increase the number of Index Buffers. B. Increase the number of Catalog Buffers. C. Increase the number of Data Buffers. D. Decrease the amount of free space. E. When executing the DEFINE CLUSTER, leave the control interval size the same but decrease the maximum record size.

Question 28: Which of the following statements about special data sets are incorrect? A. Only one JCLLIB statement can be coded in a multi-step job. B. Libraries specified on a STEPLIB concatenation are searched for programs in the order that they are coded. C. The format used to concatenate data sets on the JCLLIB statement is not identical to that used for a STEPLIB concatenation. D. Neither the STEPCAT or JOBCAT data definition statements can be used if SMS

is active. E. Multiple INCLUDE statements can be coded in a job.

Question 29: Column COL_5 is defined as the following: COL_5 DECIMAL(9,4) NOT NULL WITH DEFAULT Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with the column COL_5? A. 01 COL_5 PIC S9(5)V9999 COMP. B. 01 COL_5 PIC S9(9) COMP. C. 01 COL_5 PIC S9(5)V9(4) COMP-3. D. 01 COL_5 PIC S9(9)V9999 COMP-3. E. 01 COL_5 PIC S9(9)V9999 COMP

Question 30: Which of the following DB2 utilities can be executed to remove the 'check pending' status from a DB2 tablespace containing tables with RI? A. RESET CHECK PENDING B. CHECK DATA C. CHECK INDEX D. REPAIR E. REORG Ans: B,D

Question 31: What is the name of the base cluster when the alternate index is defined as follows? DEFINE AIX (NAME(VSAM.FILE1) RELATE(VSAM.FILE2) VOL(VOLUME1) RECORDSIZE(30 30) NONUNIQUEKEY FSPC(5 10) SPEED) DATA (NAME(VSAM.FILE3) IX (NAME(VSAM.FILE4) CATALOG(VSAM.FILE5) A. VSAM.FILE1 B. VSAM.FILE3 C. VSAM.FILE2 D. VSAM.FILE4

E. VSAM.FILE5

Question 32: Which of the following statements correctly describe a plan? A. A plan must contain one or more packages. B. A plan can have multiple versions. C. When a plan is bound, it always populates the binder's PLAN_TABLE with access path information. D. A plan is executable. E. A plan can consist of both packages and DBRMs Question 33: The COBOL code below uses two arrays, ST-EMAX and ST-ELEMENT where STELEMENT can store up to 10 elements. ST-EMAX is assigned the initial value of 10. If STELEMENT is assigned the values 4,3,9,7,8,6,10,2,1,5, which of the following options display the content of the array ST-ELEMENT after the code is executed? MOVE ST-EMAX TO ST-N ST-M. 007010-LOOPER. IF (ST-M > 1) DIVIDE 2 INTO ST-M COMPUTE ST-K = ST-N - ST-M MOVE 1 TO ST-J PERFORM 007020-MAKE-PASS THRU 007020-EXIT GO TO 007010-LOOPER. 007010-EXIT. EXIT. 007020-MAKE-PASS. IF (ST-J NOT > ST-K) COMPUTE ST-L = ST-J + ST-M MOVE ST-ELEMENT(ST-L) TO ST-SAVE MOVE ST-J TO ST-I PERFORM 007030-SCAN MOVE ST-SAVE TO ST-ELEMENT(ST-L) ADD 1 TO ST-J GO TO 007020-MAKE-PASS 007020-EXIT. EXIT. 007030-SCAN. IF (ST-ELEMENT-KEY(ST-I) > ST-SAVE-KEY) MOVE ST-ELEMENT(ST-I) TO ST-ELEMENT(ST-L) MOVE ST-I TO ST-L IF (ST-I > ST-M) SUBTRACT ST-M FROM ST-I GO TO 007030-SCAN.

A. 2,4,6,8,10,1,3,5,7,9. B. 1,2,3,4,5,6,7,8,9,10. C. 10,9,8,7,6,5,4,3,2,1. D. 1,3,5,7,9,2,4,6,8,10. Question 34: Which of the following SEARCH statements in COBOL will support the table declaration below?

01 TABLE-CTRS. 05 COUNTER OCCURS 100 TIMES INDEXED BY X 10 FIELD-1 PIC 999. 10 FIELD-2 PIC 99. A. SEARCH TABLE-CTRS AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. B. SEARCH COUNTER WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. C. SEARCH TABLE-CTRS WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. D. SEARCH COUNTER AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. E. SEARCH COUNTER AT END PERFORM 100-EXIT. WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA. END-SEARCH.

Question 35: Which of the following operations can be performed on a sequential file using the SEQUENTIAL access mode? A. READ B. WRITE C. REWRITE D. DELETE E. START Question 36: How many active VSAM master catalogs can exist in an operational MVS system? A. 0 B. 123 C. 1 D. 2 E. There is no limit to the number of active VSAM master catalogs Question 37: What are the maximum number of extents allowed for a UNIQUE VSAM (nonICF) cluster on one volume? A. 256 B. 1 C. 16

D. 123 E. There is no limit to the number of extents Ans: D Question 38: Which of the following statements correctly describe the following JCL code and possible results when the JCL is submitted for execution? //BATCH1 JOB (123,456),TEST-JOB,CLASS=A,MSGCLASS=X //STEP1 EXEC PR001 // A. Job BATCH1 will not allocate any DASD, tape, or other resources because data definition statements have not been coded. B. Job BATCH1 will only run if an initiator for class A is available and started. C. If job BATCH1 gives a JCL error, it will result from a missing PROC or PGM keyword. D. Job BATCH1 will create output that will be in class X and will be held E. The four parameters coded in the JOB statement are positional Question 39: Which of the following can be used to physically remove a single record from an ESDS (Entry Sequenced Data Set)? A. An IDCAMS DELETE command. B. A COBOL DELETE command. C. An IEHVSAM DELETE command. D. An IEBGENER EDIT command. E. Records can not be physically deleted from an ESDS data set. Question 40: Which of the following options represent the number of times 100-MAIN-PARA and 200-NEW-PARA are executed on running the COBOL code below? MOVE 1 TO CTR. PERFORM 100-MAIN-PARA UNTIL CTR>20 100-MAIN-PARA. ADD 1 TO CTR. PERFORM 200-NEW-PARA WITH TEST AFTER VARYING CTR FROM 1 BY 1 UNTIL CTR>10 200-NEW-PARA. ADD 1 to CTR. A. 20, 5 B. 10, 11 C. 10, 6 D. 20, 10 E. 20, 6 Question 41: A VSAM data set is defined on one volume - VOL001. Which of the following IDCAMS commands can be used to change the volume definition to two volumes -

VOL001 and VOL002, without destroying the contents of the file? A. ALTER B. IMPORT C. CNVTCAT D. DEFINE CLUSTER E. DEFINE ALIAS Question 42: The following code is included in a COBOL program: EXEC SQL WHENEVER SQLERROR GO TO ERROR-ROUTINE END-EXEC. Which of the following statements correctly describe the code above? A. Any SQL statement that returns a negative SQLCODE in the program and physically resides after the location of this statement in that program, will pass control to the ERROR-ROUTINE paragraph. B. Any SQL statement that returns a negative SQLCODE in the program and occurs after this statement in the logical flow of the program, will pass control to the ERROR-ROUTINE paragraph. C. Any SQL statement that returns a non-zero SQLCODE in the program which occurs after this statement in the logical flow of the program, will pass control to the ERROR-ROUTINE paragraph. D. Any SQL statement that returns a non-zero SQLCODE in the program and physically resides after the location of this statement in that program, will pass control to the ERROR-ROUTINE paragraph. E. This statement will be processed only if the SQLCODE is not checked immediately following an SQL statement.

Question 43: Which of the following statements correctly describe JCL that cannot be coded in the members specified on the INCLUDE statements in the JCL code below? //JOB1 JOB //JOBLIB ORDER (MYLIB1,MYLIB2) // INCLUDE MEMBER=MEM1 // INCLUDE MEMBER=MEM2 //STEP2 PROC // INCLUDE MEMBER=MEM3 // PEND // INCLUDE MEMBER=MEM4 // INCLUDE MEMBER=MEM5

A. MEM1: JOBLIB concatenation B. MEM5: EXEC statement to execute the in-stream procedure C. MEM3: JCL to complete the in-stream procedure, which will normally be coded between the PROC and PEND statements

D. MEM2: EXEC statement followed by data definition E. MEM4: The NULL statement

Question 44: Which of the following statements about registering stored procedures are correct? A. The CREATE PROCEDURE SQL statement is used to define a stored procedure. B. If a client program uses a package, it must reside in the same collection as the stored procedure's package. C. A plan must be created for each stored procedure. D. A package must be created for each stored procedure. E. Schemas can be used to maintain multiple versions of a stored procedure Question 45: TABLEA has the following primary key definition: PRIMARY KEY ( COL1 ) TABLEB has the following foreign key definition: FOREIGN KEY FK1 ( COLZ ) REFERENCES TABLEA ON DELETE CASCADE What is the result when the SQL UPDATE statement below is executed? UPDATE TABLEB SET COLZ = newval WHERE COLZ = oldval A. The row will be updated in all cases. B. The row in TABLEB will always be updated. If no row exists in TABLEA where COL1 = newval, then a default row where COL1 = newval will be inserted. C. The row will be updated only if a row exists in TABLEA where COL1 = newval. D. The row will be updated only if no rows exist in TABLEB where COLZ = newval. E. The update will fail because foreign keys cannot be updated.

Question 46: Column END_DATE is defined as the following: END_DATE DATE NOT NULL WITH DEFAULT Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with column END_DATE? A. 01 END-DATE PIC X(10). B. 01 END-DATE PIC 9999-99-99. C. 01 END-DATE BINARY. D. 01 END-DATE CHAR(10). E. 01 END-DATE PIC 9

.

Question 47: Which of the following IDCAMS commands can be used to produce a listing of all entries in the Catalog Recovery Area (CRA)? A. PRINTCRA

B. PRINT C. LISTCAT D. RESETCRA E. LISTCRA Question 48: The following 2 aliases have been created on DB2 sub-system DSN1: CREATE ALIAS A1 FOR OWNERA.T1 CREATE ALIAS A2 FOR DSN2.OWNERA.T2 The following is pseudocode for program PGM that exists on DSN1: insert 1 row into A1 insert 1 row into A2 commit Which of the following statements correctly describe the result when PGM is executed? A. It will complete successfully committing the changes on both sub-systems. B. It will fail unless PGM1 is also bound on DSN2. C. It will fail because data cannot be modified in multiple sub-systems within a single unit of work. D. It will fail unless a connect is issued to DSN2 before inserting into A2. E. It will complete successfully. The only insert committed will be the one to A2, which was the last sub-system accessed

Question 49: Which of the following statements correctly describe the JCL statement below? //DD1 DD DSN=FILE1,DISP=(NEW,CATLG),DATACLAS=DTC1, // SPACE=(TRK,(10,100),,CONTIG), // STORCLAS=STG1 A. The primary space allocated to FILE1 is 10 tracks and must be contiguous. B. The STORCLAS parameter provides the DCB information. C. If the CONTIG sub-parameter is changed to ALX, then the primary space allocated will be the largest contiguous free area on the volume, but only if the area is larger than the amount requested. D. If the CONTIG sub-parameter is changed to MXIG, the primary area allocated is determined by building a list of the five largest contiguous free areas on the volume and allocating to the data set, all of the areas that are equal to or larger than the primary space requested. E. The DATACLAS parameter provides the volume and unit information

Question 50: Which of the following has meaning when an UPDATE subparameter is selected in the IDCAMS DEFINE PATH command? A. The program accessing the Alternate Index will automatically build the Alternate Index. B. The Alternate Index can not contain duplicate keys.

C. The Upgrade Set will be allocated when opening the Path. D. Changes to the base cluster will automatically trigger changes to the Alternate Index. E. This option does not exist for the DEFINE PATH command.

Question 51: A VSAM KSDS (Key Sequenced Data Set) is accessed only through direct (random) processing. Records are constantly being added throughout the file. Which of the following actions can improve performance when using the file? A. Decrease the amount of free space. B. Increase the number Random Access Buffers. C. Increase the number of Index Buffers. D. Increase the number of Data Buffers. E. When executing the DEFINE CLUSTER, leave the control interval size the same but decrease the maximum record size. Question 52: Plan PLNA has been bound with the DBRM from program PGM. PGM has been modified, precompiled, and compiled successfully. PLNA has been successfully rebound, but the link-edit step was omitted. What is the result when PLNA is executed again? A. The execution will be successful only if versioning is being used and the prior version still exists. B. The execution will be successful. C. The execution will fail with an -818 SQLCODE. D. The execution will fail with a system 806 abend code. E. The execution will fail with an -805 SQLCODE.

Question 53: The COBOL program below needs to be embedded with the functionality to retrieve records from an employee table using the full last name or partial string from the employee’s last name as the search criteria. Which of the following lines of code can be substituted for the ****XX**** and ****YY**** to obtain the required output? ****XX**** EXEC SQL SELECT * FROM DBNAME.EMPLOYEE_DETAIL ****YY**** END-EXEC. A. YY:WHERE LAST_NAME BETWEEN :WS-LAST-NAME AND :WS-LAST-NAME B. YY:WHERE LAST_NAME = :WS-LAST-NAME C. XX:INSPECT WS-LAST-NAME REPLACING LEADING SPACES BY * D. YY:WHERE LAST_NAME LIKE :WS-LAST-NAME E. XX:INSPECT WS-LAST-NAME REPLACING ALL SPACES BY %

Question 54: In the COBOL code snippet below EMP-FILE supports the READ, WRITE, REWRITE, DELETE, and START operations. Which of the following FD entries can be substituted for ****XX**** and ****YY**** to support the REWRITE file operation on EMPFILE? PROCEDURE DIVISION. REWRITE EMP-REC FROM OUT-REC INVALID KEY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. SELECT EMP-FILE ASSIGN TO D12A301 RESERVE 10 AREAS ****XX**** ****YY**** FILE-STATUS IS FILE-STS. A. XX: ORGANIZATION IS RELATIVE YY: ACCESS MODE IS DYNAMIC RELATIVE KEY IS EMP-NO B. XX: ORGANIZATION IS SEQUENTI C. XX: ORGANIZATION IS INDEXED YY: ACCESS MODE IS RANDOM RELATIVE KEY IS EMP-NO D. XX: ORGANIZATION IS INDEXED YY: ACCESS MODE IS SEQUENTIAL RELATIVE KEY IS EMP-NO E. XX: ORGANIZATION IS RELATIVE YY: ACCESS MODE IS RANDOM RELATIVE KEY IS EMP-NO

Captest1 Question 16: Which of the following statements about the SPACE parameter are incorrect? A. Space can be allocated starting at a specific location on a volume. B. If SMS is active, the AVGREC parameter must be coded if the SPACE parameter is coded. C. The SPACE parameter has no meaning when creating new data sets on tape and is ignored. D. The SPACE parameter, if coded on a data definition statement that specifies an existing data set, overrides the SPACE value used to create the data set. E. If SMS is active, the SPACE parameter is not required Question 17: An RRDS (Relative Record Data Set) is loaded with records with relative numbers from 1 to 100. Which record will be deleted by the following COBOL code? FILE-CONTROL. SELECT RRDS-FILE ASSIGN TO RRDSFL ORGANIZATION IS RELATIVE ACCESS IS RANDOM RELATIVE KEY IS KEY-1 FILE STATUS IS WS-STATUS.

... PROCEDURE DIVISION. OPEN I-O RRDS-FILE. MOVE 21 TO KEY-1. DELETE RRDS-FILE INVALID KEY PERFORM ERROR-RTN. A. 22 B. 1 C. 21 D. 20 E. No record will be deleted.

Ans. C Question 18: Which of the following statements about concatenation of data sets are correct? A. A DD * or DD DATA data definition statement can form part of a data set concatenation. B. Attributes assigned to data sets in a concatenation can be overridden by coding the required parameters on the relative data set. C. If the data sets in the concatenation have a record format of V, then the file with the longest records must be coded first in the concatenation. D. A GDG ALL request can be included as part of a data set concatenation. E. Data sets included in a concatenation can on

Ans. C,D Question 19: Which of the following statements about special data sets are incorrect? A. Libraries specified on a STEPLIB concatenation are searched for programs in the order that they are coded. B. Neither the STEPCAT or JOBCAT data definition statements can be used if SMS is active. C. Only one JCLLIB statement can be coded in a multi-step job. D. The format used to concatenate data sets on the JCLLIB statement is not identical to that used for a STEPLIB concatenation Question 20: In COBOL, which of the following file handling operations can be performed if a file is opened in the I-O mode? A. REWRITE B. DELETE C. WRITE D. READ E. UPDATE Question 21: Which of the following statements correctly describe the SEARCH ALL function in COBOL? A. Contains the OCCURS item and its index, which define the Table argument to the left of the comparison operator B. Allows the condition following the WHEN clause to test only for equality C. Uses both AND and OR in a compound condition D. Uses multiple WHEN clauses E. Contains table entries in a random order Ans. A,B

Question 22: Which of the following options correctly describe the EVALUATE verb in COBOL? A. Uses the WHEN A thru B statement B. Requires the END-EVALUATE statement as a terminator C. Can be implemented as an EVALUATE condition where the condition is a 88level condition or an identifier D. Uses the WHEN OTHER statement as a necessary condition E. Restricts the use of an IF statement within an EVALUATE statement Question 23: Which of the following statements correctly describe foreign keys? A. A foreign key must have a corresponding index. B. The ON DELETE clause is specified on a foreign key. C. A foreign key can reference the same table upon which it is defined. D. A foreign key can contain duplicate values. E. A foreign key can be referenced by m ultiple primary keys. Question 24: Tables T1 and T2 each contain 4 columns, all of which are defined as CHAR(1). The data from each of the two tables is shown below: T1 T2 C1 C2 C3 C4 C5 C6 C7 C8 A 1 2 3 B 5 6 7 C 3 5 1 C 3 5 6 E 7 8 9 E 7 8 1 G 5 6 7 F 2 3 4 How many rows will be processed using the following cursor? EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C2, C3 FROM T1 UNION SELECT C5, C6, C7 FROM T2 END-EXEC. A. 6 B. 8 C. 5 D. 7 E. 16 Ans.A Question 25: Which of the following statements correctly describe reasons for using stored procedures? A. They enable access to database and operating system features that are only available on the database server. B. They help reduce network traffic. C. They provide a method of calling a sub-program from DB2. D. They enable a client program to use distributed relational database technology (DRDA). E. They provide a way to implement code reuse. Question 26: Which of the following statements correctly describe the use of the PCTFREE parameter in the following code? CREATE TABLESPACE TS1

... PCTFREE 20 BUFFERPOOL BP0 A. During the execution of the LOAD utility with the REPLACE option, 20 percent of each page in the tablespace is left empty. B. During the execution of a mass insert program, 20 percent of the pages in the tablespace are left empty. C. During the execution of a mass insert program, 20 percent of each page in the tablespace is left empty. D. During the execution of the LOAD utilit

Ans. C Question 27: The following are the only SQL statements contained in program PGMA: EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C2, C3, SUM(C4) FROM T1 WHERE C5 = :HV5 AND C6 = :HV6 GROUP BY C1, C2, C3 END-EXEC. EXEC SQL OPEN CSR END-EXEC. EXEC SQL FETCH CSR INTO :HV1, :HV2, :HV3, :HV4 END-EXEC. Which of the following statements correctly describe the result if PGMA is executed multiple times? A. An SQLCODE -502 is received the second time PGMA executes. B. An SQLCODE -904 is received the second time PGMA executes. C. The program executes successfully, fetching a row if

Question 28: What will be the results of the execution of the following IDCAMS commands if the VERIFY command returns a condition code of 4? VERIFY FILE(VSAMFILE) IF LASTCC = 0 THEN DO PRINT INDATASET(VSAM.FILE) END ELSE IF LASTCC < 8 THEN DO SET LASTCC = 0 LISTCAT ENT(VSAM.FILE) END ELSE DO DELETE VSAM.FI Question 29: Table T1 contains 3 columns. C1 is defined as CHAR, and C2 and C3 are defined as SMALLINT. The following SQL statement exists in a program: EXEC SQL SELECT C2 + C3 INTO :HV-CALC FROM T1 WHERE C1 = :HV1 END-EXEC. How must the host variable HV-CALC be defined in the WORKING-STORAGE section? A. 01 HV-CALC B. 01 HV-CALC C. 01 HV-CALC D. 01 HV-CALC E. 01 HV-CALC

PIC S9 COMP. PIC S9(4) COMP. PIC S9(9) COMP. PIC S9(4) COMP-3. PIC S9(4).

Question 30: Which of the following statements correctly describe the DSNTIAR module? A. It is the program DB2 automatically calls in the event of a severe error. B. It determines if a rollback must be performed. C. It is the only way to successfully exit a DB2 program. D. It generates the message text associated with any SQLCODE. E. It is the routine that performs all the error processing in a program. Question 31: Which of the following statements accurately describe the COBOL code below, which uses the OCCURS clause? 01 TAX-TABLE OCCURS 10 TIMES. 05 GROUP-X. 10 CITY PIC X(10). 10 TAX-RATE PIC 9V99. A. A total of 180 characters are allocated to either the GROUP-X or TAX-TABLE array. B. The REDEFINE clause can be used with the OCCURS clause to redefine all data items. C. TAX-RATE can be assigned the VALUE clause. D. The OCCURS clause is defined for GROUP-X, but not for TAX-TABLE. E. The subscript for the above table declaration can be from 0 to 9. Ans. D Question 32: How many active VSAM master catalogs can exist in an operational MVS system? A. 0 B. 2 C. 123 D. 1 E. There is no limit to the number of active VSAM master catalogs. Ans. D Question 34: Which of the following statements correctly describe the following JCL code and possible results when the JCL is submitted for execution? //JOB1 JOB (123,456-T),TEST-JOB,CLASS=A,MSGCLASS=A,TYPRUN=HOLD //STEP1 EXEC PGM=PR001 //DD1 ... //STEP1 EXEC PROC=PR001 //DD1 ... A. JOB1 will cause a JCL error since the PROGRAMMER NAME parameter contains a special character which is not enclosed by parentheses or apostrophes, or both. B. JOB1 will only run if an initiator is available and started for class A. C. Restrictions will be placed on the way in which data definition statement Question 35: Which of the following statements about the DCB parameter and subparameters are incorrect? A. If the BLKSIZE sub-parameter is not coded, the system will determine an optimal block size value for data sets that contain blocked records.

B. If SMS is active, the DCB parameter is not required. C. There is a maximum value that can be specified in the LRECL sub-parameter. D. All sub-parameters of the DCB parameter can be coded as parameters. E. LRECL=0 can only be coded if RECFM=U. Question 36: What are the maximum number of extents allowed for a non-UNIQUE VSAM cluster? A. 123 B. 16 C. 1 D. 256 E. There is no limit to the number of extents for a NON-UNIQUE VSAM cluster. Question 37: Which of the following options display the correct execution order of condition operands in an IF condition? A. Parentheses -> AND -> OR B. Parentheses -> OR -> AND C. AND -> Parentheses -> OR D. Condition operands are executed from left to right regardless of the order in which they are presented. E. Condition operands are executed from right to left regardless of the order in which they are presented. Question 38: Which of the following operations can be performed on a sequential file using the SEQUENTIAL access mode? A. READ B. DELETE C. WRITE D. REWRITE E. START

Ans. A,C,D Question 39: Which of the following statements correctly describe the following JCL code? //JOB1 JOB 329,TEST,CLASS=A, // GROUP=SYS1,USER=IBMUSER,PASSWORD= //STEP1 EXEC PGM=PR001 //STEP2 EXEC PGM=PR002 //STEP3 EXEC PGM=PR003 A. JOB1 can be run as a started task without modifications. B. If the GROUP parameter is coded, both USER and PASSWORD parameters are required. C. The GROUP parameter is required only to specify a RACF group other than the submitting user's default group. D. The PASSWORD parameter can be used to change the RACF password of the userid specified on the U Question 40: Which of the following statements about the space allocated to the data set created in the following JCL statement are correct? //DD1 DD DSN=NEW.FILE,DISP=(,CATLG),UNIT=3390, // AVGREC=K,SPACE=(60,(1000,500)), // DCB=(LRECL=255,RECFM=FB),DATACLAS=DTO1

A. The amount of secondary space allocated when the initial amount allocated has been used is determined by the AVGREC parameter and the third subparameter coded on the SPACE parameter. B. Space allocations specified in the data class DTC1 are only overridden by the SPACE parameter coded on DD1. C. The AVGREC=K deter Question 42: A VSAM data set is defined on one volume - VOL001. Which of the following IDCAMS commands can be used to change the volume definition to two volumes VOL001 and VOL002, without destroying the contents of the file? A. DEFINE CLUSTER B. ALTER C. CNVTCAT D. IMPORT E. DEFINE ALIAS Question 43: Which of the following COBOL statements are not allowed when accessing an ESDS (Entry Sequenced Data Set)? A. REWRITE B. WRITE C. START D. READ E. DELETE Question 44: The following code exists in the PROCEDURE DIVISION of COBOL program PGM: EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C2, C3, C4 FROM T1 WHERE C5 = :HV5 AND C6 = :HV6 FOR UPDATE OF C2, C3, C4 END-EXEC. ... EXEC SQL UPDATE T1 SET C3 = :HVC3, C4 = :HVC4 WHERE CURRENT OF CSR END-EXEC. Which of the following statements correctly describe what happens when PGM is bound and executed? A. The bind fails because DECLARE CURSOR must be located in the WORKING-STORAGE section of a COBOL program. B. The code executes successfully. Columns C3 and C4 for the cur

Question 45: Which of the following IDCAMS commands can be used to produce a listing of all entries in the Catalog Recovery Area (CRA)? A. PRINTCRA B. LISTCAT C. RESETCRA D. PRINT E. LISTCRA Question 47: Which of the following statements correctly describe JCL that cannot be

coded in the members specified on the INCLUDE statements in the JCL code below? //JOB1 JOB //JOBLIB ORDER (MYLIB1,MYLIB2) // INCLUDE MEMBER=MEM1 // INCLUDE MEMBER=MEM2 //STEP2 PROC // INCLUDE MEMBER=MEM3 // PEND // INCLUDE MEMBER=MEM4 // INCLUDE MEMBER=MEM5 A. MEM3: JCL to complete the in-stream procedure, which will normally be coded between the PROC and PEND statements B. MEM1: JOBLIB concatenation C. MEM2: EXEC statement followed by data definition D. MEM5: EXEC sta Question 48: Which of the following statements correctly describe stored procedure result sets? A. The cursor defining the result must be declared using the WITH RETURN clause. B. The cursor name for the result set must be returned as a parameter. C. A stored procedure cannot contain multiple result sets. D. Each column specified in cursor defining the result set must be defined in the parameter list of the stored procedure. E. The client program can execute the UPDATE WHERE CURRENT OF CURSOR statement for the cursor defining the result set. Question 49: On executing the COBOL program below, which of the following options represent the number of times AMT is added to TOTAL? PERFORM 100-ADD-RTN WITH TEST AFTER VARYING X FROM 1 BY 1 UNTIL X>20 100-ADD-RTN. ADD AMT TO TOTAL. ADD 1 TO X. A. 21 B. 10 C. 9 D. 20 E. 11 Question 50: Referential integrity constraints have been defined. Which of the following actions are not valid when specifying the ON DELETE clause? A. ON DELETE NO ACTION B. ON DELETE CASCADE C. ON DELETE SET DEFAULT D. ON DELETE SET NULL E. ON DELETE RESTRICT

Question 51: Which of the following sections of a COBOL program enable declaration of a cursor? A. PROCEDURE DIVISION B. CONFIGURATION SECTION C. LINKAGE SECTION D. WORKING STORAGE SECTION E. INPUT-OUTPUT SECTION Question 52: Column COL_5 is defined as the following: COL_5 DECIMAL(9,4) NOT NULL WITH DEFAULT Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with the column COL_5? A. 01 COL_5 PIC S9(5)V9(4) COMP-3. B. 01 COL_5 PIC S9(9) COMP. C. 01 COL_5 PIC S9(5)V9999 COMP. D. 01 COL_5 PIC S9(9)V9999 COMP-3. E. 01 COL_5 PIC S9(9)V9999 COMP. Question 53: Tables T1 and T2 each contain 4 columns, all of which are defined as CHAR(1). The data from each of the two tables is shown below: C1 A C E G

T1 C2 1 3 7 5

C3 C4 2 3 5 1 8 9 6 7

T2 C5 B 7 C 3 E 7 F 2

C6 8 5 9 3

C7 C8 9 6 1 4

How many rows will be processed using the following cursor? EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C4 FROM T1 UNION ALL SELECT C5, C7 FROM T2 END-EXEC. A. 6 B. 16 C. The execution will fail Question 54: Which of the following statements correctly describe the use of SQLERRMC? A. It is the field used to pass parameters used by the SQL ROLLBACK command. B. It is the data structure that contains the SQLCODE variable. C. It is a variable contained in the SQLCA. D. It provides additional information associated with an error returned by the execution of the last SQL statement. E. It is part of the group structure variable SQLERRM.

Captest2 T-Band

Question 1: Which of the following statements correctly describe sources from which the system will not obtain DCB information? A. the DCB parameter B. the data set label C. the system or user catalog D. the program E. the DATACLAS parameter Question 2: Which of the following methods should be used to determine the number of Control Intervals (CI) in the Control Area (CA) for an existing VSAM data set? A. Print the Data Component using IEHDASDR. B. Print the Cluster using IDCAMS. C. List the Cluster's entry in the VSAM Catalog. D. Print the Data Component using IDCAMS. E. Execute the IDCAMS DIAGNOSE command Question 3: Which of the following statements correctly describe stored procedures? A. Stored procedures can execute other stored procedures. B. Stored procedures always commit changes automatically before control is returned to the calling program. C. The load module used by a stored procedure resides at the client location. D. Stored procedures can access non-DB2 data. E. The DB2 command START PROCEDURE is used by a program to execute a stored procedure.

Question 4: Which of the following statements correctly describe the following JCL code and possible results when the JCL is submitted for execution? //JOB1 JOB (123,456-T),TEST-JOB,CLASS=A,MSGCLASS=A,TYPRUN=HOLD //STEP1 EXEC PGM=PR001 //DD1 ... //STEP1 EXEC PROC=PR001 //DD1 ... A. JOB1 will cause a JCL error since the PROGRAMMER NAME parameter contains a special character which is not enclosed by parentheses or apostrophes, or both. B. Restrictions will be placed on the way in which data definition statements are coded, because of the use of non-unique STEP names. C. JOB1 will cause Question 5: Which of the following statements correctly describe the SQL HAVING clause? A. A GROUP BY clause must also be coded in the SQL statement. B. It operates by applying scalar functions to filter the data. C. It applies its search criteria on a row-by-row basis. D. It can only be used in conjunction with a SELECT statement. E. A WHERE clause must also be coded in the SQL statement.

Question 6: Which of the following PROCEDURE DIVISION statements are consistent with the FD entries for a file in the COBOL code below? SELECT EMP-FILE ASSIGN TO D12A301 RESERVE 10 AREAS ORGANIZATION IS INDEXED ACCESS MODE IS RANDOM RECORD KEY IS EMP-NO ALTERNATE RECORD KEY IS EMP-MAILID WITH DUPLICATES FILE STATUS IS FILE-STS. A. OPEN INPUT EMP-FILE. READ EMP-FILE INTO EMP-REC AT END 100-EXIT NOT AT END 500-PROCESS ENDREAD. B. OPEN I-O EMP-FILE. REWRITE OUT-REC FROM OUT-EMP INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 999-WRITE-PARA. C. OPEN OUTPUT EMP-FILE. REWRITE OUT-REC FROM OUT-EMP INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. D. OPEN I-O EMP-FILE. START EMP-FILE KEY IS EMP-NO INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. E. OPEN EXTEND EMP-FILE. DELETE EMP-FILE RECORD INVALID KEY DISPLAY 'INVALID-KEY' NOT INVALID KEY PROCESS 100-PROCESS. Question 7: The KSDS (Key Sequenced Data Set) processed by the program below consists of 3 records with keys: 1, 3, 5. What will be the results of executing the highlighted code? PROCEDURE DIVISION. OPEN INPUT IN-FILE. MOVE 5 TO RECORD-KEY. 10 START IN-FILE KEY IS NOT < RECORD-KEY. READ NEXT IN-FILE. A. Line 10 will cause a compilation error because the 'NOT <' is invalid syntax. B. The File Status will be set to '10'. C. The record with key 5 will be returned to the program. D. The record with key 1 will be returned to the program. E. An end-of-file condition will occur. Question 8: Considering the TABLE declaration of a country's population below, which of the following PERFORM statements can be used to compute the number of states that have a population greater than 1 million? 01 POPULATION-TABLE. 05 STATE OCCURS 50 TIMES. 10 DISTRICTS OCCUR 10 TIMES PIC 9(10). A. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 MOVE 1 TO COUNT. CHECK-PARA.

IF STATE(X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. B. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10 MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2) > 1 C. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X1,X2) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. D. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2,X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. E. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>500 MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE Question 9: Which of the following statements about concatenation of data sets are correct? A. Attributes assigned to data sets in a concatenation can be overridden by coding the required parameters on the relative data set. B. A DD * or DD DATA data definition statement can form part of a data set concatenation. C. If the data sets in the concatenation have a record format of V, then the file with the longest records must be coded first in the concatenation. D. A GDG ALL request can be included as part of a data set concatenation. E. Data sets included in a concatenation can onl Question 10: Three tables exist upon which RI is defined. TABLEA is the parent table that currently contains 100 rows. TABLEB currently contains 175 rows, and is defined as a child of TABLEA. TABLEC currently contains 250 rows, and is also defined as a child of TABLEA. Each of the child tables is defined with ON DELETE CASCADE. The LOAD utility is executed against TABLEA with the REPLACE, ENFORCE CONSTRAINTS, and LOG YES options specified. The input file to the LOAD utility is empty. Which of the following statements correctly describe the state of the three tables immediately following the exexecution of the LOAD utility? A. TABLEA contains 0 rows, TABLEB contains 175 rows and TABLEC contains 250 rows. B. TABLEB and TABLEC are in 'check-pending status'. TABLEA is not in any restricted status. C. All three tables can only be read and not updated since each of them are in 'check-pending status'. D. All three tables are empty. E. TABLEA contains 100 rows, TABLEB contains 175 rows and TABLEC contains 250 rows.

***************************

S band Question 10: Considering the TABLE declaration of a country's population below, which of the following PERFORM statements can be used to compute the number of states that have a population greater than 1 million? 01 POPULATION-TABLE. 05 STATE OCCURS 50 TIMES. 10 DISTRICTS OCCUR 10 TIMES PIC 9(10). A. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2,X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. B. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 MOVE 1 TO COUNT. CHECK-PARA. IF STATE(X

Which of the following statements correctly describe the SQL HAVING clause? A. It applies its search criteria on a row-by-row basis. B. It can only be used in conjunction with a SELECT statement. C. It operates by applying scalar functions to filter the data. D. A GROUP BY clause must also be coded in the SQL statement. E. A WHERE clause must also be coded in the SQL statement. A VSAM file contains records with an average size of 500 bytes and a maximum size of 512 bytes. If the file is processed mostly sequentially, which of the following Control Interval sizes of the Cluster's Data Component is the most efficient? A. 1024 bytes B. 512 bytes C. 2048 bytes D. 3072 bytes E. 4096 bytes Question 13: Versioning has been implemented for the DB2 programs. Which of the following statements correctly describe the process of versioning? A. If multiple versions of a program exist, you can fallback to a previous version by restoring a prior load module and executing it without having to rebind the program. B. If a program that matches the consistency token of the load module cannot be found, a -818 SQLCODE is returned. C. Packages can have multiple versions. D. The number of versions is controlled by DB2 via the specification of a bind parameter. E. The precompiler can generate a version identifier at precompile time

Question 14: Which of the following statements correctly describe the DSNTIAR module? A. It generates the message text associated with any SQLCODE. B. It determines if a rollback must be performed. C. It is the program DB2 automatically calls in the event of a severe error. D. It is the only way to successfully exit a DB2 program. E. It is the routine that performs all the error processing in a program.

Question 15: A VSAM file is loaded such that each Control Interval (CI) has only one record. The CI size is 512 bytes. All records are the same length - 100 bytes. Which of the following statements are true? (Note: All RBA values are in decimal representation.) A. The RBA of the first record is 1 for a KSDS file and 0 for an ESDS file. B. The RBA of the first record is 1. C. The RBA of the first record is 0. D. The RBA of the second record is 512. E. The RBA of the second record is 110 Question 16: The following procedures are required to create an Alternate Index: 1. Define Alternate Index 2. Define Path 3. Build Alternate Index 4. Define Base Cluster 5. Load records to Base Cluster Which of the following are correct sequences of performing the procedures? A. 4, 5, 1, 3, 2 B. 1, 3, 4, 2, 5 C. 1, 2, 3, 4, 5 D. 3, 5, 2, 4, 1 E. 4, 5, 1, 2, 3 Question 17: Column DEPT_NO is defined as the following: DEPT_NO INTEGER Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with the column DEPT_NO? A. 01 DEPT-NO. 05 DEPT-NO-IND PIC S9(4) COMP. 05 DEPT-NO-DATA PIC S9(9) COMP. B. 01 DEPT-NO. 05 DEPT-NO-IND PIC S9(4) COMP. 05 DEPT-NO-DATA PIC S9 COMP. C. 01 DEPT-NO PIC S9(9) COMP. D. 01 DEPT-NO E. 01 DEPT-NO

PIC S9 COMP. PIC S9(9).

Question 18: Which of the following methods should be used to determine the number of

Control Intervals (CI) in the Control Area (CA) for an existing VSAM data set? A. Print the Data Component using IEHDASDR. B. List the Cluster's entry in the VSAM Catalog. C. Print the Cluster using IDCAMS. D. Print the Data Component using IDCAMS. E. Execute the IDCAMS DIAGNOSE command

Question 19: Which of the following statements correctly describe DCB sub-parameter combinations that will cause JCL or other errors? A. DCB=(LRECL=80,RECFM=FB,BLKSIZE=3120) B. DCB=(LRECL=201,RECFM=FBS,BLKSIZE=20100) C. DCB=(LRECL=80,RECFM=VB,BLKSIZE=84) D. DCB=(LRECL=133,RECFM=VBS,BLKSIZE=13700) E. DCB=(LRECL=200,RECFM=VB,BLKSIZE=2004 Question 20: Only three records on ESDS data set ESDS.FILE must be printed. The records are in sequential positions of 5, 6 and 7 (relative to 1), from the beginning of the file. Which of the following IDCAMS commands can be used to obtain the desired results? A. PRINT INDATASET(ESDS.FILE) COUNT(3) STARTFROM(5) B. PRINT INDATASET(ESDS.FILE) SKIP(4) PRINTNUM(3) C. PRINT INDATASET(ESDS.FILE) COUNT(3) SKIP(4) D. PRINT INDATASET(ESDS.FILE) SKIP(5) PRINT(3) E. PRINT INDATASET(ESDS.FILE) SKIP(4) COUNT(3)

Question 21: Which of the following actions will result in an SQLCODE -904? A. A deadlock. B. An attempt to update a table that is in check-pending status. C. Acquiring too many locks on a tablespace that does not allow lock escalation. D. An attempt to update a table that is in read-only status. E. An attempt to read a table that is in copy-pending status.

Question 22: Which of the following statements correctly describe the following JCL code? //JOB1 JOB 1,T,CLASS=A,MSGCLASS=X,PERFORM=26, // PRTY=13,TYPRUN=SCAN //STEP1 EXEC PGM=PR001 A. The value assigned to PERFORM can only be modified, if the installation permits, while JOB1 is on the input queue, waiting to execute. B. The value assigned to PRTY can only be modified, if the installation permits, while JOB1 is executing. C. The TYPRUN parameter indicates that the entire job will only be scanned for syntax and allocation errors, but will not execute. D. Both the PERFORM and PRTY parameters affect the time that JOB1 will take when measured from submit to job termination. E. For systems running in compatibility mode, the PERFORM parameter will be

ignored if it has been specified on the EXEC statement instead of the JOB statement Question 23: The following COBOL program writes records to a KSDS (Key Sequenced Data Set). In what sequence should records be written? INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT OUT-KSDS ASSIGN TO OUTFILE ORGANIZATION IS INDEXED RECORD KEY IS KEY-FIELD FILE STATUS IS WS-STATUS. .... PROCEDURE DIVISION. OPEN OUTPUT OUT-KSDS. ... WRITE OUT-RECORD. A. In alternate key sequence. B. In descending record key sequence. C. In ascending record key sequence D. No special sequence is required. E. In RBA sequence Question 24: The following is a block of code that exists in the PROCEDURE DIVISION of a COBOL program: ... EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C2, C3, C4 FROM T1 WHERE C5 = :HV5 AND C6 = :HV6 END-EXEC. EXEC SQL FETCH CSR INTO :HV1, :HV2, :HV3, :HV4 END-EXEC. ... Which of the following statements correctly describe the result of an attempt to bind and execute this program based only on the code shown above? A. An SQLCODE -501 is returned upon execution of the fetch statement. B. The program fails the bind due to logic errors. C. The code executes successfully. Cursor CS Karthik_Vaiyapuri [6:24 PM]: C. The code executes successfully. Cursor CSR is declared, and 1 row is returned by the fetch statement. D. An SQLCODE 100 is returned after execution of the fetch statement. E. An SQLCODE -502 is returned upon execution of the fetch statement Question 25: What are the maximum number of extents allowed for a non-UNIQUE VSAM cluster? A. 16 B. 123 C. 256 D. 1 E. There is no limit to the number of extents for a NON-UNIQUE VSAM cluster Question 26: Which of the following statements correctly describe stored procedures?

A. Stored procedures always commit changes automatically before control is returned to the calling program. B. Stored procedures can access non-DB2 data. C. The load module used by a stored procedure resides at the client location. D. Stored procedures can execute other stored procedures. E. The DB2 command START PROCEDURE is used by a program to execute a stored procedure Question 27: A VSAM file is only accessed for sequential processing. Records are never added to the file after it is created. Which of the following actions can improve performance when using the file? A. Increase the number of Index Buffers. B. Increase the number of Catalog Buffers. C. Increase the number of Data Buffers. D. Decrease the amount of free space. E. When executing the DEFINE CLUSTER, leave the control interval size the same but decrease the maximum record size.

Question 28: Which of the following statements about special data sets are incorrect? A. Only one JCLLIB statement can be coded in a multi-step job. B. Libraries specified on a STEPLIB concatenation are searched for programs in the order that they are coded. C. The format used to concatenate data sets on the JCLLIB statement is not identical to that used for a STEPLIB concatenation. D. Neither the STEPCAT or JOBCAT data definition statements can be used if SMS is active. E. Multiple INCLUDE statements can be coded in a job. Question 29: Column COL_5 is defined as the following: COL_5 DECIMAL(9,4) NOT NULL WITH DEFAULT Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with the column COL_5? A. 01 COL_5 PIC S9(5)V9999 COMP. B. 01 COL_5 PIC S9(9) COMP. C. 01 COL_5 PIC S9(5)V9(4) COMP-3. D. 01 COL_5 PIC S9(9)V9999 COMP-3. E. 01 COL_5 PIC S9(9)V9999 COMP

Question 30: Which of the following DB2 utilities can be executed to remove the 'check pending' status from a DB2 tablespace containing tables with RI? A. RESET CHECK PENDING B. CHECK DATA C. CHECK INDEX D. REPAIR E. REORG

Question 31: What is the name of the base cluster when the alternate index is defined as follows? DEFINE AIX (NAME(VSAM.FILE1) RELATE(VSAM.FILE2) VOL(VOLUME1) RECORDSIZE(30 30) NONUNIQUEKEY FSPC(5 10) SPEED) DATA (NAME(VSAM.FILE3) IX (NAME(VSAM.FILE4) CATALOG(VSAM.FILE5) A. VSAM.FILE1 B. VSAM.FILE3 C. VSAM.FILE2 D. VSAM.FILE4 E. VSAM.FILE5 Question 32: Which of the following statements correctly describe a plan? A. A plan must contain one or more packages. B. A plan can have multiple versions. C. When a plan is bound, it always populates the binder's PLAN_TABLE with access path information. D. A plan is executable. E. A plan can consist of both packages and DBRMs Question 33: The COBOL code below uses two arrays, ST-EMAX and ST-ELEMENT where STELEMENT can store up to 10 elements. ST-EMAX is assigned the initial value of 10. If STELEMENT is assigned the values 4,3,9,7,8,6,10,2,1,5, which of the following options display the content of the array ST-ELEMENT after the code is executed? MOVE ST-EMAX TO ST-N ST-M. 007010-LOOPER. IF (ST-M > 1) DIVIDE 2 INTO ST-M COMPUTE ST-K = ST-N - ST-M MOVE 1 TO ST-J PERFORM 007020-MAKE-PASS THRU 007020-EXIT GO TO 007010-LOOPER. 007010-EXIT. EXIT. 007020-MAKE-PASS. IF (ST-J NOT > ST-K) COMPUTE ST-L = ST-J + ST-M MOVE ST-ELEMENT(ST-L) TO ST-SAVE MOVE ST-J TO ST-I PERFORM 007030-SCAN MOVE ST-SAVE TO ST-ELEMENT(ST-L) ADD 1 TO ST-J GO TO 007020-MAKE-PASS 007020-EXIT. EXIT. 007030-SCAN. IF (ST-ELEMENT-KEY(ST-I) > ST-SAVE-KEY) MOVE ST-ELEMENT(ST-I) TO ST-ELEMENT(ST-L) MOVE ST-I TO ST-L IF (ST-I > ST-M) SUBTRACT ST-M FROM ST-I GO TO 007030-SCAN.

A. 2,4,6,8,10,1,3,5,7,9. B. 1,2,3,4,5,6,7,8,9,10. C. 10,9,8,7,6,5,4,3,2,1. D. 1,3,5,7,9,2,4,6,8,10. Question 34: Which of the following SEARCH statements in COBOL will support the table declaration below? 01 TABLE-CTRS. 05 COUNTER OCCURS 100 TIMES INDEXED BY X 10 FIELD-1 PIC 999. 10 FIELD-2 PIC 99. A. SEARCH TABLE-CTRS AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. B. SEARCH COUNTER WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. C. SEARCH TABLE-CTRS WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. D. SEARCH COUNTER AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. E. SEARCH COUNTER AT END PERFORM 100-EXIT. WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA. END-SEARCH.

Question 35: Which of the following operations can be performed on a sequential file using the SEQUENTIAL access mode? A. READ B. WRITE C. REWRITE D. DELETE E. START Question 36: How many active VSAM master catalogs can exist in an operational MVS system? A. 0 B. 123 C. 1 D. 2 E. There is no limit to the number of active VSAM master catalogs Question 37: What are the maximum number of extents allowed for a UNIQUE VSAM (nonICF) cluster on one volume?

A. 256 B. 1 C. 16 D. 123 E. There is no limit to the number of extents Question 38: Which of the following statements correctly describe the following JCL code and possible results when the JCL is submitted for execution? //BATCH1 JOB (123,456),TEST-JOB,CLASS=A,MSGCLASS=X //STEP1 EXEC PR001 // A. Job BATCH1 will not allocate any DASD, tape, or other resources because data definition statements have not been coded. B. Job BATCH1 will only run if an initiator for class A is available and started. C. If job BATCH1 gives a JCL error, it will result from a missing PROC or PGM keyword. D. Job BATCH1 will create output that will be in class X and will be held E. The four parameters coded in the JOB statement are positional Question 39: Which of the following can be used to physically remove a single record from an ESDS (Entry Sequenced Data Set)? A. An IDCAMS DELETE command. B. A COBOL DELETE command. C. An IEHVSAM DELETE command. D. An IEBGENER EDIT command. E. Records can not be physically deleted from an ESDS data set. Question 40: Which of the following options represent the number of times 100-MAIN-PARA and 200-NEW-PARA are executed on running the COBOL code below? MOVE 1 TO CTR. PERFORM 100-MAIN-PARA UNTIL CTR>20 100-MAIN-PARA. ADD 1 TO CTR. PERFORM 200-NEW-PARA WITH TEST AFTER VARYING CTR FROM 1 BY 1 UNTIL CTR>10 200-NEW-PARA. ADD 1 to CTR. A. 20, 5 B. 10, 11 C. 10, 6 D. 20, 10 E. 20, 6 Question 41: A VSAM data set is defined on one volume - VOL001. Which of the following IDCAMS commands can be used to change the volume definition to two volumes VOL001 and VOL002, without destroying the contents of the file? A. ALTER B. IMPORT C. CNVTCAT D. DEFINE CLUSTER E. DEFINE ALIAS

Question 42: The following code is included in a COBOL program: EXEC SQL WHENEVER SQLERROR GO TO ERROR-ROUTINE END-EXEC. Which of the following statements correctly describe the code above? A. Any SQL statement that returns a negative SQLCODE in the program and physically resides after the location of this statement in that program, will pass control to the ERROR-ROUTINE paragraph. B. Any SQL statement that returns a negative SQLCODE in the program and occurs after this statement in the logical flow of the program, will pass control to the ERROR-ROUTINE paragraph. C. Any SQL statement that returns a non-zero SQLCODE in the program which occurs after this statement in the logical flow of the program, will pass control to the ERROR-ROUTINE paragraph. D. Any SQL statement that returns a non-zero SQLCODE in the program and physically resides after the location of this statement in that program, will pass control to the ERROR-ROUTINE paragraph. E. This statement will be processed only if the SQLCODE is not checked immediately following an SQL statement. Question 43: Which of the following statements correctly describe JCL that cannot be coded in the members specified on the INCLUDE statements in the JCL code below? //JOB1 JOB //JOBLIB ORDER (MYLIB1,MYLIB2) // INCLUDE MEMBER=MEM1 // INCLUDE MEMBER=MEM2 //STEP2 PROC // INCLUDE MEMBER=MEM3 // PEND // INCLUDE MEMBER=MEM4 // INCLUDE MEMBER=MEM5 A. MEM1: JOBLIB concatenation B. MEM5: EXEC statement to execute the in-stream procedure C. MEM3: JCL to complete the in-stream procedure, which will normally be coded between the PROC and PEND statements D. MEM2: EXEC statement followed by data definition E. MEM4: The NULL statement Question 44: Which of the following statements about registering stored procedures are correct? A. The CREATE PROCEDURE SQL statement is used to define a stored procedure. B. If a client program uses a package, it must reside in the same collection as the stored procedure's package. C. A plan must be created for each stored procedure. D. A package must be created for each stored procedure. E. Schemas can be used to maintain multiple versions of a stored procedure Question 45: TABLEA has the following primary key definition: PRIMARY KEY ( COL1 ) TABLEB has the following foreign key definition: FOREIGN KEY FK1 ( COLZ ) REFERENCES TABLEA ON DELETE CASCADE

What is the result when the SQL UPDATE statement below is executed? UPDATE TABLEB SET COLZ = newval WHERE COLZ = oldval A. The row will be updated in all cases. B. The row in TABLEB will always be updated. If no row exists in TABLEA where COL1 = newval, then a default row where COL1 = newval will be inserted. C. The row will be updated only if a row exists in TABLEA where COL1 = newval. D. The row will be updated only if no rows exist in TABLEB where COLZ = newval. E. The update will fail because foreign keys cannot be updated. Question 46: Column END_DATE is defined as the following: END_DATE DATE NOT NULL WITH DEFAULT Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with column END_DATE? A. 01 END-DATE PIC X(10). B. 01 END-DATE PIC 9999-99-99. C. 01 END-DATE BINARY. D. 01 END-DATE CHAR(10). E. 01 END-DATE PIC 9

.

Question 47: Which of the following IDCAMS commands can be used to produce a listing of all entries in the Catalog Recovery Area (CRA)? A. PRINTCRA B. PRINT C. LISTCAT D. RESETCRA E. LISTCRA Question 48: The following 2 aliases have been created on DB2 sub-system DSN1: CREATE ALIAS A1 FOR OWNERA.T1 CREATE ALIAS A2 FOR DSN2.OWNERA.T2 The following is pseudocode for program PGM that exists on DSN1: insert 1 row into A1 insert 1 row into A2 commit Which of the following statements correctly describe the result when PGM is executed? A. It will complete successfully committing the changes on both sub-systems. B. It will fail unless PGM1 is also bound on DSN2. C. It will fail because data cannot be modified in multiple sub-systems within a single unit of work. D. It will fail unless a connect is issued to DSN2 before inserting into A2. E. It will complete successfully. The only insert committed will be the one to A2, which was the last sub-system accessed Question 49: Which of the following statements correctly describe the JCL statement below? //DD1 DD DSN=FILE1,DISP=(NEW,CATLG),DATACLAS=DTC1, // SPACE=(TRK,(10,100),,CONTIG),

//

STORCLAS=STG1

A. The primary space allocated to FILE1 is 10 tracks and must be contiguous. B. The STORCLAS parameter provides the DCB information. C. If the CONTIG sub-parameter is changed to ALX, then the primary space allocated will be the largest contiguous free area on the volume, but only if the area is larger than the amount requested. D. If the CONTIG sub-parameter is changed to MXIG, the primary area allocated is determined by building a list of the five largest contiguous free areas on the volume and allocating to the data set, all of the areas that are equal to or larger than the primary space requested. E. The DATACLAS parameter provides the volume and unit information Question 50: Which of the following has meaning when an UPDATE subparameter is selected in the IDCAMS DEFINE PATH command? A. The program accessing the Alternate Index will automatically build the Alternate Index. B. The Alternate Index can not contain duplicate keys. C. The Upgrade Set will be allocated when opening the Path. D. Changes to the base cluster will automatically trigger changes to the Alternate Index. E. This option does not exist for the DEFINE PATH command. Question 51: A VSAM KSDS (Key Sequenced Data Set) is accessed only through direct (random) processing. Records are constantly being added throughout the file. Which of the following actions can improve performance when using the file? A. Decrease the amount of free space. B. Increase the number Random Access Buffers. C. Increase the number of Index Buffers. D. Increase the number of Data Buffers. E. When executing the DEFINE CLUSTER, leave the control interval size the same but decrease the maximum record size. Question 52: Plan PLNA has been bound with the DBRM from program PGM. PGM has been modified, precompiled, and compiled successfully. PLNA has been successfully rebound, but the link-edit step was omitted. What is the result when PLNA is executed again? A. The execution will be successful only if versioning is being used and the prior version still exists. B. The execution will be successful. C. The execution will fail with an -818 SQLCODE. D. The execution will fail with a system 806 abend code. E. The execution will fail with an -805 SQLCODE. Question 53: The COBOL program below needs to be embedded with the functionality to retrieve records from an employee table using the full last name or partial string from the employee’s last name as the search criteria. Which of the following lines of code can be substituted for the ****XX**** and ****YY**** to obtain the required output? ****XX**** EXEC SQL SELECT * FROM DBNAME.EMPLOYEE_DETAIL

****YY**** END-EXEC. A. YY:WHERE LAST_NAME BETWEEN :WS-LAST-NAME AND :WS-LAST-NAME B. YY:WHERE LAST_NAME = :WS-LAST-NAME C. XX:INSPECT WS-LAST-NAME REPLACING LEADING SPACES BY * D. YY:WHERE LAST_NAME LIKE :WS-LAST-NAME E. XX:INSPECT WS-LAST-NAME REPLACING ALL SPACES BY % Question 54: In the COBOL code snippet below EMP-FILE supports the READ, WRITE, REWRITE, DELETE, and START operations. Which of the following FD entries can be substituted for ****XX**** and ****YY**** to support the REWRITE file operation on EMPFILE? PROCEDURE DIVISION. REWRITE EMP-REC FROM OUT-REC INVALID KEY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. SELECT EMP-FILE ASSIGN TO D12A301 RESERVE 10 AREAS ****XX**** ****YY**** FILE-STATUS IS FILE-STS. A. XX: ORGANIZATION IS RELATIVE YY: ACCESS MODE IS DYNAMIC RELATIVE KEY IS EMP-NO B. XX: ORGANIZATION IS SEQUENTI C. XX: ORGANIZATION IS INDEXED YY: ACCESS MODE IS RANDOM RELATIVE KEY IS EMP-NO D. XX: ORGANIZATION IS INDEXED YY: ACCESS MODE IS SEQUENTIAL RELATIVE KEY IS EMP-NO E. XX: ORGANIZATION IS RELATIVE YY: ACCESS MODE IS RANDOM RELATIVE KEY IS EMP-NO

Captest3 Question 1: Which of the following statements describe code that cannot be contained in a member specified on the INCLUDE statement? A. a JOB statement B. a JOBLIB concatenation C. data definition statements D. a STEPLIB concatenation E. an INCLUDE statement Question 3: Plan PLNA has been bound with package PGM. Package PGM has been bound with the DBRM from PGM. PGM has been modified, precompiled, and compiled successfully. PGM has been successfully rebound, but the link-edit step was omitted. What is the result when PLNA is executed again? A. The execution is successful.

B. The execution will fail with a system 806 abend code. C. The execution is successful only if package versioning is being used and a prior version of the package still exists in DB2. D. The execution may fail with an -818 SQLCODE. E. The execution may fail with Question 4: Which of the following statements about the DCB parameter and subparameters are incorrect? A. If SMS is active, the DCB parameter is not required. B. There is a maximum value that can be specified in the LRECL sub-parameter. C. If the BLKSIZE sub-parameter is not coded, the system will determine an optimal block size value for data sets that contain blocked records. D. All sub-parameters of the DCB parameter can be coded as parameters. E. LRECL=0 can only be coded if RECFM=U.

Question 5: What are the maximum number of extents allowed for a non-UNIQUE VSAM cluster? A. 123 B. 16 C. 1 D. 256 E. There is no limit to the number of extents for a NON-UNIQUE VSAM cluster. Question 6: If all records in a VSAM file are 500 bytes and the file is almost always processed randomly, which of the following Control Interval sizes of the Cluster's Data Component is the most efficient? A. 512 bytes B. 2048 bytes C. 1024 bytes D. 3072 bytes E. 4096 bytes uestion 7: The following is a block of code that exists in the PROCEDURE DIVISION of a COBOL program: ... EXEC SQL DECLARE CSR CURSOR FOR SELECT C1, C2, C3, C4 FROM T1 WHERE C5 = :HV5 AND C6 = :HV6 END-EXEC. EXEC SQL FETCH CSR INTO :HV1, :HV2, :HV3, :HV4 END-EXEC. ... Which of the following statements correctly describe the result of an attempt to bind and execute this program based only on the code shown above? A. The program fails the bind due to logic errors. B. The code executes successfully. Cursor CSR is declared, and 1 row is returned by the fetch statement. C. An SQLCODE -501 is returned upon execution of the fetch statement. D. An SQLCODE 100 is returned after execution of the fetch statement. E. An SQLCODE -502 is returned upon execution of the fetch statement. Question 8: Consider the COBOL code snippet below that uses the SEARCH ALL function.

Which of the following lines of code comprise the correct WORKING STORAGE definition for this code? SEARCH ALL DISC-TABLE AT END PERFORM 100-EXIT WHEN ORDER-IN = CUST-ORDER AND ORDER-PRICE = PRICE-IN MULTIPLY AMT-PURCHASE BY DISC-PCT GIVING FINAL-AMT END-SEARCH. A. 01 TABLE. 05 DISC-TABLE OCCURS 50 TIMES ASENDING KEY CUST-NO INDEXED BY X. B. 10 CUST-NO PIC 9999. 10 CUST-ORDER PIC 999. 10 ORDER-PRICE PIC 99V99. 10 DISC-PCT PIC 9V99. C. 10 AMT-PURCHASE PIC 99. D. 01 TABLE. 05 DISC-TABLE OCCURS 50 TIMES. E. 01 DISC-TABLE OCCURS 50 TIMES ASENDING KEY CUST-NO INDEXED BY X. Question 10: Which of the following PROCEDURE DIVISION statements are consistent with the FD entries for a file in the COBOL code below? SELECT EMP-FILE ASSIGN TO D12A301 RESERVE 10 AREAS ORGANIZATION IS INDEXED ACCESS MODE IS RANDOM RECORD KEY IS EMP-NO ALTERNATE RECORD KEY IS EMP-MAILID WITH DUPLICATES FILE STATUS IS FILE-STS. A. OPEN OUTPUT EMP-FILE. REWRITE OUT-REC FROM OUT-EMP INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. B. OPEN I-O EMP-FILE. START EMP-FILE KEY IS EMP-NO INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 100-PROCESS. C. OPEN I-O Kameswara_Reddy [12:43 PM]: OPEN I-O EMP-FILE. REWRITE OUT-REC FROM OUT-EMP INVALID KEY DISPLAY 'INVALID KEY' NOT INVALID KEY PERFORM 999-WRITE-PARA. D. OPEN INPUT EMP-FILE. READ EMP-FILE INTO EMP-REC AT END 100-EXIT NOT AT END 500-PROCESS ENDREAD. E. OPEN EXTEND EMP-FILE. DELETE EMP-FILE RECORD INVALID KEY DISPLAY 'INVALID-KEY' NOT INVALID KEY PROCESS 100-PROCESS.

Question 11: Batch program ABC has performed a combination of 2 million INSERT, UPDATE, and DELETE statements. It has been executing for 3 hours and has not issued an SQL COMMIT statement. Since this program has never executed for this length of time before, it is canceled. Which of the following statements correctly describe what happens when the cancel command is issued? A. The job is canceled. All changes are rolled back.

B. The cancel is put into a pending status until a commit or rollback is issued. C. The job is canceled. However, the job does not end immediately. D. The b is canceled. The tables that were changed are in an unusable state. E. The job is canceled. All changes are committed. uestion 12: Which of the following methods should be used to determine the number of Control Intervals (CI) in the Control Area (CA) for an existing VSAM data set? A. Print the Data Component using IDCAMS. B. Print the Cluster using IDCAMS. C. Print the Data Component using IEHDASDR. D. List the Cluster's entry in the VSAM Catalog. E. Execute the IDCAMS DIAGNOSE command. Question 13: The first record on KSDS-FILE has a key of 1. Which of the following statements, when substituted for the line of asterisks (********), will enable line 10 to successfully delete the record? INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT KSDS-FILE ASSIGN TO INFILE ORGANIZATION IS INDEXED ACCESS IS SEQUENTIAL RECORD KEY IS KEY-1 FILE STATUS IS WS-STATUS. ... PROCEDURE DIVISION. OPEN I-O KSDS-FILE. ******** 10 DELETE KSDS-FILE. Kameswara_Reddy [12:51 PM]: A. START KSDS-FILE. B. READ NEXT KSDS-FILE. C. READ KSDS-FILE. D. MOVE 1 TO KEY-1. E. The record with a key of 1 will be deleted if the asterisks are removed and no code is added. Question 14: Considering the TABLE declaration of a country's population below, which of the following PERFORM statements can be used to compute the number of states that have a population greater than 1 million? 01 POPULATION-TABLE. 05 STATE OCCURS 50 TIMES. 10 DISTRICTS OCCUR 10 TIMES PIC 9(10). A. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X1,X2) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. B. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 MOVE 1 TO COUNT.

CHECK-PARA. IF STATE(X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. C. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10. MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2,X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. D. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>50 AFTER VARYING X2 FROM 1 BY 1 UNTIL X2>10 MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X2) > 1000000 ADD 1 TO COUNT ELSE CONTINUE. E. PERFORM CHECK-PARA VARYING X1 FROM 1 BY 1 UNTIL X1>500 MOVE 1 TO COUNT. CHECK-PARA. IF DISTRICTS(X1) > 1000000 ADD 1 TO COUNT ELSE CONTINUE.

Question 15: Variable HV1 is defined in multiple structures within the WORKING-STORAGE section of PGMA as shown below. PGMA must access HV1 from the EMP-STRUCT structure. How must the host variable be coded in an SQL statement to access the correct HV1 variable? DATA DIVISION. WORKING-STORAGE SECTION. ... 01 EMP-STRUCT. 05 HV1 PIC X(6). 01 DEPT-STRUCT. 05 HV1 PIC X(9). A. :HV1.EMP-STRUCT B. :HV1 FROM EMP-STRUCT C. :HV1 D. :EMP-STRUCT.HV1 E. :HV1 OF EMP-STRUCT Question 16: Which of the following statements correctly describe the following JCL code? //JOB1 JOB 3,TEST,CLASS=A,MSGCLASS=X,TIME=(3,20),REGION=2094K,RESTART=STEP2 //STEP1 EXEC PGM=PR001,REGION=6M,TIME=(1,20) //DD1 ... //STEP2 EXEC PGM=PRM=PR002,TIME=(1,20) //DD2 ... //STEP3 EXEC PGM=PR003,REGION=0M A. The amount of storage allocated to STEP1 is 8M, because storage is allocated in 4M increments. B. The amount of storage allocated to STEP2 is 2092K. C. Only storage taken from the private storage area below the 16MB line will be allocated to the steps in JOB1. D. If STEP1 TIME = 1M20S and STEP2 TIME = 1M20S, the maximum time that will be allowed for STEP3's execution can be determined by the following formula: STEP3 TIME = JOBTIME - (STEP1 TIME + STEP2 TIME)

E. Because the REGION parameter on the JOB statements overrides the REGION parameters on the individual steps, all the steps that execute will be allocated the same amount of storage. Question 17: Three tables exist upon which RI is defined. TABLEA is the parent table that currently contains 100 rows. TABLEB currently contains 175 rows, and is defined as a child of TABLEA. TABLEC currently contains 250 rows, and is also defined as a child of TABLEA. Each of the child tables is defined with ON DELETE CASCADE. The LOAD utility is executed against TABLEA with the REPLACE, ENFORCE CONSTRAINTS, and LOG YES options specified. The input file to the LOAD utility is empty. Which of the following statements correctly describe the state of the three tables immediately following the exexecution of the LOAD utility? A. All three tables can only be read and not updated since each of them are in 'checkpending status'. B. TABLEA contains 0 rows, TABLEB contains 175 rows and TABLEC contains 250 rows. C. TABLEB and TABLEC are in 'check-pending status'. TABLEA is not in any restricted status. D. All three tables are empty. E. TABLEA contains 100 rows, TABLEB contains 175 rows and TABLEC contains 250 rows.

Question 20: Which of the following operations can be performed on a sequential file using the SEQUENTIAL access mode? A. REWRITE B. WRITE C. DELETE D. READ E. START Question 21: A COBOL programmer writes the code below in order to calculate the factorial of a number N. The number N is derived from the terminal, N!=1*2*3*...(N-1)*N. FACT stores the final value and can store any large value. Which of the following lines of COBOL code can be substituted for the ****X**** in the code below to obtain the required output? DISPLAY 'An Integer'. ACCEPT N. ****X**** DISPLAY 'Factorial' FACT. A. MOVE 1 TO X. PERFORM UNTIL X>N ADD 1 TO X MULTIPLY X TO FACT GIVING FACT END-PERFORM. B. PERFORM VARYING X FROM 1 BY 1 UNTIL X>N MULTIPLY X TO FACT GIVING FACT END-PERFORM. C. PERFORM N TIMES MULTIPLY X TO FACT GIVING FACT END-PERFORM. D. PERFORM WITH TEST AFTER VARYING X FROM 1 BY 1 UNTIL X>N MULTIPLY X TO FACT GIVING FACT END-PERFORM.

E. PERFORM VARYING X FROM N BY -1 UNTIL X<2 MULTIPLY X TO FACT GIVING FACT END-PERFORM. uestion 22: Which of the following statements correctly describe the SQL HAVING clause? A. It can only be used in conjunction with a SELECT statement. B. It applies its search criteria on a row-by-row basis. C. A GROUP BY clause must also be coded in the SQL statement. D. It operates by applying scalar functions to filter the data. E. A WHERE clause must also be coded in the SQL statement. Question 23: It is expected that about 10% of the records will be added to a KSDS data set after the initial load and the added records will not be randomly distributed. Which is the most efficient parameter that can be substituted for the asterisks (********) below? DEFINE CLUSTER (NAME(VSAM.FILE)) DATA (NAME(VSAM.FILE.DATA) VOLUMES(TEST01) RECORDSIZE(500 1000) CYLINDERS(50 10) ******** KEYS(50 10)) INDEX (NAME(VSAM.FILE.INDEX)) A. FREESPACE(0 0) -Guss B. FREESPACE(50 0) C. FREESPACE(20 20) D. FREESPACE(50 10) E. FREESPACE(0 50) Question 24: Which of the following options represent the number of levels supported by a multiple-level array in COBOL? A. 10 B. 8 C. 11 D. 9 E. 7 Question 25: What are the maximum number of extents allowed for a UNIQUE VSAM (non-ICF) cluster on one volume? A. 256 B. 1 C. 16 D. 123 E. There is no limit to the number of extents.

Question 26: Which of the following statements correctly describe the following JCL statement? //DD1 DD DSN=FILE1,DISP=(,CATLG),UNIT=3390, // DCB=(LRECL=80),SPACE=(3120,800,,,RLSE,CONTIG,ROUND), // VOL=DASD01 A. Secondary allocations are permitted. B. ROUND causes a space request in units of blocksize to be allocated on cylinder boundaries. C. ROUND is a device-dependent way of allocating space in cylinders. D. Excess space will be released if the job abnormally terminates. E. The data set FILE1 will have a DSORG of PO. Question 27: The following code is contained in a stored procedure: EXEC SQL UPDATE TABLEA SET COL1 = :HV1 WHERE COL2 = :HV2 END-EXEC. Which of the following statements correctly describe the result if the code encounters a deadlock and control is returned to the client program? A. If the SQLCA is returned from the stored procedure, it must be interrogated to determine the SQLCODE, and the client program must take appropriate action. B. The client program receives an SQLCODE -913 upon return of control from the stored procedure. C. The stored procedure passes control to an error routine where it can decide whether to commit or rollback the unit of work. D. The stored procedure is immediately rolled back and returns control to the client program. E. If the SQLCA is not returned from the stored procedure, processing continues as though an error was not encountered. Question 29: An RRDS (Relative Record Data Set) is loaded with records with relative numbers from 1 to 100. Which record will be deleted by the following COBOL code? FILE-CONTROL. SELECT RRDS-FILE ASSIGN TO RRDSFL ORGANIZATION IS RELATIVE ACCESS IS RANDOM RELATIVE KEY IS KEY-1 FILE STATUS IS WS-STATUS. ... PROCEDURE DIVISION.

OPEN I-O RRDS-FILE. MOVE 21 TO KEY-1. DELETE RRDS-FILE INVALID KEY PERFORM ERROR-RTN A. 1 B. 20 C. 22 D. 21 E. No record will be deleted. ERROR-RTN will be performed.

Question 30: What will be the results of the execution of the following IDCAMS commands if the VERIFY command returns a condition code of 4? VERIFY FILE(VSAMFILE) IF LASTCC = 0 THEN DO PRINT INDATASET(VSAM.FILE) END ELSE IF LASTCC < 8 THEN DO SET LASTCC = 0 LISTCAT ENT(VSAM.FILE) END ELSE DO DELETE VSAM.FI DELETE VSAM.FILE CLUSTER END

-

A. VSAM.FILE will be printed. B. The catalog entry of VSAM.FILE will be listed. C. VSAM.FILE will be deleted. D. The last condition code will be set to 0. E. The last condition code will be set to 4. uestion 31: Program PGM1 has been coded. One of the host variables used in the program has not been defined. Which of the following statements correctly describe the impact this omission has on the preparation and execution of PGM1? A. The DB2 precompiler will define the host variable for you. The program will bind and execute successfully. B. The DB2 precompiler will issue an error message. C. The DB2 precompiler will issue a warning message. D. The COBOL compiler will issue an error message. E. The omission will not be discovered until PGM1 is executed. Question 32: How many active VSAM master catalogs can exist in an operational MVS system? A. 1 B. 2 C. 0

D. 123 E. There is no limit to the number of active VSAM master catalogs. Question 35: Which of the following statements about special data sets are incorrect? A. Neither the STEPCAT or JOBCAT data definition statements can be used if SMS is active. B. Only one JCLLIB statement can be coded in a multi-step job. C. Libraries specified on a STEPLIB concatenation are searched for programs in the order that they are coded. D. The format used to concatenate data sets on the JCLLIB statement is not identical to that used for a STEPLIB concatenation. E. Multiple INCLUDE statements can be coded in a job. .

Question 36: Which of the following statements about the JOB and EXEC statements are correct? A. A job has a limit of 255 EXEC statements. This limit refers only to those coded in the source JCL, and does not include those from either cataloged or in-stream procedures. B. Jobs with identical job names can run concurrently if the CLASS parameter specifies a different class for each job. C. The name on the EXEC statement is not required. D. In a multi-step job, different steps cannot have the same step names. E. The step name can never be identical to the associated job name. Question 37: Which of the following statements correctly describe the following JCL code and possible results when the JCL is submitted for execution? //JOB1 JOB (123,456-T),TEST-JOB,CLASS=A,MSGCLASS=A,TYPRUN=HOLD //STEP1 EXEC PGM=PR001 //DD1 ... //STEP1 EXEC PROC=PR001 //DD1 ... A. Restrictions will be placed on the way in which data definition statements are coded, because of the use of non-unique STEP names. B. JOB1 will cause a JCL error since the program and the procedure name are identical. C. JOB1 will only run if an initiator is available and started for class A. D. JOB1 will cause a JCL error since the PROGRAMMER NAME parameter contains a special character which is not enclosed by parentheses or apostrophes, or both. E. The output produced by JOB1 will need to be released by an operator before it will print because of the TYPRUN=HOLD parameter.

Question 38: How can you identify if non-zero digits have been dropped from the fractional part of a number used as an operand in a multiplication or division operation? A. SQLWARN2 is set to 'W'. B. SQLWARN1 is set to 'W'. C. DECTRUNC is set to 'Y'. D. SQLWARN7 is set to 'W'. E. SQLERRD(3) is set to 'Y'. uestion 39: Which of the following statements correctly describe reasons for using stored procedures? A. They enable access to database and operating system features that are only available on the database server. B. They help reduce network traffic. C. They provide a method of calling a sub-program from DB2. D. They enable a client program to use distributed relational database technology (DRDA). E. They provide a way to implement code reuse.

Question 40: Which of the following statements about search order are correct? A. A JOBLIB concatenation will be searched whether a STEPLIB has been coded or not. B. A JOBLIB statement is placed between the JOB statement and the first EXEC statement. C. A JCLLIB statement is coded as the first data definition statement in the first step. D. The JCLLIB statement affects the search order for procedures and members specified on an INCLUDE statement. E. A JOBCAT modifies the order in which catalogs are searched for data sets. 41: Which of the following SEARCH statements can be used for the TABLE declaration in the COBOL program below? 01 TABLE-1. 05 TABLE-ENTRY1 OCCURS 10 TIMES INDEXED BY TE1-INDEX. 10 TABLE-ENTRY2 OCCURS 10 TIMES INDEXED BY TE2-INDEX. 20 KEY1 PIC X(5). 20 KEY2 PIC X(10). A. SET TE1-INDEX TO 1. SEARCH TABLE-ENTRY1 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY1(TE1-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH B. SET TE1-INDEX TO 1. SET TE2-INDEX TO 1. SEARCH TABLE-ENTRY1 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY1(TE1-INDEX, TE2-INDEX) = "A1234AAAAAAAA00"

MOVE 0 TO RETURN-CODE END-SEARCH C. SET TE1-INDEX TO 1. SEARCH TABLE-ENTRY2 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY2(TE1-INDEX, TE1-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH D. SET TE1-INDEX TO 1. SET TE2-INDEX TO 1. SEARCH TABLE-ENTRY2 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY2(TE1-INDEX, TE2-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH E. SET TE1-INDEX TO 1. SET TE2-INDEX TO 1. SEARCH TABLE-ENTRY1,TABLE-ENTRY2 AT END MOVE 4 TO RETURN-CODE WHEN TABLE-ENTRY2(TE1-INDEX, TE2-INDEX) = "A1234AAAAAAAA00" MOVE 0 TO RETURN-CODE END-SEARCH

Question 42: The KSDS (Key Sequenced Data Set) processed by the program below has records with keys 1, 2 and 3. What will be the results after the highlighted code is executed? INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT INREC ASSIGN TO INFILE ORGANIZATION IS INDEXED ACCESS IS DYNAMIC RECORD KEY IS REC-KEY FILE STATUS IS WS-STATUS. ... PROCEDURE DIVISION. OPEN INPUT INREC. READ INREC NEXT. MOVE 3 TO REC-KEY. START INREC. A. No record will be returned to the program. B. The highlighted code will cause a compilation error. C. The record with a key of 3 will be returned to the program. D. The record with a key of 1 will be returned to the program. E. FILE STATUS will be set to '92'.

Question 43: Column CMT_STR is defined as the following: CMT_STR VARCHAR(80) NOT NULL

Which of the following statements will correctly define a host variable in the WORKINGSTORAGE section for use with the column CMT_STR? A. 01 CMT-STR VARCHAR(80). B. 01 CMT-STR. 05 CMT-STR-LEN PIC S9(4) COMP. 05 CMT-STR-DATA PIC X(80). C. 01 CMT-STR. 05 CMT-STR-LEN PIC S9(4). 05 CMT-STR-DATA PIC X(80). D. 01 CMT-STR PIC X(80). E. 01 CMT-STR-LEN PIC S9(4) COMP. 01 CMT-STR-DATA PIC X(80). Question 44: What is the default for the number of buffers when processing a KSDS file in a COBOL program? A. 1 Data buffer and 1 Index buffer. B. 2 Data buffers and 1 Index buffer. C. 2 Data buffers and 2 Index buffers. D. 1 Data buffer and 2 Index buffers. E. 5 Data buffers and 2 Index buffers.

Question 45: Which of the following statements correctly describe DCB sub-parameter combinations that will cause JCL or other errors? A. DCB=(LRECL=201,RECFM=FBS,BLKSIZE=20100) B. DCB=(LRECL=133,RECFM=VBS,BLKSIZE=13700) C. DCB=(LRECL=80,RECFM=FB,BLKSIZE=3120) D. DCB=(LRECL=80,RECFM=VB,BLKSIZE=84) E. DCB=(LRECL=200,RECFM=VB,BLKSIZE=2004)

Question 46: Which of the following has meaning when an UPDATE subparameter is selected in the IDCAMS DEFINE PATH command? A. Changes to the base cluster will automatically trigger changes to the Alternate Index. B. The Alternate Index can not contain duplicate keys. C. The Upgrade Set will be allocated when opening the Path. D. The program accessing the Alternate Index will automatically build the Alternate Index. E. This option does not exist for the DEFINE PATH command.

Question 47: Which of the following SEARCH statements in COBOL will support the table

declaration below? 01 TABLE-CTRS. 05 COUNTER OCCURS 100 TIMES INDEXED BY X 10 FIELD-1 PIC 999. 10 FIELD-2 PIC 99. A. SEARCH TABLE-CTRS AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. B. SEARCH COUNTER WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. C. SEARCH COUNTER AT END PERFORM 100-EXIT WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. D. SEARCH TABLE-CTRS WHEN FIELD-1 = 100 OR FIELD-2 = 10 PERFORM 100-PROCESS-PARA END-SEARCH. E. SEARCH COUNTER AT END PERFORM 100-EXIT. WHEN FIELD-1 = 100 AND FIELD-2 = 10 PERFORM 100-PROCESS-PARA. END-SEARCH.

Question 48: The following statement is in a COBOL program: EXEC SQL UPDATE T1 SET C1 = CURRENT DATE WHERE C3 = :HV END-EXEC. How can one determine how many rows were updated by this SQL statement? A. Check the ROWCOUNT variable. B. Check the SQLSTATE variable. C. Check the SQLUPDCT variable. D. Check the SQLERRD(3) variable. E. There is no way to know this information. Question 49: In COBOL, which of the following PROCEDURE DIVISION entries enable a user to read and then update a sequential file?

A. OPEN EXTEND EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC. B. OPEN INPUT EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC. C. OPEN I-O EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD WRITE FILE-REC FROM OUT-REC. D. OPEN OUTPUT EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC.

E. OPEN I-O EMP-FILE. READ EMP-FILE AT END PERFORM 100-EXIT AT NO END PERFORM 100-PROCESS. 100-PROCESS. IF EMP-NO = EMP-NO-HOLD REWRITE FILE-REC FROM OUT-REC.

Question 50: TABLEA has the following primary key definition: PRIMARY KEY ( COL1 ) TABLEB has the following foreign key definition: FOREIGN KEY FK1 ( COLZ ) REFERENCES TABLEA ON DELETE CASCADE What is the result when the SQL UPDATE statement below is executed? UPDATE TABLEB SET COLZ = newval WHERE COLZ = oldval A. The row will be updated only if a row exists in TABLEA where COL1 = newval. B. The row will be updated in all cases. C. The row in TABLEB will always be updated. If no row exists in TABLEA where COL1 = newval, then a default row where COL1 = newval will be inserted. D. The row will be updated only if no rows exist in TABLEB where COLZ = newval.

E. The update will fail because foreign keys cannot be updated. Question 51: Which of the following is the basic unit of information VSAM transfers between disk storage and virtual storage? A. A Control Interval (CI) B. A Control Area (CA) C. A Cylinder D. A Track E. A Physical Block Question 52: Which of the following VSAM objects can be described as follows: -It is structured as a KSDS cluster with two key ranges -It has Index and Data components -It occupies its own Data Space which it can share with other VSAM objects -It contains self-describing records A. VSAM (non-ICF) User Catalog B. Basic Catalog Structure (BCS) C. VSAM (non-ICF) Master Catalog D. VSAM Volume Data Set (VVDS) E. Control Volume Catalog (CVOL)

Question 53: Versioning has been implemented for the DB2 programs. Which of the following statements correctly describe the process of versioning? A. Packages can have multiple versions. B. The number of versions is controlled by DB2 via the specification of a bind parameter. C. If multiple versions of a program exist, you can fallback to a previous version by restoring a prior load module and executing it without having to rebind the program. D. If a program that matches the consistency token of the load module cannot be found, a -818 SQLCODE is returned. E. The precompiler can generate a version identifier at precompile time. Question 54: Which of the following IDCAMS commands should be used to list all VSAM catalog entries with names starting with TEST.FILE? (e.g. TEST.FILE, TEST.FILE.ONE, TEST.FILE.ONE.DATA, etc.) A. LISTCAT ENTRIES(TEST.FILE) ALL B. LISTCAT LEVEL(TEST.FILE.*) ALL C. LISTCAT ENTRIES(TEST.FILE.*) ALL D. LISTCAT ENTRIES(TEST.FILE*) ALL E. LISTCAT LEVEL(TEST.FILE) ALL

Related Documents

Cap1
November 2019 33
Cap1.
December 2019 39
Cap1
April 2020 29
Cap1
October 2019 37
Cap1
October 2019 33
Cap1.doc
June 2020 1