Michael Sansoterra
Michael Sansoterra is a DBA for Broadway Systems in Grand Rapids, Michigan.
-
Consume an IWS Web Service From a VB.NET Client
January 13, 2010 Michael Sansoterra
Note: Source code for RPG program CustListR can be downloaded here.
In my article Publish Result Sets Using Web Services and IWS, I demonstrated how to write an RPG program that can return a result set (i.e., multiple rows of data) to a Web service client using an Integrated Web Services (IWS) server instance.
The benefit of using RPG to publish data as a Web service is that any number of clients can consume the Web service, regardless of OS platform or language. This potentially makes your i data and business logic accessible from anywhere! This tip will
-
Publish Result Sets Using Web Services and IWS
December 9, 2009 Michael Sansoterra
Note: The code accompanying this article is available for download here.
IBM i/OS V6R1 (a.k.a. 6.1) introduced a new feature called Integrated Web Services (IWS). This feature is also available by PTF on V5R4 systems. One benefit of IWS is its ability to make data and logic in high-level language programs such as RPG, COBOL and C available as a Web service.
Publishing business logic as a Web service allows clients on just about any platform (PDA, green screen, Web application, Windows client) in just about any language (Java, C#, VB.NET, VBA, etc.) to easily consume the data provided
-
Enable Row Set Paging in a Client/Server Environment Using SQL
November 11, 2009 Michael Sansoterra
One of the general paradigms of client/server programming is keeping the server side processing “fat” while keeping the client side processing “thin.” That is, a client/server application should let a server do as much work as possible while making as few assumptions as possible about how much processing power, memory, network bandwidth, etc., the client will have. Of course, sometimes certain applications, such as those requiring a graphics intensive environment, must be heavy on the horse power, but in general it’s good practice to keep network, memory, and processing requirements minimal on the client side.
One of the areas where
-
Passing an Entire Result Set as a Parameter, Part 2
October 21, 2009 Michael Sansoterra
Note: The code accompanying this article is available for download here.
In Part 1 of this series, I discussed a generic method of passing a delimited set of text records in CSV (comma separated variable) format into a single stored procedure variable. Once the stored procedure had this text data, a generic Java user-defined table function (UDTF) was used to parse the text data and convert it to a row set that could be by any number of standard DB2 for i statements, such as a SELECT or INSERT. So with a little sweat, it is indeed possible to
-
An Overview of User-Defined Types in DB2 for i
September 2, 2009 Michael Sansoterra
UDTs or User-Defined Types (also known as distinct types) allow SQL developers to implement their own data types. For example, if a database contains many tables that each have one or more columns representing a general ledger account number defined as VARCHAR(30), a suitable UDT can be defined as follows:
Create Type My_Schema/GL_ACCOUNT_NUMBER As VarChar(30) CCSID 37 With Comparisons
In DB2 for i, implementing UDTs is currently limited to deriving a new data type from an existing DB2 built-in data type. This tip will briefly explore UDTs, how they can be used in modern databases, potential pitfalls, and how UDTs
-
Validate DBCS-Open Data
August 19, 2009 Michael Sansoterra
The DBCS open data type is used in many legacy applications as a way to support storage of either single byte character set (SBCS) data, double byte character set (DBCS) data, or even data from both character sets within a single data column. Defined with a data type of O within DDS specs, this data type carries an inherent agnostic coded character set identifier (CCSID) of 65535.
The DBCS open data type operates by storing single byte characters, as traditional single byte character columns do. However, when a DBCS open column stores double byte characters, it uses special embedded escape
-
The Case of the Missing .NET Data Provider for i5/OS in Visual Studio 2008
July 15, 2009 Michael Sansoterra
Note: The code accompanying this article is available for download here.
Like most people, I hate purchasing something only to find out a piece is missing. If you’ve been merrily rolling along with Visual Studio (VS) 2005 and recently upgraded to 2008, or if you’ve started tinkering with some .NET tutorials with VS 2008, you may have noticed something odd. There’s a piece missing! The .NET Data Provider for i5/OS that comes with V6R1 System i Access does not appear as an option in the Visual Studio 2008 data source configuration wizard. (This tip only applies to the V6R1
-
Microsoft Virtualization for the i Guys, Revisited
July 8, 2009 Michael Sansoterra
Some time ago, in an article entitled Developers Don’t Despair: Virtualize Your PC, I listed the benefits of using PC emulation software such as Microsoft‘s Virtual PC or VMware‘s VMware Workstation.
In particular, I discussed why an IBM i specialist may find using a virtualized workstation helpful. These terrific products allow users to create a variety of operating system (OS) and software configurations without having to buy or revamp existing hardware. Best of all, the VMware Workstation is relatively low cost, and Microsoft’s Virtual PC product is free.
As a brief reminder about Virtual PC, if you
-
Treasury of New DB2 6.1 (V6R1) Features, Part 6: Miscellaneous Enhancements
May 6, 2009 Michael Sansoterra
As the saying goes “all good things must come to an end.” And alas, this is the last in my series of tips on improvements to DB2 for i in V6R1. This final tip will cover the hodgepodge of remaining notable features added since the V5R4 that haven’t been covered in the prior tips. Stick around because there is some good stuff in here.
ALTER FUNCTION Statement
V5R4 gave us the ALTER PROCEDURE statement and now, at long last, DB2 has the ALTER FUNCTION statement. Prior to 6.1, when a function needed a modification, developers were forced to drop and
-
Treasury of new DB2 6.1 (V6R1) Features, Part 5: New Functions and Change Stamp Columns
April 1, 2009 Michael Sansoterra
Today’s tip addresses the new built-in functions available in DB2 for i (a.k.a. DB2 for i5/OS, SQL/400, and DB2 UDB for iSeries), change stamp columns and row change expressions.
ASCII and CHR Functions
The ASCII and CHR functions are great additions to DB2 for i. The ASCII function will take the left most character of a string expression and return the ASCII character code equivalent. Take the following example:
Select ASCII(' ') From SysIBM/SysDummy1
This command will return a value of 32 (ASCII code for space) instead of the expected EBCDIC value of 64.
The CHR (character) function behaves the