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?
Answers were Sorted based on User's Feedback
Answer / reena
The Redefined clause cannot contain a Value Clause.
i.e. it should only be WS-VARN REDEFINES WS-VARX PIC 9(5).
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / jitinder
The Syntax of Redefine Clause is
Label number data-name-1 REDFINES data-name-2
Here data-name-1 should not contain VALUE clause, but data-
name-2 can contain VALUE clause.
Plz correct me if i m wrong.
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / 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 |
what r the types of perform statement
In the JCL, how do you define the files referred to in a subroutine ?
How you can characterize tables in cobol?
how do you define single dimensional array and multidimensional array in your cobol?
What is the difference between external and global variables in COBOL?
If my file contains 100,000 records and job abended at 55,000th records processing then how can i restart job from that record onward by ignoring that record. I can not edit the file as file size is big and it is getting browse substituted?
what is filler and what is use of filler
what is index and how to use two tables using index?
How to print 10 to 1 if the input have only 10 digit number?
What is 88 level used for ?
i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?
given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1