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

) How do u handle errors in BMS macro

0 Answers   IBM,


Write a program to explain size error.

0 Answers  


I got user abend U4038 while compiling my runjcl.. can anyone help me?

10 Answers   CGI,


how to move the records from file to array table. give with code example

0 Answers   ADP, Syntel,


How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. stop run. para1: move 10 to a.

5 Answers  






How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a

3 Answers   TCS,


what are the diferences b/w sub-script and index?

4 Answers  


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


What is a scope terminator? Give examples.

2 Answers  


What are the different types of condition in cobol and write their forms.

0 Answers  


Categories