can we display comp-3 variables. if we want to display what
we have to do . give me one example
Answers were Sorted based on User's Feedback
Answer / craig
You can display them, but they will appear non-numeric.
Move the field to a WS field defined as pic +9('number of
digits') and display the WS field to make the data user-
friendly.
| Is This Answer Correct ? | 22 Yes | 4 No |
Answer / 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 |
Answer / narayana g
You can display the COMP-3 variable by redefining to numeric
variable.
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / antony
We will get the actual value of the variable, so we need to
either redefine or move that to an equivalent numeric
variable to display it.
| Is This Answer Correct ? | 9 Yes | 1 No |
HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?
How many bytes do a s9 (7) comp-3 field occupy?
How do you compile cobol program..?
How you can read the file from bottom?
What is the utilization of copybook in cobol?
What are the two search techniques ?
Write a program to enter and display the names of students in a class using the occurs clause.
wht is load module and object module ?
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
what is call by value and call by reference ?
3 Answers Infosys, ITC Indian Tobacco Company,
What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?
How to know whether the module is dynamical or statistical?