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

what is s013u000 for?

1 Answers   Hewitt,


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 is the use of intialize verb?

0 Answers  


How do you define a sort file in JCL that runs the COBOL program?

6 Answers   Syntel,


What is amode(31)

0 Answers  






can we write paragraph in area B .....

4 Answers   L&T,


i want to enter the name 'pandu' into ur table how?

1 Answers   Fidelity,


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

0 Answers  


can internal sort be applied to sort ksds files?

1 Answers  


how to transfer the file from pc to mainframe??

3 Answers  


In an array processing what is the thing that can be done by using subscripts but not by using index

4 Answers   JPMorgan Chase,


What is LENGTH in COBOL II?

2 Answers   CSC,


Categories