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 file organization clause ?

2 Answers  


Following questions were asked in Capegemini on 8th sep,2012 mainframe test 1.)Condition code for dul recors in VSAM- 2.) Is NULL or =NULL in Select statement 3.)max size of CI 4.)What happens after CI is full 5.)Ques on COND parameter 6.)which among following can not be rolled back a)delete table b.)droptable c)Update d.)insert 7.)groupby and orderby sql querries 8.)Max extents in VSAM file 9.)quesn on DPRTY=(1,10) 10.)range of condition codes in COBOL 11.)occurs clase can not be used at which level? 12.)delimiter in jcl 13.)sort card for file in PGM=SORT 14.)PIC(6) value 120056 possible? 15)question on BLKSIZE Is (20,20) and (20,10) possible? 16.)number of bytes in RDF 17.)Can we use index in WS-section or LK-section 18.)Verify command in IDCAMS used for? 19.)question on Alternate Index 20.)Return code of file attribute mismatch 21.)In which format COBOL variables stored? 22.)what is Alternate of HANDLE? 23.)can SUM,AVG,MIN,ROUND used in numeric and char variable data types? 24.)What is the datatype of FILE STATUS codes in WS-section?

2 Answers   Cap Gemini,


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

0 Answers  


The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290

4 Answers   TCS,


what is level 66 means??

7 Answers  


what is ASRA, AEY9?

2 Answers   IBM,


Name the divisions in a COBOL program ?

7 Answers  


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,


Which is not true about evaluate statement

0 Answers  


what is the default print format? in cobol

3 Answers   HSBC,


What are decleratives in COBOL ?

1 Answers   Xansa,


What is the difference between NEXT SENTENCE and CONTINUE?

2 Answers   Mphasis,


Categories