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
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 |
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 |
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 |
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 |
Answer / jaganmohanreddy
var1 will be abcde
var2 will be 0000000000
Is This Answer Correct ? | 1 Yes | 7 No |
Answer / veena
************************************************************
************************************************************
************************************************************
It will give compilation error.
Is This Answer Correct ? | 0 Yes | 11 No |
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..
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
What is the difference between CONTINUE & NEXT SENTENCE ?
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 .
What are the differences between OS VS COBOL and VS COBOL II?
which one is better among static call and dynamic call?
diffrence between z(2) and z9(2)
can we use full outer join with cursors declared in cobol program?
A table has two indexes defined. Which one will be used by the SEARCH?
why 02 level number can't be use as a separate level number like 01 or 77 ?
How to define a array dynamically.....
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.