ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Compiling COBOL with SQL and MQI on AS/400

Post new topic  Reply to topic
 Compiling COBOL with SQL and MQI on AS/400 « View previous topic :: View next topic » 
Author Message
fcotait
PostPosted: Wed Nov 17, 2004 6:17 am    Post subject: Compiling COBOL with SQL and MQI on AS/400 Reply with quote

Acolyte

Joined: 28 Feb 2002
Posts: 63
Location: Sao Paulo - Brazil

Hi all,

I need to compile a COBOL program on AS/400. In my code I have MQI and EXEC SQL calls. In the manual (Application Programming Guide / Part 3 / Chapter 28 ) I found this :

    SQL programming considerations
    If your program contains EXEC SQL statements and MQI calls, perform these steps:

    Translate the EXEC SQL commands into native language statements. Use the CRTSQLCI command for a C program. Use the CRTSQLCBLI command for a COBOL program.
    Include OPTION(*NOGEN) in the CRTSQLCI or CRTSQLCBLI command. This halts processing to enable you to include the appropriate WebSphere MQ service programs. This command puts the code, by default, into QTEMP/QSQLTEMP.

    Compile the source code using the CRTCMOD command (for a C program) or the CRTCBLMOD command (for a COBOL program).
    Use CRTPGM to link the compiled code with the appropriate WebSphere MQ service programs. This creates the executable program.
    An example of such code follows (it compiles a program, SQLTEST, in library, SQLUSER):

    CRTSQLCI OBJ(MQTEST/SQLTEST) SRCFILE(SQLUSER/QCSRC) +
    SRCMBR(SQLTEST) OUTPUT(*PRINT) OPTION(*NOGEN)
    CRTCMOD MODULE(MQTEST/SQLTEST) +
    SRCFILE(QTEMP/QSQLTEMP) OUTPUT(*PRINT)
    CRTPGM PGM(MQTEST/SQLTEST) +
    BNDSRVPGM(QMQM/LIBMQIC)

But this didn't work

Any Idea ?

Thanks
_________________
Filipe Cotait
IBM Certified System Administrator - WebSphere MQ
IBM Certified Specialist - MQSeries, WebSphere MQ Integrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
EddieA
PostPosted: Wed Nov 17, 2004 9:57 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
But this didn't work

What didn't work. More details are needed.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Compiling COBOL with SQL and MQI on AS/400
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.