01 var1 pic x(10)
01 var2 redefines var1 pic 9(10).

then in procedure division

move 'abcde' to var1 then waht is the value of var1 and var2

Answers were Sorted based on User's Feedback



01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / s.v.venkata sivaprasad

redefines will reuse the memory with irrespective of date
type var1 is abcde and var2 also abcde.

Is This Answer Correct ?    22 Yes 0 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / merguadithya111

var1 is abcde

var2 is also abcde

Is This Answer Correct ?    14 Yes 0 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / abhishek_ibm

Both will be having the same value but the only difference
is when we use airthmetic operation then it will take hex
value .. I do think I am correct but kindly correct me if i
am mistaken.

Is This Answer Correct ?    6 Yes 0 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / ashok

in x1 & x2 is haveing same value "abcd" and also memory
location also is same. thats why if u chang any values of
these atomatically chang both values.

Is This Answer Correct ?    2 Yes 0 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / soumya santosini patnaik

soc7 abend occurs because according to move rules
alphaneumericfields can be moved to numeric fields only
when alphanumeric field consists of numeric data only.

Is This Answer Correct ?    0 Yes 5 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / jaganmohanreddy

var1 will be abcde
var2 will be 0000000000

Is This Answer Correct ?    1 Yes 7 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / adarsh562

abcde.....
0000000000


. indicates blank

Is This Answer Correct ?    0 Yes 6 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / veena

************************************************************
************************************************************
************************************************************
It will give compilation error.

Is This Answer Correct ?    0 Yes 11 No

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'ab..

Answer / vishal

DATA EXCEPTION ERROR

Is This Answer Correct ?    1 Yes 13 No

Post New Answer

More COBOL Interview Questions

wirte a pgm in using files in which we hav 10 ,20,30 40...100 records in inputfile and i want them to be send to outputfile in reverse order. PLZ HELP ME OUT .........THIS IS A RECENT QUESTION IN IGATE..

5 Answers   iGate,


have in 100 records in a file i want to move only matched records to one output_file1 and nonmathed records are moved to another output_file2 ... any one can provide logic code

3 Answers  


What is the difference between CONTINUE & NEXT SENTENCE ?

2 Answers  


Hi all, I have a following requirement to write the cobol program. I have to load the 129 variables from input sequential file which are in excel sheet to the cobol inernal table. and after loading into table i have to compare this data with the business file. here compare means controlling the data whether the format(numeric,alpha) is same in the business file and in the table??? i have the same data in input and business file. could anyone please give me any idea of the logic?// i have all the 129 different variables(129rows,1 column)is there .

4 Answers   IBM, Syntel, TCS,


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,






which one is better among static call and dynamic call?

3 Answers  


diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,


can we use full outer join with cursors declared in cobol program?

2 Answers  


A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


why 02 level number can't be use as a separate level number like 01 or 77 ?

3 Answers  


How to define a array dynamically.....

5 Answers   Fidelity,


Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.

3 Answers   iGate,


Categories