If you business has a need for some new apps, check out the following site: https://awesome-selfhosted.net/
This site contains lists of various self-hosted and open-source apps for Backup, Blogging, Wikis, Automation, CRM and more.
This blog serves as a platform for sharing my insights into the software industry and other topics. With modernization expertise in desktop, web and mobile development, business process automation, rpa, document management, electronic forms, automated document distribution, system architecture and integration, I aim to provide valuable perspectives and knowledge. Reach out with your IBM i, Windows, Linux or MacOS integration questions.
Email: richard@mobigogo.net Web: https://www.mobigogo.net
If you business has a need for some new apps, check out the following site: https://awesome-selfhosted.net/
This site contains lists of various self-hosted and open-source apps for Backup, Blogging, Wikis, Automation, CRM and more.
Compiling SQLRPGLE Programs that Contain Long SQL Lines
I had a need to create some SQL in the IBM ACS Run SQL Scripts and then wanted to transplant that code into an SQLRPGLE member for processing.
When I compiled the SQLRPGLE program the SQL preprocessor was giving me odd pre-processor errors.
As it turns out by default your SQL line width is most likely limited to 80-100 characters.
Resolution
The easiest fix is to make sure your SQL statement lines are less than 80 characters.
-or-
The other option is to tell the compiler to allow longer lines when specifying *LVL1 or *LVL2 for the RPGPPOPT parameter.
Here's an example using the PPMINOUTLN parameter in the CRTSQLRPGI command when creating an SQL RPG program:
CRTSQLRPGI OBJ(&L/&N) SRCFILE(&L/&F) COMMIT(*NONE) RPGPPOPT(*LVL1) DBGVIEW(*SOURCE) COMPILEOPT('PPMINOUTLN(500)')
Apparently you can skip the special compile option parm COMPILEOPT if you add a special environment variable into your current job like this:
ADDENVVAR ENVVAR(QIBM_RPG_PPSRCFILE_LENGTH) VALUE(500)
You will still need to use the RPGPPOPT parameter set to *LVL1 or *LVL2.
There are times you might want to check your public IP address from your IBM i system. Fortunately you can use the curl command and the QSHCURL command from a CL or RPG program to determine your current IP address if you're using the FREE QShell on i (QSHONI) software (https://www.github.com/richardschoen/qshoni) I created to integrate your PASE program calls to a traditional IBM i program.
Making the CL API call to curl is as simple as this:
QSHONI/QSHCURL CMDLINE('https://api.ipify.org') DSPSTDOUT(*YES)
And the results automatically show up in outfield QTEMP/STDOUTQSH for you to utilize from your CL or RPG programming.
Example IP address response written from STDOUT to the first record of the outfile: 32.1.1.22
Check out QShell on i to be able to run curl commands and much more.
If you find some interesting use cases create an issue on the GitHub site, post a comment or email me and I can publish as an example.