Is this allowed?
01 WS-TABLE.
03 FILLER-X PIC X(5) VALUE 'AAAAA'.
03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1).
can redefines clause be used with occurs clause?
Answers were Sorted based on User's Feedback
Answer / ankur
Yes. Redefines just causes both the fields to be started at
the same location. We can even redifine a A(100) with B
(200) and the other way round.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / sandy
Bob, using occurs under redefines is also possible.
example.
01 WS-REF-TABLE.
05 WS-DATA1 PIC X(8) VALUE 'TEST '.
05 WS-DATA2 PIC X(8) VALUE 'COBOL '.
01 WS-RED-TABLE REDEFINES WS-REF-TABLE.
10 WS-RED-DATA OCCURS 2 TIMES PIC X(8).
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / bob
Yes we can use redefine under occurs clause but we cannot
use occurs under redefine
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / frankie
What is diff betn 'Occurs under Redefines' and the vice
versa?
Confused...Can you help?
| Is This Answer Correct ? | 0 Yes | 0 No |
In which area will you utilize 88 level items in cobol?
What are different data types in cobol?
What is the difference between PIC 9.99 and 9v99?
where will we code call by content and call by reference dude pls reply soon ?
Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.
I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.
There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
What are decleratives in COBOL ?
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?
WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.