View previous topic :: View next topic
|
Author |
Message |
prabhucs01 Warnings : 1 New User
Joined: 07 Mar 2005 Posts: 43
|
|
|
|
why occurs clause can't be used in the 01 level? |
|
Back to top |
|
|
rsshanmugam
New User
Joined: 08 Mar 2005 Posts: 62 Location: Basildon
|
|
|
|
01 level is used for describing records not fields in cobol, since at a given single instance a record cant occur more than one time occurs clause cant be given at 01 level |
|
Back to top |
|
|
shiva_suresh Warnings : 2 New User
Joined: 05 May 2005 Posts: 11 Location: Bangalore
|
|
|
|
Plz tell me the answer asap |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Shiva,
I guess that answer has to be "because you'll get a comiler error otherwise". I've never seen any "official" IBM answer to that ques.
Those "UNofficials" that I've seen don't seem to ring true.
My guess is that it has something to do with the fact that 01 levels must begin on double word storage boundaries; if they aren't, filler (slack) bytes are inserted by the compiler to make it happen. If you do that with multiple table entries, the entry data definition can become misaligned with the data from entry to entry.
But, again that's just my guess.
HTH |
|
Back to top |
|
|
nave
New User
Joined: 16 May 2005 Posts: 10 Location: bangalore,india
|
|
|
|
once we give occurs clause in a 02 field it need to be occured that much times were as since the 01 level is the group variable we dont need to occur the address space of the group variable.so no need of occurs clause in 01 level.it should not be said 'not allowed',it is to be said to be of 'no nned to write occurs clause in 01 level'. |
|
Back to top |
|
|
Prakash_mainframes
New User
Joined: 26 Feb 2005 Posts: 5 Location: Pune
|
|
|
|
I have one more query then.....
Can 88 level be used under an OCCURS clause?
For ex:
For Ex:
01 Dept.
05 ABC pic 9(3) occurs 5 times.
88 valid value 0 thru 100.
and if we move any value to the VALID field, then that value will be assigned to all ABC or how wil it happen?
Regards,
Prakash. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Yes, but you have to subscript/index it. E.g.:
if valid(3)
etc. |
|
Back to top |
|
|
ajay_dheepak
New User
Joined: 12 May 2005 Posts: 32 Location: Chennai
|
|
|
|
Hi
Can anybody tell whether its is possible to move any values to the VALID field as mentioned above.
Ref:
01 Dept.
05 ABC pic 9(3) occurs 5 times.
88 valid value 0 thru 100. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Ajay,
Yes you can. Example:
|
|
Back to top |
|
|
samchris
New User
Joined: 31 May 2005 Posts: 26 Location: pune
|
|
|
|
it use to describe the fields only not the records. |
|
Back to top |
|
|
|