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 ? | 25 Yes | 7 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 |
what is the coding difference between COBOL and CICS.
what happens if we wont give timestamp in precompilation process ?
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 ?
What was removed from COBOL in the COBOL II implementation?
how do you reference the printer file formats from cobol programs
How you can read the file from bottom?
Why would you use find and get rather than to obtain?
What is the difference between copy and include in cobol?
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 want Display WS-VARX and WS-VARN?
what happens if parmparameter passes zero bytes to the program
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
If I want to increase the Limit in GDG. What should I do?