Page 1 of 1
Can we use occurs depending on in Redfine clause
Posted:
Thu Aug 22, 2013 12:54 pm
by jvinoth
Hi,
Can anyone please help on the below issue. Can we use occurs depending on in Redfine clause. Please find below the code.
01 VAR-0 PIC 9(2) VALUE 0.
01 STRUCT-0 PIC X(26).
01 STRUCT-1 REDEFINES STRUCT-0.
03 VAR-1 PIC X(2).
03 VAR-2 OCCURS 10 TIMES
DEPENDING ON VAR-0
PIC X(1).
03 VAR-3 PIC X(14).
Thanks....
Code'd
Re: Can we use occurs depending on in Redfine clause
Posted:
Thu Aug 22, 2013 1:35 pm
by prino
Have you actually tried it? And if not, shouldn't you do so before posting here?
Re: Can we use occurs depending on in Redfine clause
Posted:
Thu Aug 22, 2013 2:01 pm
by NicC
You have been asked before to use code tags when posting code, data or anything looking like a screen shot or requiring a fixed pitch font. If you cannot be bothered to use the code tags why should anyone be bothered assisting you?
Re: Can we use occurs depending on in Redfine clause
Posted:
Thu Aug 22, 2013 3:03 pm
by Robert Sample
This is a HELP forum, not a READ-THE-MANUAL-FOR-YOU forum. Your question is rapidly, and accurately, answered in the COBOL Language Reference manual. Since there is a link to that manual at the top right of this page, you can find -- and read -- the manual yourself.
Topic locked.
Re: Can we use occurs depending on in Redfine clause
Posted:
Thu Aug 22, 2013 3:38 pm
by BillyBoyo
The answer can be located easily. but despite that, the equivalent effect can be achieved.
What are you trying to do - in words, what are you trying to get done with the code.
When you call everything "struct" and "var" rather than anything meaningful, I'm not sure it is such a good idea to attempt anything other than the very simple, so you'd best have a good reply.
As the TS you can reply to a locked topic. Just click on the Locked button. If you can't, PM me and I'll open it again.