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 am going to Display the WS-VARX and WS-
VARN?
Answer Posted / mallikarjun
WE CANNOT GIVE VALUE CLAUSE IN THE SECOND STATEMENT I.E.
WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345' . IF YOU
SPECIFY VALUE CLAUSE SYSTEM WILL SHOW AN ERROR, IF YOU
SPECIFY WITH OUT VALUE CLAUSE I.E.
WS-VARN REDEFINES WS-VARX PIC 9(5).
THEN IF YOU GIVE DISPLAY STATEMENT THEN ABCDEFGHIJ AND
ABCDE WILL BE DISPLAYED
Is This Answer Correct ? | 26 Yes | 3 No |
Post New Answer View All Answers
i want a program using by if, evaluate , string, unstring, perform, occurs?
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?
What is redefines clause in COBOL?
IF I mention stop run in CICS what happens?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is the local-storage section?
What is a report item?
) How do u handle errors in BMS macro?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
What do you understand by psb and acb?
Difference between array and sub-script ?
What are the different rules to perform a Search?
How do you define a variable of comp-1 and comp-2?
What is the use of intialize verb?
how do you reference the ksds vsam file formats from cobol programs