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

how to access the file from prodution from changeman tool and to submit a file to production

6686


What are 77 levels used for?

659


) How do u handle errors in BMS macro?

1429


Which mode is used to operate the sequential file?

669


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

677






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?

700


How arrays can be defined in COBOL?

664


What do you understand by psb and acb?

666


What is the difference between comp and comp-3?

704


What is the difference between binary search and sequential search?

643


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

1773


What is rmode(24)

681


What is the LINKAGE SECTION used in COBOL?

890


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

825


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2058