copybook



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

copybook

Postby swapna namburu » Fri Sep 17, 2010 7:28 pm

i am doing a case study using cobol files with copybook and db2.
if we compie db2 + cobol we use preclink. but how we include copybook in preclink.
swapna namburu
 
Posts: 6
Joined: Wed Sep 08, 2010 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copybook

Postby dick scherrer » Fri Sep 17, 2010 11:04 pm

Hello,

What is "preclink" on your system? This is not a standard term most places.

If preclink is your process that invoked the db2 pre-compiler before the actual compile, INCLUDE is typically used to expand sql for the pre-compilation.

What exactly are you stuck with? Once we understand the doubt, we should be able to clarify.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copybook

Postby swapna namburu » Sun Sep 19, 2010 8:10 pm

IN file section instead of writing ffile structure we invoked the copy book.
data division.

file section
fd file1
exec sql
include copybook1
end-exec.
replacing ==:copy:== by ==emp==.


IN this db2 precompiler shows erors. i can't resolve it.
Is this format or declaration is correct or not
swapna namburu
 
Posts: 6
Joined: Wed Sep 08, 2010 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copybook

Postby dick scherrer » Sun Sep 19, 2010 10:07 pm

Hello,

You have created your own syntax - what is coded is not in any manual. . . The code is trying to combine an INCLUDE with a feature of COPY. As far as i know, this cannot be done.

Read here about COPY:
http://publibz.boulder.ibm.com/cgi-bin/ ... lr50/8.1.4


This is the link to the COBOL Language Reference Table of Contents:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS

Suggest you both bookmark the ToC link as well as download a local copy of the manual.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post