Programming / APIs


Using APIs to Extend RPG: The C Runtime APIs PDF Print E-mail
Programming - APIs
Written by Joe Pluta   
Wednesday, 07 September 2011 00:00

Many APIs are available on the IBM i that will enable you to extend your RPG applications; the C Runtime APIs provide a wide range of added functions.

joe_plutaWritten by Joe Pluta

In a previous article, I demonstrated how you could use the CEE APIs to provide additional programming features to your RPG programs, specifically in the area of advanced mathematical and trigonometric functions. The CEE APIs are very standardized, with traditional (for RPG programmers, anyway!) parameter- and error-handling. The C Runtime APIs are quite a bit different as they are modeled after the existing APIs of the UNIX world. And while those APIs are completely familiar to the UNIX developers among us, we RPG types can use a little help getting started with them, and this article provides that help.

Last Updated on Wednesday, 07 September 2011 00:00
Read more...
 
User Rating: / 2
PoorBest 
The API Corner: Determining the Last Spool File Created PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 17 August 2011 00:00

The QSPRILSP API can simplify your access to a job's most recent spool file.

bruce_viningWritten by Bruce Vining

Last month, in "Just How Many Spool Files Do You Have?," we looked at the Retrieve Spool Information API QSPSPLI. I received quite a bit of feedback on the article—some suggesting a follow-on topic, others reporting a problem they were running into.

Last Updated on Wednesday, 17 August 2011 00:00
Read more...
 
TechTip: Exploring the GeoNames Free Web Services, Part II: Country Info PDF Print E-mail
Programming - APIs
Written by Rafael Victoria-Pereira   
Friday, 12 August 2011 00:00

This TechTip series explores the useful yet simple Web services of GeoNames. We started with the time zone API, and now we'll combine two other Web services in order to retrieve data about a country, using an address or set of GPS coordinates as a starting point.

rafael_victoria_preiraWritten by Rafael Victória-Pereira

Now that we know how to find a time zone (given an address or set of GPS coordinates), let's find out more about the country! For that, I'll use the Country Info REST Web Service. As with the previous tip of this series, I won't discuss the methodology—only the highlights of the Web services used here—so if you haven't read the first tip, it might be a good idea to do it now.

Last Updated on Wednesday, 10 August 2011 08:30
Read more...
 
User Rating: / 3
PoorBest 
Using APIs to Extend RPG: The CEE APIs PDF Print E-mail
Programming - APIs
Written by Joe Pluta   
Wednesday, 03 August 2011 00:00

RPG is a fantastic language for business calculations, but sometimes it needs a little help with the more esoteric computations, and that's where APIs come in.

joe_plutaWritten by Joe Pluta

I recently had an opportunity to program some electrical formulas (or do you say formulae?). This took me out of my normal comfort zone of traditional business mathematics and made me hearken back to my days of algebra and trigonometry. While I couldn't have done this in RPG III, it is possible in RPG IV—even using the traditional fixed-format technique. And if you're willing to stretch a bit and use ILE concepts, it's actually quite easy to do arbitrarily complex mathematical calculations in RPG IV and especially in free-format RPG. All you need is a good set of mathematical APIs, and as it turns out, the IBM i provides you with not one, but two distinct sets of APIs that can be used for the purpose: the CEE APIs and the C Runtime APIs. This article will cover the CEE APIs, and I'll follow up with the C Runtime APIs in a second article.

Last Updated on Friday, 29 July 2011 13:32
Read more...
 
User Rating: / 4
PoorBest 
The API Corner: Just How Many Spool Files Do You Have? PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 20 July 2011 00:00

The QSPSPLI API can tell you.

bruce_viningWritten by Bruce Vining

Have you ever wondered how many spool files are on your system (or more accurately, on a given auxiliary storage pool which, for many companies, is the same thing)? What about the number of spool files a particular user currently owns? If so, don't feel alone. In fact, there have been sufficient requests for this type of management data that IBM has provided the Retrieve Spool Information (QSPSPLI) API to provide you with quick access to this information. The QSPSPLI API, documented here, is standard with 7.1 of the i operating system and is also available on 6.1 with PTFs SI33959 and SI34013.

Last Updated on Monday, 18 July 2011 14:34
Read more...
 
User Rating: / 9
PoorBest 
The API Corner: So You Want to Know About Display Files PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 15 June 2011 00:00

The QDFRTVFD API provides pretty much everything you could want to know about a display file.

bruce_viningWritten by Bruce Vining

When developing an application program, I tend to avoid hard-coding program values such as the limit value of a FOR operation. For instance, rather than hard-coding a FOR X TO 10, I might replace the 10 with an appropriate built-in, such as %size(Y), %len(Y), %elem(Y), etc. If Y has to double in size in the future, I much prefer changing the definition of Y and allowing a recompile of the program to take care of the details of loop control rather than having to search through the code and perhaps changing one or more occurrences of 10 to 20.

Last Updated on Wednesday, 15 June 2011 00:00
Read more...
 
User Rating: / 1
PoorBest 
The API Corner: Dynamically Editing a Numeric Value PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 18 May 2011 00:00

The QECCVTEC and QECEDT APIs offer flexibility in terms of providing run-time editing of numeric values.

bruce_viningWritten by Bruce Vining

Back on May 5, Jeff Y. posed the following question on midrange-l (a popular i-related mailing list that you can access here):

 

"Does anyone have a UDF (or other SQL method) of taking a numeric field and returning a character value representing the value as edited via an edit code or edit word in RPG? I know that if I use CAST/SUBSTR/CONCAT that I can do this, but was looking for a neater way. Needs to be supported on V5R4 or earlier."

Last Updated on Tuesday, 17 May 2011 15:48
Read more...
 
User Rating: / 5
PoorBest 
The API Corner: Monocasing Character Data PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 20 April 2011 00:00

Easily find text strings, regardless of case.

bruce_viningWritten by Bruce Vining

In the last article, "Reading a Message File," we used the Retrieve Message API QMHRTVM to sequentially read the messages of a message file and display them using a subfile. In this article, we'll implement a find capability that will allow us to quickly find all messages containing one or more character strings (words).

Last Updated on Monday, 18 April 2011 16:36
Read more...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 4 of 18

WHITE PAPERS

The following White Papers can be found at the MC White Paper Center

 

 


   MC-STORE.COM