CSCI 465 Name _____________________ Summer, 2009 Quiz 6 (10 points) On multiple choice questions, pick the best available answer. True-false questions are 1 point each; the rest are 2 points each. Other problems are worth points as marked. 1. Suppose I use the Accept verb in my COBOL program: Accept This-Date from Date. What information is obtained from the operating system? A. The time of day in register 0 and the date in register 1. B. The Julian date in YYDDD format. C. The date in DDMMYYYY format. *** D. The date in YYMMDD format. E. None of these. 2. The COBOL Read statement refers to a COBOL file name. *** A. True B. False 3. Suppose we have these variables: 01 Field-1 Pic 99V999 Value 33.378. 01 Field-2 Pic 99V99. The statement: Move Field-1 to Field-2 Rounded A. will place the digits 3338 in Field-2. B. will place the digits 3337 in Field-2. C. will place the digits 33378 in Field-2. *** D. will cause a message about a syntax error. E. will cause an ABEND at run time. 4. A COBOL table is created using a Data Division item at a level greater than 01, using the ?Occurs? clause. *** A. True B. False 5. In COBOL, which of the following (A - D) is not a way to increment a field called Count by the value 5? Assume Count has picture clause 999 and already contains a valid number. A. Add 5 to Count. B. Add Count to 5 Giving Count. C. Compute Count = Count + 5. D. Add 1 1 1 1 1 to Count. *** E. Add Count to 5. 6. (2 points) Suppose I define this as part of a detail line: 05 Neat-Num Pic $$$$,$$$,$$9.99BDB. Now suppose that I move the value -532864.9 to Neat-Num. Write out exactly the contents of Neat-Num after the move. Be sure to include every byte. Represent a blank with the letter 'b'. You will need all these spaces. _b_b_b_b_$_5_3_2_,_8_6_4_._9_0_b_D_B_