Interview Questions

What happens when we move a COMP-3 field to ...

COBOL Interview Questions


(Continued from previous question...)

What happens when we move a COMP-3 field to ...

Q: What happens when we move a COMP-3 field to an edited ( say Z(9). ZZ.)

A: The editing characters r to be used with data items with usage clause as display which is the default. When you tries displaying a data item with usage as computational it does not give the desired display format because the data item is stored as packed decimal. So if you want this particular data item to be edited you have to move it into a data item whose usage is display and then have that particular data item edited in the format desired.

(Continued on next question...)

Other Interview Questions