Cobol Question:

What happens when we move a comp-3 field to an edited (say z (9). ZZ-)?

Cobol Interview Question
Cobol Interview Question

Answer:

The editing characters r to be used with data items with usage clause as display which is the default. When u 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 u want this particular data item to be edited u have to move it into a data item whose usage is display and then have that particular data item edited in the format desired.


Previous QuestionNext Question
What divisions, sections and paragraphs are mandatory for a COBOL program?What is the difference between external and global variables?