rpg

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? ...

Commitment control error on iSeries procedure call

I have an intermittent problem when calling an iSeries stored procedure (consisting of various CL & RPG programs). The error is:- Commitment definition *N not valid for open of QAOSSI12 Error occurred while opening file QAOSSI12. As mentioned the problem does not always occur but occurs more when load testing the procedure. I kn...

Calling a remote Java program on iSeries from RPG

I'm looking to invoke a Java program from RPG running on Iseries V5r4. The remote program is a web service client (performing a postcode lookup), running in Websphere. Ideally I'd like to call it direct from RPG? is that possible? or do I have to create a java program to run on the iSeries and use RMI or something to call the remote j...

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 ...

What is the best tool for Version Control in OS 400 Environment for RPG and COBOL

What is the best tool (best feature, best price, best support) for RPG / COBOL Version Control under OS 400 development? I heard about ARCAD and ALDON. Which one is better? Or is there another better tool? ...

How long can memory leaks persist in RPGLE programs?

I'm putting into production some RPGLE code which uses %alloc and dealloc to allocate memory. Programmers should be able to ensure there are no resulting memory leaks but I'm worried about what happens if they don't. My question is: if programmers mess up and there are memory leaks then when will this memory be reclaimed? Is it when ...

How can I get the EBCDIC value of a character in RPGLE?

I need to have some way of converting single characters in RPGLE into integers - does anyone know a good way? It has to work for all possible inputs and ideally provide a different integer for each input - at the very least it must provide a different value for all common inputs. I don't care particularly what the integers are. In a C li...

Is there an numeric type in ILE RPG which will overflow without crashing my program?

I'm looking for a numeric type in ILE RPG which will "wrap round" when it overflows, in a similar way to how a C int would. Is there such a thing? ...

Web development on iSeries with ABL's Strategi

Advanced BusinessLink offers a suite of products called Strategi, which basically allows creating web applications running natively on iSeries, consuming and providing web services, and replacing green screens with web user interfaces, among other things. The business logic is written on RPG, with web pages combining html and a proprieta...

AS400 RPG Simulator

Hi, I have a urgent requirement to call an RPG Program from java. As suggested in this http://stackoverflow.com/questions/184864/accessing-rpg-on-iseries-from-java question. I am planning to use JTOpen. But unfortunately I dont have access to any of theses systems. So is there any way I can test the java program ? Are there any RPG sim...

Error while Invoking ASO400 RPG From Java

With respect to my yesterday's question on invoking RPG program using Java, the below exception is through from RPG Program. **Application error. RNX9001 unmonitored by ZM30000R at statement N, instruction X'0000'.* I have used the code that was posted in that question and after changing by the suggestions that were given in answers. ...

How to clear the screen on an AS400?

Is there any method to clear the screen in RPG for the AS400? I'm looking for something with the same result as clrscr() in C. ...

Very strange iSeries Provider behavior

We've been given a "stored procedure" from our RPG folks that returns six data tables. Attempting to call it from .NET (C#, 3.5) using the iSeries Provider for .NET (tried using both V5R4 and V6R1), we are seeing different results based on how we call the stored proc. Here's way that we'd prefer to do it: using (var dbConnection = new...

How to set a timeout in connect/send ? ( as400 iseries v5r4, rpg )

From this rpg socket tutorial we created a socket client in rpg that calls a java server socket The problem is that connect()/send() operations blocks and we have a requirement that if the connect/send couldn't be done in a matter of a second per say, we have to just log it and finish. If I set the socket to non-blocking mode (I think...

How to create an alarm and signal handler in RPG ? ( AS400 iSeries v5r4 )

A valuable answer will include the rpg code that does something like this volatile bool interrupted; main() { sigaction(SIG_ALARM, myhandler) // register handler alarm(3) // set the alarm sleep(5) // blocking call, sleep just as an example. alarm(0) // disable the alarm } myHandler() { interrupted=true } I think you've got t...

Is it possible to read content of an IceBreak 'marker' in the program code?

I'm using IceBreak to make HTML frontend for RPG programs. There is a function called 'SetMarker' which takes the name of the marker and the value: SetMarker('Demo':'Example'); This makes the value available for the HTML code: <!--#tag="MyTag"--> <p>This is a/an <%$ Demo %></p> When called by RPG: ResponseWriteTag('IceB.html':'My...