Things with open source on i have actually come a long way since Aaron pioneered a lot of this stuff for us.
Jesse and the IBM team have done a great job at making the open source stuff much more consumable.
You probably already know how to do this, but here's the low tech way I package up a save file for distribution these days:
Packaging library into a save file
-Package all the source in a library with a build CL and no objects built.
-Create temp savf: CRTSAVF QGPL/TEMPSAVF
-Save the library or objects to a save file:
SAVLIB LIB(LIB) DEV(*SAVF) SAVF(QGPL/TEMPSAVF)
-Copy the library to the IFS
CPYFRMSTMF FROMSTMF('/QSYS.LIB/QGPL.LIB/TEMPSAVF.FILE')
TOMBR('/tmp/protolib.savf')
MBROPT(*REPLACE) CVTDTA(*NONE)
-Upload or zip and upload to your web site, github or wherever you please.
Restoring library from the web
-Download savf or zip file, unzip and place in the IFS /tmp or other directory through favorite file transfer method of choice.
CPYFRMSTMF FROMSTMF('/tmp/protolib.savf')
TOMBR('/QSYS.LIB/QGPL.LIB/TEMPSAVF.FILE')
MBROPT(*REPLACE) CVTDTA(*NONE)
** This will even auto-create the save file I believe
-Restore library or restore objects if you saved with SAVOBJ
RSTLIB SAVLIB(TEMPSAVF) DEV(*SAVF) SAVF(QGPL/TEMPSAVF)
-Create your build program or objects per instructions. I use a CL program called SRCBLD in mine.
The process is so much easier these days.
Then you don't really need Github.
Just instructions and a web site or Github site to hang it on. You Github site could have a single readme and a copy of your binary save file like I do with QSHONI.
Anyway you know my thoughts on the topic :-)
------------------------------
Richard Schoen
------------------------------
Original Message:
Sent: Thu December 17, 2020 06:47 PM
From: Robert Cozzi
Subject: IBM i API Prototypes in RPG free
Richard,
I hear ya. However, the example I like to use is an old Aaron Bartel article where the latest cool thing he was promoting (don't really recall what it was at the moment, Git, Yum, Ruby, alphabet soup etc.) was So Easy. And then he went on to outline the "27 steps" to install it.
For example I can write an SQL UDTF that returns the content from an IBM i API using inline C code. I can do in my sleep.
But while there is a growing number of people who spell QShell as "QSH" on this system, I don't think its peaked.
Also, just to be a dick... :) In CL, you can specify TOFLR('/home/cozzi/prototypes') rather that trying to determine which 1-character "flag" whomever wrote whatever it is we're using today decided was a cool letter to use (was it upper/lower case?)
I suppose Scott's idea (as is normally the case) is the best solution. All those things he mentions are easy to build if they aren't built already. So perhaps some how we can put stuff on GIT and do releases. Now I'm lost at that point because the most I've worked with GIT is to create a user Id several years ago and post a little bit of code. Looked cute.
-Bob
Original Message:
Sent: 12/17/2020 6:31:00 PM
From: Richard Schoen
Subject: RE: IBM i API Prototypes in RPG free
You don't need to be a Linux or QSH/PASE/bash junkie to use Github effectively.
I use Github a couple of ways:
-I put binary save files in some cases such as with my QSHONI utility (https://github.com/richardschoen/qshoni), which would be probably the equivalent of a release as Scott mentioned. Load save file, run build CL and it creates the objects.
I even have a Windows based installer that I share with those who might be uncomfortable with dropping a save file into the IFS, calling CPYFRMSTMF and doing a RSTLIB.
-I also put source samples in some cases. And I will probably do this more in conjunction with shell scripts and make files for deployment going forward because if you supply it in the Git repo, you can have it build the library as well all from the QSH/PASE/bash shell. Plus I am also doing "Garage Linux" development.
With source samples, the code can actually be copied directly from Git into a source member in RDI or SEU (Ugh).
-I also offer a commercial Git client for IBM i source management with Git, appropriately titled: iForGit (http://mobigogo.net/files/docs/iforgit) which works similar to what you were describing, however the intended audience is customers who want to keep their source in source files, yet want to start versioning stuff in Git as well to get out of the member copy and rename business.
I guess it all comes to who your audience is for the code samples you're providing and how much support you have to give them for installation.
But I would suggest Github as the new way of doing things if your open sourcing code.
And also doing some more "Garage Linux" if you're not retiring any time soon :-)
------------------------------
Richard Schoen
Original Message:
Sent: Thu December 17, 2020 05:52 PM
From: Robert Cozzi
Subject: IBM i API Prototypes in RPG free
I was thinking more along the lines of an easy to get to resource. I know GIT is the current "cool" thing but such a tiny percentage of actual shops have staff that even know what that is. But I'm all for it if there a CL command we can build that says:
GetFromGit SRCMBR(QUSROBJD) SRCFILE(MYLIB/QCPYSRC) RMTLOC('/blah,blah,blah,blah') ...
I'm not a fan of making people learn "Garage Linux" just to load source. But if there's an ease CL command to pull it down. Let's go with that.
-Bob
Original Message:
Sent: 12/17/2020 1:48:00 AM
From: Richard Schoen
Subject: RE: IBM i API Prototypes in RPG free
Perhaps a GitHub repository ?
Great place for all general code samples to live.
------------------------------
Richard Schoen
Original Message:
Sent: Wed December 16, 2020 09:22 AM
From: Robert Cozzi
Subject: IBM i API Prototypes in RPG free
Hi Everyone,
I'm putting together a set of /INCLUDE members that contains the Prototypes for IBM i APIs.
The C language has these in the H file in QSYSINC but for 30 years IBM has failed to add them to QCPYSRC (or even QRPGLESRC) in QSYSINC.
Over the last 30 years, I've been prototyping the ones I've used and now I am, as needed, converting them to the free format RPG syntax.
I'm trying to figure out if I should just post them on my website for download or if there's a public place that IBM sponsors where everyone can get into it without being a member of this club or group or a customer of company xyz?
I've got most of the commonly used APIs already prototyped and many have been converted to free format. I am currently working on the more complex Message QMH* APIs.
I see this as a living document until everything that people actually use has been published.
As an example, here's the correct QCMDEXC prototype in free format:
/IF NOT DEFINED(QCMDEXC)
/DEFINE QCMDEXC
dcl-pr qcmdexc extpgm('QCMDEXC');
cmdString char(32702) Const OPTIONS(*VARSIZE);
cmdLength packed(15:5) Const;
IGC char(3) Const OPTIONS(*NOPASS);
end-pr;
/ENDIF
-Bob Cozzi