Unit Testing Natural Applications – Legacy Coder Podcast #1

Unit Tests for Natural Applications with NatUnit

Unit testing with Software AG’s Natural – is that even possible? Let’s find out in the very first episode of the Legacy Coder Podcast. Unit testing Natural applications Why would I want to unit test my Natural code? You get instant feedback whether your code works. That’s fun! 😀 You get a safety net for … Read more

Introduction to the show and the host – Legacy Coder Podcast #0

Legacy Coder Podcast Episode 0: Introduction to the show and the host

Who is this guy and what the heck does he know about Software AG’s Adabas and Natural? I’ll show you in the pre-episode zero of the Legacy Coder Podcast. Introduction to the podcast and myself My experience with Adabas and Natural. I’m programming with Natural since 2003. I’m the president of the International Natural User … Read more

Exception-like error handling in Software AG’s Natural

Error handling in Software AG’s Natural can be done in a way that resembles Exception handling in object-oriented languages like Java. throw Instead of throwing an Exception, you raise an error simply by assigning a value to the system variable *ERROR-NR. As soon as a statement like the following is executed, the current program flow … Read more

Automatically reconnect to a database after a failure in JBoss EAP 7

My JBoss EAP 7 server couldn’t cope with a failing database. After a database restart or failure, e.g. due to maintenance, it simply would not connect to the database again automatically. The application simply stopped working as soon as the database was unavailable for a short period of time. JBoss’s server.log was full of (not … Read more

How to find the physical file path of the current FUSER of a Natural runtime

Here’s a short subroutine for reading the physical file path of the current FUSER of a Natural (from Software AG) runtime. I’m not sure if it works on a mainframe, but it definitely runs on a Linux system. The subroutine returns the following information, if it runs successfully: P-FUSER-PATH /home/macke/fuser P-RC 0 Otherwise the return … Read more

How to enable access logging (accesslog) in JBoss EAP 7

Configuring JBoss EAP 7 to write an access log (e.g. like Apache webserver) is quite easy with the CLI: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add If you need any additional configuration, take a look at this: Wildfly 10.0.0.Final Model Reference. For example, to change the prefix of the log’s file name: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:write-attribute(name=prefix, value=”my_access”) Alternatively, you could change the configuration in … Read more