We need to install various packages in order to build ibm_db2. Most of these can be installed with yum
:
yum group install 'Development tools'
yum install git
In this Project i provide a simple example how to connect to a LDAP Server from IBM i. I added some Constants and Functions from the LDAP Headerfile provided by IBM, not all Functions are implemented in this example. The Serviceprogramm is written in Fixed Format RPGLE and uses the provided LDAP API written in C, which is included in the OS. The Documentation of the LDAP API can be found here
Thanks to @ScottKlement, who has published an example of a copybook on his site, which I have used as a guide. You can find his example here. Also thanks to @m1h43l for helping me with handling the null-terminated strings in the RPG Code.
<?php | |
// This file walks you through the most common features of PHP's SQLite3 API. | |
// The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
// Create a new database, if the file doesn't exist and open it for reading/writing. | |
// The extension of the file is arbitrary. | |
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); | |
// Errors are emitted as warnings by default, enable proper error handling. |
<?php | |
// This file walks you through the most common features of PHP's SQLite3 API. | |
// The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
// Create a new database, if the file doesn't exist and open it for reading/writing. | |
// The extension of the file is arbitrary. | |
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); | |
// Errors are emitted as warnings by default, enable proper error handling. |
#!/usr/bin/env python | |
import os | |
import re | |
import daemon | |
import asyncore | |
import smtpd | |
class SimpleRelayService(smtpd.PureProxy): | |
"""Handles processing mail for relay""" |
Install .NET via the following script:
I advise to first do a dry run and to enable verbose mode to review if envvar DOTNET_INSTALL_DIR
is set correctly:
-- category: Bryan.Dietz | |
-- description: Jobs in msgw(wrkactjob) | |
SELECT Job_Name | |
,Subsystem | |
,Function_Type CONCAT '-' CONCAT Function AS "Function" | |
,Job_Status | |
,(SELECT Message_Text | |
FROM TABLE (Qsys2.Joblog_Info(I.Job_Name)) A | |
ORDER BY Ordinal_Position DESC |
#!/bin/sh | |
file=path/to/file | |
bucket=your-bucket | |
resource="/${bucket}/${file}" | |
contentType="application/x-compressed-tar" | |
dateValue="`date +'%a, %d %b %Y %H:%M:%S %z'`" | |
stringToSign="GET | |
${contentType} | |
${dateValue} | |
${resource}" |
#!/bin/bash | |
# This script can be used to commit changes to git repo and push to | |
# remote repo all in one command. | |
TODAY=$(date) | |
HOST=$(hostname) | |
git add . | |
git commit -m "Changes committed: $TODAY from $HOST" | |
git push | |
git pull |
#!/usr/bin/python | |
#------------------------------------------------ | |
# Script name: sqlitedbtest1.py | |
# | |
# Description: | |
# This script is a good test program for SQLite DB | |
# functionality. | |
# | |
# Parameters: | |
# P1= |