Page 1 of 1

Using VCS with IBMi

Posted: Mon May 29, 2017 11:15 am
by BrendanB
This may also be a way around Joes issue (forum topic: SQL Server Express Limits).

Scenario:
Server Modules need to access RPG programs on the IBMi in order to get certain pieces of data (ie. not all data is accessible through data files).

Problem:
Testing on a PC wont allow for this without 'Delivering' the Server Module to the IBMi.

1. use the web administrator so that Server Modules are automatically executed against the IBMi. Yes - you will need to 'Deliver To' the IBMi for each Server Module you are using, but if you are the sole developer working with that Server Module, then this will not be a problem.

2. if more than 1 developer will need to make changes to the Server Module, the solution is to use different 'developer partitions' on the IBMi, such that each developer can 'Deliver To' their own partition (meaning multiple developers can work on the same Server Module).

3. the build machine will be used to Deliver the 'merged' Server Module to the main Development partition.

This slightly complicates the VCS setup, as you must use the partition directory (usually something like 'Partition (DV1)') as the working folder for VCS. The build machine will have the 'real' partition (ie. Partition (DEV) ), whilst each developer has their own partition on the IBMi. LANSA Export/Import can be used when setting up the developer partitions (to ensure that they all start with the same code base), but the tricky part will be managing library lists so that data files are shared.

This would seem to bypass the 'SQL Server Express Limit' that Joe ran into, as well as providing for situations where developers need to test against the IBMi directly (RPG calls, SQL Stored Procedures etc) that cannot be replicated to a PC.

I would be curious how many people are using VCS with an IBMi, and what your chosen VCS software is.

Brendan.

Re: Using VCS with IBMi

Posted: Tue May 30, 2017 11:28 pm
by jyoung
Hi Brendan,

At my last job we used Git and "deliver to" the IBM i. We only had one i, so we had multiple installs for a dev, test and production environments.

As you mentioned, eone of the problems we ran into was having to call RPG programs as you can't really do this when running locally. In those cases the only thing we could do is have lots of if (*OSAPI = IBM) statements and LOTS of trace outputs. For programs that returned data we just had to fake it locally.

I never thought of using the web administrator however. How did you do that?

Regarding the VCS setup, it worked out pretty well. I recall only a few issues, deleting objects being the biggest one.

Currently we use the Task Tracking on the i and even though I am currently the sole developer I still end up stepping on my own toes. :D. One way I have reduced this however is focus on small components that embrace the Single Responsibility principle, almost to the point where one Server Module has one srvroutine and common logic is abstracted into another server component or function. There will be (always is) some cross over and overlap, but I have been finding that it keeps the locking issues to a minimum.

Regarding the mentioned sql express limitation, Art mentioned it would be nice if there was a "where" predicate with the copy function and I have to agree with him.