Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem Regarding Copybook

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Mon Jun 12, 2006 3:04 pm    Post subject: Problem Regarding Copybook
Reply with quote

Hi All,

Can we use copybooks in Procedure division?

Regards,
Dipanshu G.
Back to top
View user's profile Send private message

Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Mon Jun 12, 2006 6:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Mon Jun 12, 2006 6:37 pm    Post subject: Re: Problem Regarding Copybook
Reply with quote

You can certainly use copybooks in Proc division.
Typically they are used to call some program or error routine.


ap_mainframes.
Back to top
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Tue Jun 13, 2006 5:57 pm    Post subject:
Reply with quote

If possible, Plz assist with code
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1188
Location: Bangalore,India

PostPosted: Wed Jun 14, 2006 10:36 am    Post subject:
Reply with quote

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
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Wed Jun 14, 2006 10:43 am    Post subject:
Reply with quote

many thanks
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Thu Jun 15, 2006 4:22 pm    Post subject:
Reply with quote

Just to add to that,

You can't have declarative statements in the copybook included in procedure division.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us