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 / anna

WORKING-STORAGE SECTION.
01 WS-VARX PIC X(9) VALUE SPACE.
01 WS-VARN REDEFINES WS-VARX PIC 9(9) value zeros.
in this case you can used any data, by using right
field for numeric data ws-varN, for alphabetic /alphanumeric
ws--varX.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give some examples of command terminators?

759


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2725


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

634


explain sorting techniques in cobol program?

692


Explain about different table spaces.

652






IF I mention stop run in CICS what happens?

1898


What is difference between static and dynamic call in cobol?

779


What are the cobol coding sheets?

666


What is amode(24)?

684


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8662


What is cobol?

750


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

744


What are the different open modes available in cobol?

722


What are all the divisions of a COBOL program?

667


HOw can I get the negative sign while deduct high value from low value

1794