B200896 G.

asked • 04/10/16

Cobol Questions

QUESTION 26

MOVE 123 TO FIELD-B, where FIELD-B has PIC 9(2), results in what value in
FIELD-B? ______________________________________________________________
QUESTION 27

MOVE ‘ABCD’ TO FIELD-D, where FIELD-D has PIC X(3), results in what value in FIELD-D? ____________________________________________________________
QUESTION 28

If FIELD-A has PIC 9V99, to print the decimal point, move FIELD-A to an edited field with PIC ____________________________________________________________
QUESTION 29

If a value -1234 is moved to a field with PIC +ZZZ9, what will be printed?
QUESTION 30

What is the value in AMOUNT after the following statement is executed?
COMPUTE AMOUNT = 2 ** 3 + 4 / 2 - 1
___________________________________________________________
QUESTION 31

If TOTAL has PIC 99V9, what value is in TOTAL after the following statement is
executed?
ADD 12.82 7.07 GIVING TOTAL
QUESTION 32

What is the value in WS-REMAINDER after the following statement is executed?
DIVIDE 3 INTO 17 GIVING RESULT REMAINDER WS-REMAINDER
QUESTION 33

After the following two statements are executed, what value is in AMOUNT?
MOVE 5 TO AMOUNT
ADD 1 2 3 TO AMOUNT _________________________________________________________________
QUESTION 34

At the State University, tuition is $350 per credit hour. Health insurance is 10% of total tuition fee;
Fees are $125.


Assume NUM-CREDITS-IN is part of an input record for a given student.

Write the COBOL code to calculate WS-TUITION-FEE, WS-HEALTH-COST, and WS-TOTAL-BILL.
Use the verbs ADD, MULTIPLY.
QUESTION 35

Assume you want to print out the following line in the heading of your report:

DATE: 06/22/2015


Write the DATA DIVISION code to define the output line for the above date.
Then code the statements in the PROCEDURE DIVISION to get the current date from the system, move the date to the output line using reference modication, then write REPORT-REC from the HEADER1 that describes the output line.

HINT ****This is exactly what you do in the INITIALIZE-RTN.

Use the intrinsic function CURRENT-DATE.

(To help you get started)

01 WORK-AREA.
05 WS-DATE PIC X(8

1 Expert Answer

By:

Inactive Tutor answered • 5d

Tutor
New to Wyzant

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.