can we display comp-3 variables. if we want to display what
we have to do . give me one example
Answer Posted / 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 |
Post New Answer View All Answers
Write down the divisions of cobol program?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
Explain the configuration section of a cobol program with examples of syntax.
A table has two indexes defined. Which one will be used by the SEARCH?
Describe the cobol database components?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
how to move the records from file to array table. give with code example
How many bytes S(8) comp field occupy and its maximum value?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Write a program to enter and display the names of students in a class using the occurs clause.
what is s000 u4087 error? please give the all error codes in cobol,jcl.
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is the difference between perform … with test after and perform … with test before?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is the default value(s) for an initialize and what keyword allows for an override of the default?