Can a REDEFINES clause be used along with an OCCURS clause?
if yes,
01 WS-TABLE.
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
expect?
if no,why?
Answer Posted / guest
Hi All,
The following combinations are possible with REDEFINES and
OCCURS clause.
1.Variable at level 01 can be redefined.
2.VALUE clause cannot be used along with the REDEFINES
clause.
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 |
Post New Answer View All Answers
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
Name the sections present in data division.
What is the difference between goback, stop run and exit program in cobol?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
What is the difference between Global and External Variables?
what happens if parmparameter passes zero bytes to the program
Name some of the examples of COBOl 11?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Are you comfortable in cobol or jcl?
Mention the guidelines to write a structured cobol program?
Can we change the password using ALTER? anyone tried and changed?
What is rmode(any) ?
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?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.