View previous topic :: View next topic
|
Author |
Message |
willsdonaldabc
New User
Joined: 05 Oct 2010 Posts: 10 Location: chennai
|
|
|
|
In the cobol code, 2 copybooks are declared under one file. That means does it take the structure of file combindly both files or individulally ? could you plz anyone explain me detail?
ex:
01 DFHCOMMAREA.
COPY A5XLSWB0.
COPY C5XLSWB0. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
[quote="willsdonaldabc"]In the cobol code, 2 copybooks are declared under one file. That means does it take the structure of file combindly both files or individulally ? could you plz anyone explain me detail?
ex:
[quote]
After you have done the formatting for pieces of code, samples of data, etc, highlight that block of text, click on the Code button (above) the input area. Click on the Preview button to check it looks OK, amend as necessary.
In the example you give, there is no file. Maybe you just didn't included it, but I think it more likely DFHCOMMAREA is in the working-storage or linage sections, as it is to do with CICS, not any filess.
If you have an 01 level in Cobol, then anything with a lower level number is part of the group-item defined by the 01. This is irrespective of whether it comes from a copybook, or is just written in your code.
We are unable to tell from your example, but if both the copybooks are without 01 levels, then all the data definitions will belong to the 01 DFHCOMMAREA.
If the copybooks both have 01 levels in, then they both define their own seperate groups, with no relation to each other (unless the second has a REDEFINES of the first). You will get a diagnostic message from the compiler, because DFHCOMMAREA will have no storage defintitions.
If the first has 01 and the second not, then all the data in the copybooks will be part of the 01 which is defined. You will again get a diagnostic message for DFHCOMMAREA.
If the second has an 01 and the first not, the data in the first will belong to DFHCOMMAREA and the second 01 level will define its own storage (subject to lack of REDEFINES).
If you get to an actual file the situation is generally the same if you bear this in mind. Subordinate to an FD, 01 levels implicitly redefine the first 01 level of that FD. This is how you do multiple record layouts for files which are not of a single record-type. |
|
Back to top |
|
|
willsdonaldabc
New User
Joined: 05 Oct 2010 Posts: 10 Location: chennai
|
|
|
|
Thank you very much for Quick reply |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
No problem.
I can't believe that every time I suggest to others to use the Preview, and I then don't, I've screwed it up. Like clockwork. Typical! |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Bill Woodger wrote: |
No problem.
I can't believe that every time I suggest to others to use the Preview, and I then don't, I've screwed it up. Like clockwork. Typical! |
when you show me someone who does not make mistakes
you are showing me someone who does not do anything. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
dbzTHEdinosauer wrote: |
[...]
when you show me someone who does not make mistakes
you are showing me someone who does not do anything. |
I like to add "and I do lot of things" :-)
However, I'm supposed to learn from the mistake, not keep making the same one :-) |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Bill -- "practice makes perfect"? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Bill,
Quote: |
not keep making the same one |
At least you're consistent (not to be confused with stubborn) - this also makes for easier problem resolution. . .
d |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Maybe subconciously I keep trying it unchanged, in the hope it'll work this time :-)
I found some nice jokes on the web about that particular phenomenon. |
|
Back to top |
|
|
|