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 are the different rules to perform a Search?
How do define Dymanic array in cobol how do u define single demensional arry and multidymensional arry in ur cobol.
What is Static,Dynamic linking ?
Which division and paragraphs are mandatory for a COBOL program?
if we have a 10 steps how to override the 4th step in jcl?
What is the maximum size of a 01 level item in COBOL I? in COBOL II?
Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...
2 Answers ITC Indian Tobacco Company, PNP, TCS,
maximum of how many screens we can open in emulator
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)
what is the use of filler in cobol programing?
can any one give good example for cond 88 level number and for renames pls urgent dudes ?