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
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 |
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 |
Answer / narayana g
You can display the COMP-3 variable by redefining to numeric
variable.
Is This Answer Correct ? | 16 Yes | 2 No |
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 |
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end
What is the difference between performing a SECTION and a PARAGRAPH?
I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
Describe the cobol database components?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...
2 Answers ITC Indian Tobacco Company, PNP, TCS,
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
how to transfer the file from pc to mainframe??
what is a zoned decimal data type and how it will be stored?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?