Can a REDEFINES clause be used along with an OCCURS clause?
03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'.
03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you
Answers were Sorted based on User's Feedback
Answer / guest
The following combinations are possible with REDEFINES and
1.Variable at level 01 can be redefined.
2.VALUE clause cannot be used along with the REDEFINES
3.Variable having OCCURS clause cannot be REDEFINED.
4.Variable at level 01 cannot have OCCURS clause.
Please correct if any of the above points are wrong.
|Is This Answer Correct ?||7 Yes||1 No|
Answer / vikas sharma
This clause work as when u have define this another 01 level..
We can not define like this...
|Is This Answer Correct ?||1 Yes||2 No|
Answer / vikas sharma
Yes, We Can.
In this question, When we display WS-EX we will get the
answer 5 times A. Like this AAAAA .
|Is This Answer Correct ?||0 Yes||2 No|
Answer / sunil
This works on MF-COBOL
Display WS-EX will display AAAAA
|Is This Answer Correct ?||1 Yes||4 No|
Answer / anoop
It is possible to use redefine class along with OCCURS
class, but you cannot redefine a table directly. So the
above code wont work.
03 ws-table-el redefines ws-ex occurs 5 times pic x(1).
This is valid one.
|Is This Answer Correct ?||3 Yes||7 No|
i friends greetings to the day...!!! I face a quation like"while runnig the programe every day i have to access the previous day updates only...!! Ex:- Let last day 100 customers took bank account i have to select those customers only.."
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
HOw can I get the negative sign while deduct high value from low value
what is the maximum error code in mainframe
What is the default value of DISP parameter?
COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
can we use the two 01 level in file discription ?
What is the point of the REPLACING option of a copy statement?
If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.
Name the divisions, which are available in a cobol program?
Why do we use COMP-3 variables for computation, when we know that they are non displayable fields and require additional MOVE to numeric field before we populate it in output Reports?
Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY 'MAIN-PARA' PERFORM SECTION-A. STOP RUN. SECTION-A. PARA-A1. DISPLAY 'SECTION A PARA A1'. PARA-A2. DISPLAY 'SECTION A PARA A2'.