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 / ezhilenthi
It wont show any Abend, the main purpose of REDEFINES
clause is to use the same storage area with one or more
data item with different sizes and PIC 's. We will face
Abend if we try to MOVE WS-VARN TO WS-VAR.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How to use the same COBOL program in Batch and CICS on lines? explain with an example
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.
What are the different types of condition in cobol and write their forms.
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?
What are the various section in data division and briefly explain them.
What is inspect in cobol ?
What is the Purpose of Pointer in the string?
What is the difference between comp and comp-3 usage?
What is the LINKAGE SECTION used in COBOL?
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 is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
Difference between cobol and cobol-ii?
what is the use of outrecord?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.