can u give result for the fallowing example...
05 a pic 9(2)
05 b redifines a pic x(2).
move 'xy' to b.
display a,b.
Answers were Sorted based on User's Feedback
Answer / santhosh vayathuri
redefines will not check whether is numeric data type or
alphanumeric datatype simply it will display the value what
ever there in the memory . so for this question answer is
a = xy
b = xy
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / lakshmisudha
it display answer is xyxy
first xy for a and second xy for b.
only b will use same memory area it doesn't consider type of
datatype
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ashok kumar
Dharma,
answer is correct , its both have xy only.
i pratically done that prog
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / muttaiah
Dharma, can you give some clarification how a, b will hold
xy.
Thanks in advance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / shyamala a
SCENARIO 1 :
If we move "XY" TO A then the result will be
1. You will get a compilation warning "** Warning 378 ** Expected digit string as sending operand"
2. display will be Both A and B will have 00.
sCENARIO 2:
iF WE MOVE "xy" TO B then the result will be
1. No compilation/run time error.
2. Display will be both A and B = XY
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / neha
a=00
b=xy
because redefines only defines the length of the variables ,not the particular value.
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / muttaiah
I think it will give soc7 abend because we are moving
char's to numeric field.
can someone explain more clearly on this.
If you have any link regarding this do share with us.
Thanks in advance.
| Is This Answer Correct ? | 0 Yes | 5 No |
How can I find the maximum value of a field in a file while reading the file dynamically? without using sort function. Suppose i have a file with fields Timestamp, description, teamname, teamnumber.. i have read the file till end and find the maximun value of timestamp which is not in sorted order.. can we use function max(timestamp)?
if a>b continue display x. dispaly y. end-if display 1 display 2. display 3. what should be my output ?
What is the difference between perform … with test after and perform … with test before?
what is internal sort and external sort ? which is preferable ?
COMP-3 field occupy ?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?
What is the difference between PIC 9.99 and 9v99?
What is the difference between a binary search and a sequential search?
Write the code to count the sum of n natural numbers.
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?