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


Please Help Members By Posting Answers For Below Questions

what happens if parmparameter passes zero bytes to the program

1667


In which area will you utilize 88 level items in cobol?

722


What is the difference between comp and comp-3?

704


What are the different open modes available in cobol?

722


What is a SSRANGE and NOSSRANGE?

824






Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

678


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2013


What are the pertinent COBOL

2045


How do u write test cases?

1638


What is the Purpose of Pointer in the string?

643


How to use the same COBOL program in Batch and CICS on lines? explain with an example

1914


Difference between array and sub-script ?

1169


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

720


What do you understand by psb and acb?

667


What is amode(24)?

684