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 ?    24 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes S(8) comp field occupy and its maximum value?

1630


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

648


Difference between cobol and cobol-ii?

704


For rewrite, why is it mandatory that file needs to be opened?

623


how do you define single dimensional array and multidimensional array in your cobol?

674






How to know whether the module is dynamical or statistical?

655


What is perform what is varying?

708


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

699


What are the different rules for performing sort operation?

761


What is the utilization of copybook in cobol?

657


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1771


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1588


Why did you choose to work with ibm mainframe cobol programming?

631


What is redefines clause in COBOL?

851


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

631