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



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

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

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

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

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

Answer / narayana g

You can display the COMP-3 variable by redefining to numeric
variable.

Is This Answer Correct ?    16 Yes 2 No

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

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

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

Answer / munna

yes we can display with normal display command

Is This Answer Correct ?    8 Yes 20 No

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

Answer / kanika

yes using Display command

Is This Answer Correct ?    7 Yes 34 No

Post New Answer

More COBOL Interview Questions

what is the coding difference between COBOL and CICS.

8 Answers   Cap Gemini,


what happens if we wont give timestamp in precompilation process ?

4 Answers   Covansys,


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

0 Answers  


What was removed from COBOL in the COBOL II implementation?

0 Answers  


how do you reference the printer file formats from cobol programs

0 Answers  






How you can read the file from bottom?

0 Answers  


Why would you use find and get rather than to obtain?

0 Answers  


What is the difference between copy and include in cobol?

1 Answers  


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


what happens if parmparameter passes zero bytes to the program

0 Answers   HSBC,


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?

1 Answers   CTS,


If I want to increase the Limit in GDG. What should I do?

1 Answers   IBM,


Categories