View previous topic :: View next topic
|
Author |
Message |
maheshurstd
New User
Joined: 16 Feb 2006 Posts: 14
|
|
|
|
Hi,
what are the contents present in the following code
PROCEDURE DIVISION.
PARA1.
COPY MEMBER NAME
INCLUDE MEMBER NAME
Thanks in advance
Regards
Mahesh |
|
Back to top |
|
|
param_rajesh_2001 Warnings : 1 New User
Joined: 23 Jun 2006 Posts: 18 Location: Bangalore
|
|
|
|
Both the stmt does the same , The first STMT "COPY MEMBER NAME " ..
Cobol Copy books get copied in the comile time here member "NAME" COPIED during the compile time
the second "INCLUDE MEMBER NAME " MEMBER NAME copied during the pre-compile time . |
|
Back to top |
|
|
creator.abhishek
New User
Joined: 07 May 2006 Posts: 32 Location: Pune
|
|
|
|
Both does the same thing, onlt the difference is include is precompilation stmt and copy is complitaion stmt. both r stmt of working-storage division, it doesn't work in procedure division . |
|
Back to top |
|
|
k.pavankumar
New User
Joined: 22 May 2006 Posts: 8
|
|
|
|
Hi Mahesh.
The COPY is the Cobol statement and the INCLUDE belongs to the Precompilation expanision.
In your description there is a fault, while writing the include statement you have to place it in EXEC SQL and END-EXEC Block.
EXEC SQL
INCLUDE <copybook>
END EXEC.
According to your declaration you will definitely face a compilation error. |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
Just a little correction,
I think, both copy and include statements works fine even in procedure divisions.
Thanks,
Parikshit |
|
Back to top |
|
|
creator.abhishek
New User
Joined: 07 May 2006 Posts: 32 Location: Pune
|
|
|
|
Hi Parikshit, i think procedure division is for processing , which can be run in compilation time, how u say precompilation stmt is able to come there. plz let me know. |
|
Back to top |
|
|
|