What will happen if a variable is declared as below..
Explain with an example? Working storage section:-

01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'.
01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'.

What will happen I want Display WS-VARX and WS-VARN?

Answer Posted / saveen

ws-varx will have 12345fghij
ws-varn will have 12345.

pls kindly post ur views. am a beginner.

Is This Answer Correct ?    4 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

407


Differentiate between structured cobol programming and object-oriented cobol programming.

659


In COBOL, what is the different between index and subscript?

751


) what is the difference between AID and HANDLE AID?

1627


How can you get the ksds file records into your cobol program?

636






Which division and paragraphs are mandatory for a COBOL program?

703


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

8605


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

699


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

806


For rewrite, why is it mandatory that file needs to be opened?

616


What is the difference between Call and a Link?

692


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

733


What rules are followed by the search verb.

629


Name the divisions, which are available in a cobol program?

675


Write the code implementing the perform … varying.

636