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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to access the file from prodution from changeman tool and to submit a file to production

6667


what happens if parmparameter passes zero bytes to the program

1653


What are all the divisions of a COBOL program?

660


How many bytes S(8) comp field occupy and its maximum value?

1624


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1921






Write a program to enter and display the names of students in a class using the occurs clause.

645


Discuss about changing dataset name in proc.

757


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 ?

1864


What is the LINKAGE SECTION used in COBOL?

885


Explain how you can characterize tables in cobol?

636


What is the difference between binary search and sequential search?

634


Write a cobol program making use of the redefine clause.

723


Explain how to differentiate call by context by comparing it to other calls?

680


What is redefines clause in COBOL?

842


Can we redefine the field of x(200) to less than 200?

814