What will happen if a variable is declared as below..
Explain with an example?

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).

Answer Posted / ezhilenthi

It wont show any Abend, the main purpose of REDEFINES
clause is to use the same storage area with one or more
data item with different sizes and PIC 's. We will face
Abend if we try to MOVE WS-VARN TO WS-VAR.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is amode(24)?

684


What kind of error is trapped by on size error option?

740


Why did you choose to work with ibm mainframe cobol programming?

631


What is link edit in cobol?

772


How do you reference the fixed block file formats from cobol programs

705






What is rmode(24)

681


How do you define a variable of comp-1 and comp-2?

705


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

720


Mention the guidelines to write a structured cobol program?

620


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1773


how to move the records from file to array table. give with code example

2221


Write down the divisions of cobol program?

671


how do you reference the fixed unblock file formats from cobol programs

712


What is comp-1 and comp-2?

764


example for sub strings ? and refernce modifications whit output pls

1846