473,587 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ 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 4770
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.ne t> wrote in message news:lbZtd1ZY5f 9V-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 "Applicatio n 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************ *************@1 51.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>\SQLL IB\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.ne t> wrote in message news:lbZtd1ZY5f 9V-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 "Applicatio n 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_PREPAR E {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|SQL92 E}] [LEVEL consistency-token] [LONGERROR {YES NO}]
[MESSAGES message-file] [NOLINEMACRO]
[OPTLEVEL {0 | 1}] [OUTPUT filename] [OWNER authorization-id]
[PACKAGE [USING package-name]] [PREPROCESSOR "preprocess or-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_CPLUSPL US}] [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**********@I nvalid.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************ *************@1 51.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
4440
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 Enterplise Linux 3 ES, and applied FixPack fp5_mi00069.tar to it. After creating an instance, starting the database, creating a database, and entering...
11
4241
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 threads of a multithreaded program using embedded SQL. Since the threads do not need to share transaction scopes, the sqleAttachToCtx family of APIs do...
8
8078
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 could work in reverse, i.e. we have a cost model written in Excel that calculates the profitability of customer accounts based on several inputs and...
0
2200
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 Group. For the full list of upcoming Windows Mobile and Embedded chats, to review archived chat sessions, or to request a reminder for a chat,...
59
7147
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. I think I could possibly get what I want by launching a captive copy of postmaster with appropriate args but it seems conceptually cleaner to not...
49
8924
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 algorithms/methods' reenterable/reentrant? * What is the cost to provide continuity of vectors in memory? Any other problems? -- Alex Vinokur
0
2253
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard requirement of most applications. But users are increasingly demanding more sophisticated reporting from applications - seeking such features as custom...
1
1648
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 networking. The object is to bring them on board and train in SAN/NAS switching, as long as they are solid C, Unix and Embedded programmers that have...
20
2020
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: memset(data,-1,sizeof data)
30
4274
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
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8349
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7974
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3845
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.