Skip to content
Mono on IBM i Code Samples. Samples may be C#, VB, RPG or CL. Time will tell.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MonoDirList Update comment regarding DateTime error. Mar 10, 2019
MonoHelloWorld readme Jan 14, 2019
MonoListTimeZones
MonoMailSend
MonoPase
MonoRunPase readme Jan 14, 2019
MonoXmlFileToCsv
.gitignore
README.md Readme Mar 13, 2019

README.md

MonoOniSamples

Mono on IBM i Code Samples
This repository will be used to publish .Net and IBM i code samples related to running .Net on IBM i.

Feel free to contribute your own .Net samples and I will publish them here.

Mono on i
You will first need to have the Mono on i environment installed on your IBM i.
Mono for IBM i binary save file distribution can be downloaded from here:
https://github.com/MonoOni/binarydist

Mono on i Library
If you want to easily call .Net applications on IBM i and integrate into standard job streams such as CL or RPG, download and install this library on your IBM i as well.
https://github.com/richardschoen/MonoOniLibrary

If you don't install the MONOI library you will need to call your .Net applications from a PASE QP2TERM command line for testing. The MONO command makes things much easier.

Sample Program ReadMe Files

MonoHelloWorld - Sample template for Mono .Net console apps
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoHelloWorld/MonoHelloWorld

MonoListTimeZones - Sample for listing all the time zones available to a Mono .Net App since standard system values or PASE environment values don't work.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoListTimeZones/MonoListTimeZones

MonoRunPase - Sample for running db2 cli, CL system commands, Qshell or PASE commands from a .Net App.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoRunPase/MonoRunPase

MonoXmlToCsv - Sample for an XML file to a CSV file.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoXmlFileToCsv/MonoXmlFileToCsv

MonoDirList - Sample of crawling IBM i IFS directory tree to list all objects in selected subdirectory and children to an IFS file and OUTFILE PF.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoDirList/MonoDirList

MonoMailSend - This is a production ready mail sender command for sending email from an IBM i system using the Mailkit/Mimekit mail API which can be used to create text and html email messages. Send directly via Office365, Gmail or any other secure or unsecure SMTP server.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoMailSend/MonoMailSend

Installing Samples in IFS Using Git
You can download the zip file from github and unzip the Visual Studio projects or install them in the IFS by using the following git command sequences to clone the repository.

From an IBM i 5250 session, start QShell or PASE command line terminal:
STRQSH or CALL QP2TERM

Change to the root folder. For this example we will be cloning code to /MonoOniSamples IFS directory from the root directory:
cd /

Call the following command line to clone the repository to /MonoOniSamples folder
git -c http.sslVerify=false clone --recurse-submodules https://github.com/richardschoen/MonoOniSamples.git

If all ran successfully you should have a new folder named /MonoOniSamples available on your IFS.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.