View previous topic :: View next topic
|
Author |
Message |
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
Hi All,
Can we use copybooks in Procedure division?
Regards,
Dipanshu G. |
|
Back to top |
|
|
Jerry
New User
Joined: 16 Sep 2005 Posts: 42
|
|
|
|
Hi Dipanshu,
You can use "copy" verb in procedure division. But the copybook should contain COBOL statements.
Correct me, if I am wrong.
Regards,
Jerry. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
You can certainly use copybooks in Proc division.
Typically they are used to call some program or error routine.
ap_mainframes. |
|
Back to top |
|
|
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
If possible, Plz assist with code |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Depanshu,
Program -A
IDENTIFICATION DIVISION.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
..........................
........................
DATA DIVISION.
FILE SECTION.
............
........
WORKING-STORAGE SECTION.
.......
........
PROCEDURE DIVISION.
COPY GENTRACE.
In gentrace..
GENTRACE contain some display statement
DISPLAY '######################################'.
DISPLAY '# PROGRAM: ' TRACE-MODULE-NAME 'NOW ENTERED #'.
DISPLAY '# ======== #'.
DISPLAY '# COMPILED: ' WHEN-COMPILED-DISPLAY ' #'.
DISPLAY '######################################'.
Hope it will helpful |
|
Back to top |
|
|
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
many thanks |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Just to add to that,
You can't have declarative statements in the copybook included in procedure division. |
|
Back to top |
|
|
|