473,473 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DB2 and embedded SQL

Hi, I'm not sure, whether this is the right place for my question. If not,
please point me to the correct group.

I have to port an application (from OS/2 to WinXP) that runs on PC and
connects to a DB2 database on MVS-host. The application is written in C and
uses embedded SQL. On OS/2 there is a tool called SQLPREP.exe that processes
the embedded sql (from sqc file). Where do I get the corresponding tool for
Windows? It is neither part of my DB2 installation nor of the (MS) Visual
C++.
Mar 16 '06 #1
7 4760
On Thu, 16 Mar 2006 19:15:20 UTC, Kl****@web.de (Klaus Jeschke) wrote:
Hi, I'm not sure, whether this is the right place for my question. If not,
please point me to the correct group.

I have to port an application (from OS/2 to WinXP) that runs on PC and
connects to a DB2 database on MVS-host. The application is written in C and
uses embedded SQL. On OS/2 there is a tool called SQLPREP.exe that processes
the embedded sql (from sqc file). Where do I get the corresponding tool for
Windows? It is neither part of my DB2 installation nor of the (MS) Visual
C++.


Do you have the application development client installed (on Windows)?

--
Lorne Sunley
Mar 17 '06 #2
"Lorne Sunley" <ls*****@mts.net> wrote in message news:lbZtd1ZY5f9V-pn2-

Do you have the application development client installed (on Windows)?

--
Lorne Sunley


The necessary code to precompile, compile, and bind programs with embedded
SQL is located on the DB2 server that he installed. The application
development client is not required.

The OP should read the "Application Development Guide: Building and Running
Applications" manual to find the information that is needed. PDF versions of
the DB2 manuals can be downloaded from the IBM website at no charge.
Mar 17 '06 #3
In article <Xn*************************@151.189.20.10>, Kl****@web.de
says...
Hi, I'm not sure, whether this is the right place for my question. If not,
please point me to the correct group.

I have to port an application (from OS/2 to WinXP) that runs on PC and
connects to a DB2 database on MVS-host. The application is written in C and
uses embedded SQL. On OS/2 there is a tool called SQLPREP.exe that processes
the embedded sql (from sqc file). Where do I get the corresponding tool for
Windows? It is neither part of my DB2 installation nor of the (MS) Visual
C++.


Check the '<db2path>\SQLLIB\samples\cpp\' directory. It contains the
bld* scripts you need to compile your sources.
Mar 17 '06 #4
Mark A wrote:
"Lorne Sunley" <ls*****@mts.net> wrote in message news:lbZtd1ZY5f9V-pn2-
Do you have the application development client installed (on Windows)?

--
Lorne Sunley


The necessary code to precompile, compile, and bind programs with embedded
SQL is located on the DB2 server that he installed. The application
development client is not required.

The OP should read the "Application Development Guide: Building and Running
Applications" manual to find the information that is needed. PDF versions of
the DB2 manuals can be downloaded from the IBM website at no charge.


Hmmm - OP server is on MVS - as his post suggested.

Jan M. Nelken
Mar 17 '06 #5
Klaus Jeschke wrote:
Hi, I'm not sure, whether this is the right place for my question. If not,
please point me to the correct group.

I have to port an application (from OS/2 to WinXP) that runs on PC and
connects to a DB2 database on MVS-host. The application is written in C and
uses embedded SQL. On OS/2 there is a tool called SQLPREP.exe that processes
the embedded sql (from sqc file). Where do I get the corresponding tool for
Windows? It is neither part of my DB2 installation nor of the (MS) Visual
C++.


SQLPREP - shows an old vintage of DB2 - perhaps Version 2.x...(Circa 1995.. you
will have more problems with porting code
11 years old).

You need to Install Application Development client on Windows machine and
establish connectivity to z/OS host (MVS is long
gone too). Either use DB2 Connect Server somewhere on the network - or use DB2
Connect Personal Edition on you Windows
XP machine.

Somehow I think you will post your questions very frequently from now on -
unless you recode the application in Java

(Java code with DB2 UDB Universal JCC Driver Type 4 - only needs Java runtime;
DB2 Connect license file and connectivity
to z/OS).
Best regards,

Jan M. Nelken

PS: SQLPREP is replaced in DB2 world by command: db2 prep ...

Full syntax is:

{PREP | PRECOMPILE} filename [ACTION {ADD | REPLACE [RETAIN {YES | NO}]
[REPLVER version-id]}] [BINDFILE [USING bind-file]]
[BLOCKING {UNAMBIG | ALL | NO}] [CALL_RESOLUTION {IMMEDIATE | DEFERRED}]
[COLLECTION schema-name] [CONNECT {1 | 2}]
[DATETIME {DEF | USA | EUR | ISO | JIS | LOC}] [DECTYPE {NOCONVERT | CONVERT}]
[DEFERRED_PREPARE {NO | YES | ALL}] [DEGREE {1 | degree-of-parallelism | ANY}]
[DISCONNECT {EXPLICIT | CONDITIONAL | AUTOMATIC}]
[DYNAMICRULES {BIND | RUN | INVOKEBIND | INVOKERUN | DEFINEBIND | DEFINERUN}]
[EXPLAIN {NO | YES | REOPT | ALL}] [EXPLSNAP {NO | YES | REOPT | ALL}]
[FEDERATED {NO | YES}] [FUNCPATH schema-name [{,schema-name} ... ]]
[GENERIC string] [INSERT {DEF | BUF}] [ISOLATION {CS |RR |UR |RS |NC}]
[LANGLEVEL {SAA1|MIA|SQL92E}] [LEVEL consistency-token] [LONGERROR {YES NO}]
[MESSAGES message-file] [NOLINEMACRO]
[OPTLEVEL {0 | 1}] [OUTPUT filename] [OWNER authorization-id]
[PACKAGE [USING package-name]] [PREPROCESSOR "preprocessor-command"]
[QUALIFIER qualifier-name] [QUERYOPT optimization-level]
[REOPT {NONE | ONCE | ALWAYS}]
[SQLCA {SAA | NONE}] [SQLERROR {NOPACKAGE | CHECK | CONTINUE}]
[SQLFLAG {MVSDB2V23 | MVSDB2V31 | MVSDB2V41 | SQL92E} SYNTAX]
[SQLRULES {DB2 | STD}] [SQLWARN {YES | NO}] [STATICREADONLY {NO | YES}]
[SYNCPOINT {ONEPHASE | TWOPHASE | NONE}] [SYNTAX]
[TARGET {IBMCOB | MFCOB | MFCOB16 | C | CPLUSPLUS | FORTRAN | ANSI_COBOL |
BORLAND_C | BORLAND_CPLUSPLUS}] [TRANSFORM GROUP transform-group]
[VALIDATE {RUN | BIND}] [WCHARTYPE {CONVERT | NOCONVERT}] [VERSION version-id]
************************************************** *****************************
* The following options are valid only if connected to a host or iSeries Server
************************************************** *****************************
[CCSIDG double-ccsid] [CCSIDM mixed-ccsid] [CCSIDS sbcs-ccsid]
[CHARSUB {DEFAULT | BIT | SBCS | MIXED}] [CNULREQD {YES | NO}]
[DBPROTOCOL {DRDA | PRIVATE}] [DEC {31 | 15}] [DECDEL {PERIOD | COMMA}]
[ENCODING {ASCII | EBCDIC | UNICODE | ccsid}] [IMMEDWRITE {NO | YES | PH1}]
[KEEPDYNAMIC {NO | YES}] [OPTHINT hint-id] [OS400NAMING {SQL | SYSTEM}]
[PATH schema-name] [RELEASE {COMMIT | DEALLOCATE}]
[SORTSEQ {HEX | JOBRUN}] [STRDEL {APOSTROPHE | QUOTE}] [TEXT label]
Jan M. Nelken
Mar 17 '06 #6
"Jan M. Nelken" <Un**********@Invalid.Domain> wrote in
news:441aecba$1@kcnews01:
SQLPREP - shows an old vintage of DB2 - perhaps Version 2.x...(Circa
1995.. you will have more problems with porting code
11 years old).
I don't know. I am the new one in this company.
You need to Install Application Development client on Windows machine
and establish connectivity to z/OS host (MVS is long
MVS still running on host maschine (/370 maybe old, too)
gone too). Either use DB2 Connect Server somewhere on the network - or
use DB2 Connect Personal Edition on you Windows
XP machine.
Thanks,I will see whether I can get it somewhere.
Somehow I think you will post your questions very frequently from now
on - unless you recode the application in Java
Sorry, there's no chance. Management dictates the rules :-((
(Java code with DB2 UDB Universal JCC Driver Type 4 - only needs Java
runtime; DB2 Connect license file and connectivity
to z/OS).
As mentioned above - there is no chance (the new employee has to do what the
big boss say, and keep his mouth shut).

PS: SQLPREP is replaced in DB2 world by command: db2 prep ...

Thanks for this hint, I tried it.

But - now I have another problem, maybe one can help me, too:

I tried a little example:

EXEC SQL INCLUDE SQLCA

EXEC SQL BEGIN DECLARE SECTION;
char ATTR1[2];
char ATTR2[2];
EXEC SQL END DECLARE SECTION;

EXEC SQL SELECT ATTR1 INTO :ATTR1 FROM TXA.TBL WHERE ATTR2 = :ATTR2;

and I get a message

SQL30073 "0x2112" Parametervalue "0x0000" not supported.

I did not find the meaning of this message (with value "0x2112") anywhere
(GOOGLE was not friendly to me).

If I enter the select directly I get the correct result.
Best regards,

Jan M. Nelken


Thanks.

Best regards back,
Klaus
Mar 18 '06 #7
In article <Xn*************************@151.189.20.10>, Kl****@web.de
says...

Thanks for this hint, I tried it.

But - now I have another problem, maybe one can help me, too:

I tried a little example:

EXEC SQL INCLUDE SQLCA

EXEC SQL BEGIN DECLARE SECTION;
char ATTR1[2];
char ATTR2[2];
EXEC SQL END DECLARE SECTION;

EXEC SQL SELECT ATTR1 INTO :ATTR1 FROM TXA.TBL WHERE ATTR2 = :ATTR2;

and I get a message

SQL30073 "0x2112" Parametervalue "0x0000" not supported.

I did not find the meaning of this message (with value "0x2112") anywhere
(GOOGLE was not friendly to me).

If I enter the select directly I get the correct result.
Best regards,

Jan M. Nelken


Thanks.

Best regards back,
Klaus


I've found a description about this error message in the redbook at
http://www.redbooks.ibm.com/redbooks/pdfs/sg246435.pdf
that this message might be changed into a more describing message when
using at least FP5. Maybe updating to the latest fixpack level might
help you also to get a more meaningfull message.

Mar 19 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
0
by: Nick White [MSFT] | last post by:
Hello fellow Microsoft Windows Mobile and Embedded enthusiasts: I invite you to peruse the list below of upcoming technical chats and Webcasts offered by the Windows Mobile and Embedded Devices...
59
by: Jeff Bowden | last post by:
For ease of configuration and other reasons, I would like for my single-user GUI app to be able to use postgresql in-process as a library accessing a database created in the users home directory. ...
49
by: Alex Vinokur | last post by:
Are there any restrictions/problems for use of C++ STL in development in embedded systems? In particular: * Does STL require too much space/memory? * Is 'implementation of STL...
0
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
1
by: leeanngriego | last post by:
I have a client who has asked me to find him some solid up and coming embedded engineers. 2 to 3 years expereince with Embedded Linux, VxWorks, Nucleus or any other RTOS who has working in L2/L3...
20
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: ...
30
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
Let's say we had a simple function for returning the amount of days in a month: unsigned DaysInMonth(unsigned const month) { switch (month) { case 8: case 3: case 5:
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.