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 / neelam saini

WORKING-STORAGE SECTION.
01 WS-VARX PIC X(9) VALUE SPACE.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).
01 I PIC 9(2).
01 J PIC 9(2).
PROCEDURE DIVISION.
MAIN-SECTION.
MAIN-PARA.
MOVE 123456789 TO WS-VARN.
DISPLAY WS-VARN.
STOP RUN.

ON RUN TIME. 123456789
O/P : 123456789

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between structured cobol programming and object alternativelyiented cobol programming?

704


What the difference is between continue and next sentence?

651


how do you reference the esds vsam file formats from cobol programs

627


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1951


Write a program that uses move corresponding.

668






How do define dynamic array in cobol.

669


What is rmode(any) ?

680


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

654


Write down the divisions of cobol program?

665


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

2216


What are all the divisions of a COBOL program?

660


Define static linking and dynamic linking.

660


How do you get the data to code the BMS macro?

1472


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

705


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2656