using redefine can you redefine lower variable size to
higher variable size?

Answers were Sorted based on User's Feedback



using redefine can you redefine lower variable size to higher variable size?..

Answer / santosh mahajan

Yes. Redefines just causes both fields to start at the same
location. For example:-

01 WS-XYZ PIC X(1).

01 WS-XYZ-R REDEFINES WS-XYZ PIC(2).

MOVE 11 TO WS-XYZ-R
DISPLAY WS-XYZ will show 1
DISPLAY WS-XYZ-R will show 11

Is This Answer Correct ?    10 Yes 2 No

using redefine can you redefine lower variable size to higher variable size?..

Answer / snehatechm

YES

Is This Answer Correct ?    5 Yes 1 No

using redefine can you redefine lower variable size to higher variable size?..

Answer / harikumr ch

Syn:Levelnumber dataname-1 redefines data-name-2

The data-name-1 & data-name-2 must be of same size.(From
level 02).Incase of 01 level, the size of data-name-1 must
not exceeds that of data-name-2.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

0 Answers  


What is difference between static and dynamic call in cobol?

0 Answers  


01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??

1 Answers  


if someone is using my file,how can i find which user id is using?

4 Answers  


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

0 Answers  






Write the code to count the sum of n natural numbers.

0 Answers  


what is srange and nosrange pls reply to ths question ?

2 Answers   L&T,


WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.

4 Answers   Atos Origin,


I've one string with spaces ( I N D I A ). My question is I want remove the spaces & combine in to single string without space (INDIA).How we can write the cobol program & wich options we need to use. Please let me know.

10 Answers   Mascon,


Define REDEFINE clause and Is it possible to have the redefine clause anywhere in the working storage section for a data name?

3 Answers  


I have a sequential file. How do I access a record in this sequential file randomly in my program ?

8 Answers   CGI, Xansa,


What is LENGTH in COBOL II?

2 Answers   CSC,


Categories