can we display comp-3 variables. if we want to display what
we have to do . give me one example

Answer Posted / vivekananda

We can't display COMP-3 directly so we have to move the value into another variable, check this given example.

01 A1 PIC S9(4) COMP-3 VALUE 1234.
01 A1-NUM PIC S9(4) VALUE ZEROES.
01 B1 PIC X(4).

MOVE A1 TO A1-NUM.
MOVE A1-NUM TO B1.
DISPLAY B1.

Is This Answer Correct ?    25 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What guidelines should be followed to write a structured cobol prgm?

855


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8655


What are literals?

833


Difference between cobol and cobol-ii?

926


What are the access modes of START statement?

919






what is amode(24), amode(31), rmode(24) and rmode(any)?

882


) how do u code after getting data?

1769


What is an in line perform? When would you use it? Anything else you wish to say about it.

821


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1874


how do you reference the ksds vsam file formats from cobol programs

866


how do you reference the printer file formats from cobol programs

878


i need a small 3d program using inline and outline.

1872


What is the Purpose of Pointer in the string?

812


What is comp-1 and comp-2?

922


What is a report item?

889