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 ? | 17 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 |
how will you define vsam file in select clause?
suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.
input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.
What is the difference between structured cobol programming and object alternativelyiented cobol?
How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.
What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......
if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.
Give some examples of command terminators?
) how do u code after getting data?
what is the use of comp2 ? where can we use it with example ?
what is search and searchall?what is the diffrence between them?give an best example?
using redefine can you redefine lower variable size to higher variable size?