Giter Site home page Giter Site logo

monoonisamples's Introduction

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

MonoAdoNetConnect - This is an app for testing the Calvins tweaked version of the IBM.DB2.Data.dll tweaked to work with libdb400 under IBM i PASE. Compile and run it to test your database access with .Net.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoAdoNetConnect/MonoAdoNetConnect

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

MonoNancyDataService - This is a sample JSON based IBM i data microService service based on the C# NancyFx framework. This is a great way to make IBM i data and programs available to other web or mobile apps. Service can run in Windows or Native on IBM i. Can be front-ended for SSL with NGINX.
https://github.com/richardschoen/MonoOniSamples/tree/master/MonoNancyDataService/MonoNancyDataService

MonoOdbcConnect - This is a sample program to exercise the new IBM i Access ODBC Driver for PASE released in May 2019 from IBM. https://github.com/richardschoen/MonoOniSamples/tree/master/MonoOdbcConnect/MonoOdbcConnect

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.

monoonisamples's People

Contributors

dependabot[bot] avatar richardschoen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

monoonisamples's Issues

Error while testing MonoOdbcConnect

I'm getting the following when trying to run MonoOdbcConnect.

mono MonoOdbcConnect.exe "DSN=*LOCAL;UID=muser;PWD=mypass;" "select * from qiws.qcustcdt"

MonoOdbcConnect Program Start 6/28/2019 7:32:25 AM
TimeZoneInfo.Local Offset:-06:00:00
TimeonInfo.Local UTC Time:6/28/2019 7:32:25 AM
Connection String:DSN=*LOCAL;UID=TMASON;PWD=POKEY3;
SQL query: select * from qiws.qcustcdt
Message:Dependency unixODBC with minimum version 2.3.1 is required.
libodbc.so.2
Stacktrace: at System.Data.Odbc.OdbcConnection.Open () [0x0004b] in <33e1513e28564b22bb751dc822b20e82>:0
at MonoOdbcConnect.MonoOdbcConnect.Main (System.String[] args) [0x000dc] in <2164350f82424253b1514961baa9c967>:0
MonoOdbcConnect Program End 6/28/2019 7:32:25 AM

When I run the following everything looks good.
isql --version
unixODBC 2.3.4

I can also connect and run the following query from QP2TERM.
select * from qiws.qcustcdt. so I THINK the ODBC driver is in good shape.

Thanks in advance for any insights you have.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.