Magic System Variables

If you have an iSeries application and want to debug it using the Visual LANSA debugger, you know that the client to iSeries connection is a life saver.  Visual LANSA will use your iSeries data while executing your code locally.

Aside #1: Executing your code locally works within Visual LANSA unless your database is under commitment control.  If it is, functions that update the database will crash.  I will write about that work-around another day.

Aside #2: Yes, I know that Visual LANSA calls it a “System i Server” and not an iSeries.  I refuse to type a lowercase letter by itself as part of a proper noun.  iPhone and iOS are hard enough.

What were we talking about?  Oh yeah.  Executing code using the client to iSeries connection.  Did you know that when you use that connection some system variables pull from the iSeries without you writing a line of code?  I didn’t realize it until we were testing Visual LANSA debug and one of the *AUTONUM system variables returned the correct next number from the iSeries.  Magic System Variables?  That led down a rabbit hole to discover which system variables were magic.  Spoiler: very few.

It took a week with LANSA Support to determine that *AUTONUM, *AUTOALP, and *DTA are the only system variables that pull from the iSeries.  It is also important to note that the magic only happened when using the RDMLX version of the connection.  The RDML version of the client to iSeries connection determined the value of every system variable from the local Windows box.

The partitions were not RDMLX-enabled but the RDMLX connection worked just fine.

I walked away from that experience determined to not make any assumptions as we continue our move to  the Visual LANSA programming environment.  Testing everything is important to make sure we understand how each piece of the puzzle works.

The attached image shows a function (on the left) executing within Visual LANSA using a “magic” system which is derived on the iSeries.  This image is part of a larger diagram showing how Visual LANSA interacts with LANSA on the iSeries.

Magic System Variables

Magic System Variables

Posted on March 25, 2011, in Lansa. Bookmark the permalink. Comments Off on Magic System Variables.

Comments are closed.