rpgle

How do I iterate over a set of records in RPG(LE) with embedded SQL?

How do I iterate over a set of records in RPG(LE) with embedded SQL? ...

Retrieving an Record Problem

Okay, that may not be the best subject... I am setting up an approval workflow within an application. I pass the username and the dollar amount to the subprocedure and figure out what workflow I need to use for the approval process. I thought I had this working until I try to handle the condition when the user hasn't been setup. So in ...

Source Control on the IBM i (iSeries)

On the web side we are working on getting source control. Now, I want to see what can be done for the iSeries side. What is your favorite source control application for iSeries and why? I am looking for low-cost if possible. ...

Accessing RPG on iSeries from Java

Has anyone had good experiences of talking direct to RPG programs running on a V5R4 iSeries machine from Java? If so, what are the recommendations of the community, and what pitfalls should I try to avoid? From the various pieces of literature and spike solutions I have attempted it looks as though we can use ProgramCallBeans (either th...

Data structure definitions / templates in RPG(LE)

Say I have a data structure, such as d dog DS qualified d name 20 d breed 20 d birthdate 8 0 I can then define d poochie likeds(dog) and use poochie.name, etc. But can I just set up the 'dog' as a template w...

XML and iSeries RPGLE - development tools?

I've got a iSeries to .Net compact framework project. It includes rgple programs exposed as web services and a Windows mobile app that uses the webservices. Each iSeries program has a specific webservice wrapper and the .net app reference each. I would like to come up with a more generic messaging service using XML. I am fairly fami...

How do you organize your RPGLE subversion repository on IBM i ?

How do you organize your RPGLE subversion repository on IBM i ? I'm currently working in a travel business company that has a vast amount (about 13k) of RPGLE - sources for their in-house application and finally they want to use version control and adopt a more modern style of coding (the whole WDSC - RDi stuff). So my all-the-time-pr...

Simulate local file specifications in RPGLE subprocedure

I'm very excited about the new "local F specs" coming in V6R1 - see: http://www.mcpressonline.com/programming/rpg/v6r1-rpg-enhancements.html Does anyone know a way to simulate this in V5R4 in a SRVPGM procedure? ...

What resources would you recommend for RPG36 code conversion?

The question really asks it all. We have a bunch of really old S/36 programs that need to be moderized. I am more looking for articles or sites that explain what the old method does and how to convert it to RPGLE. ...

Are there some projects that rate RPG source? like software metrics?

I just wanted to know if you know of some projects that can help to decide whether the analyzed Source it is good code or bad RPG code. I'm thinking on the terms of [Software metric], [McCabe Cyclomatic Number] and all those things. I know that those numbers are mere a hunch or two, but if you can present your management a point s...

iSeries stored procedure - how to get handle on the spool file output?

We have a stored procedure written using a CL and RPG program combination. When called locally on the iSeries all is fine. When called externally (for example from a SQL frontend) the RPG program cannot get a hadle on the spool file it produces because the spool file appears under a different (random?) job number and user. The jobs run ...

Sub select issue

Hi, I'm trying to do a subselect in SQL on an AS400 and getting a "Data conversion or data mapping error" - I'm pretty sure its to do with the way SQL is handling dates in the subselect (specifically it's changing the format by adding commas into a decimal field and it's getting confused when it does the next select) - could someone conf...

Procedure pointers in RPGLE (PROCPTR)

Can anyone provide any interesting usage examples of these? ...

How to call Spring web service from RPG ?

We have developed SOA architecure for our intranet application, so our web-start java applications are connected to central app. server which is running on Spring HttpInvoker, things work pretty well. Now, we came up with need to centralize our business logic, so our need is to call these web services from DB2 RPG stored procedures. Is t...

String replace method in RPG IV

In RPG IV how can I take a string and eliminate all instances of a character in specific or replace them with another one ?. This is kind of like string replace built in methods in other programmnig languages. Ex: take 021-123450-23-4 and covert to 021123450234 ...

how is the best option for ibm iseries legacy code consuming web services

Scenario: old legacy code in rpg have to consume data from a new web service I think in a new stored procedure implemented in any language to act like a proxy but sure there are better options Some options i have seen is http://www.rpg-xml.com/ (third party propietary) or using Java stored procedures with DB2 XML Extender Thank you!!!...

What should be my standard choice of integer type in RPGLE?

When I want an integer in an RPGLE program, what data type should I choose? I'm talking about an integer that doesn't correspond to any field in the database, just a normal general purpose integer - kind of the equivalent of an int in Java. ...

SQL injection - no danger on stored procedure call (on iSeries)?

I've done some searching around but I have a specific question on SQL Injection and hope I can get some input as I believe I may be getting the wrong end of the stick to do with field data sanitising etc :- I have a java program calling a stored procedure on an iSeries. The stored procedure has CL / RPG code behind the scenes. The store...

Pros and Cons of ASNA Visual RPG (AVR)

Have you had any experience with ASNA Visual RPG for Visual Studio 2005/2008? I'm looking for some feedback on this product. I'm especially curious as to how it compares to other methods of accessing files and programs on the IBM’s System i (formerly known as iSeries, AS/400) server. Thanks! ...

Conditional Compilation in RPG(LE)

Can I include a section of code based on whether a variable is defined in my program, or is the preprocessor completely unable to access this information, only compilation conditions? I.e. I'm after something like: /IF DEFINED(myVariable) D myOtherVariable S like(myVariable) /ELSE D myOtherVariable S ...