Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: AIX COBOL set 1.1 using UDB - help on compilation
Bottom posting

"kprasann" <ashprav@rediffmail.com> wrote in message news:<ebb4d6a7a9ecc6e4b312c4d8858819ef
@localhost.talkaboutprogramming.com>...
> Hello everybody,
>
> we are trying to port mainframe(z/OS) cobol applications
> to AIX cobol set 1.1 with UDB as the database in AIX.
> While compiling cobol programs accessing DB2 udb, I'm
> getting errors on usage of host variables.
> It's like this:
>
> Working-storage section.
> 01 ws-variable.
>    COPY copybook.
>
> The copybook has a host variable. precompiler says, it's undefined.
> Now, when I try to enclose the "COPY copybook" within "exec sql begin
> declare section end-exec"  and "exec sql end declare section end-exec",
> pre-compiler won't recognise "COPY" keyword. I'm not even very sure on
> this is the way I'm supposed to handle...got this information reading some
> manuals.
>
> I'm not sure how to handle this without changing the copybook or
> INCLUDE-ing it since the copybook is under a 01 level(which is in the
> program).
>
> Me being new to AIX COBOL and all the AIX related stuff, please guide me
> to a solution....thanks much! if possible, please e-mail or attach any
> references to my id : ashprav@rediffmail.com. thanks again :)

Hello Kprasann

I guess that the problem is probably that your mainframe compiler
includes the DB2 precompiler in with the cobol compiler and does the
whole process at once, whereas the precompiler in AIX is in a separate
step before your cobol compile step.  If so you will have to change
the COPY to a DB2 INCLUDE so that the precompiler can expand it
itself.  It's some time since I last used DB2 and I always used a
precompiler even on a mainframe, so all copybooks containing host
variables had to be invoked with INCLUDE statements.  Host variables
always used to have to be within a EXEC SQL / END-EXEC, but that may
no longer be the case.  Your manuals should explain this, particularly
the programmer's guide for COBOL and or DB2 on AIX.  If you haven't
got the manuals, you can get them from IBM's website, they're free for
anyone to download when I last looked, but you may have to register,
which again was free for anyone last time I looked.

Best of luck,

Robert

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Jones
09-01-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:04 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.