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
What is a report item?
What is the compute verb? How is it used?
What is amode(31)
how do you reference the printer file formats from cobol programs
Are you comfortable in cobol or jcl?
What is the difference between goback, stop run and exit program in cobol?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What are the various section in data division and briefly explain them.
Which Search verb is equivalent to PERFORM…VARYING?
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?
Explain what you understand by passing by value.
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
State the various causes of s0c1, s0c5 and s0c7.
What is link edit in cobol?