Skip to content

kadler/OSSILE

 
 

Repository files navigation

OSSILE

Welcome to the OSSILE project. This project is to serve three purposes:

  1. This project is to provide, via the open source community, a wide set of utilities for IBM i. They will get built into the OSSILE library.
  2. This project is to provide working examples of various things in ILE languages (RPG, C, C++)
  3. This project is to provide working examples of SQL (while not technically ILE, the examples are included here due to strong affinity and usefulness)

Currently included in OSSILE

  • Useful UDTF's originally sourced from https://bitbucket.org/christianjorgensen/

    Documentation:

  • CRTFRMSTMF originally sourced from https://github.com/BrianGarland/

    Documentation:

  • GETIPTF, originally sourced from http://bryandietz.us/getiptf.html

    Documentation:

  • C program samples originally sourced from ChrisHird/OSSILE

    • BACKUP Program to run backups using BACKUP options and Image Catalogs and copy to remote file server.
    • CHKRCVRDLT Program to clean up receivers based on days since detatched.
    • CHKOSLVL Program to display the current OS level.
    • DSPCSTINF Program to display the constraints attached to a file.
    • DSPTRGINF Program to display the triggers attached to a file.
    • DSPDQINF Prgram to display a data queue attributes
    • DSPUSRIDX Program to display a User Index attributes plus the content (text only).
    • FTPCLNT an alternative FTP Client to the OS command line.
    • JOBLIST Program to display the currently active jobs and some of their attributes.
    • LSTDBRTST Program to display the database relationships for a file.
    • RTVJRNOBJ Program to display the objects currently journalled to a journal.
    • MD5CRC Program to generate a CRC for the content of a DB file.
    • RTVDIRSZ Program to log the content and sizes of a directory plus calculate the total size.
    • SRVPGMCHK Program to check the signatures of a service program and a program to ensure the program can call the Service program.
    • SYSINFO Program to retrieve and display system status.
    • ZLIB ZLIB Open Source for IBM i.

    Documentation

  • sha256, originally sourced from https://github.com/miguel-r-s/SHA-256 a re-implementation of SHA256 in C. Documentation:

  • ArrayList, originally sourced from RPG Next Gen. An ArrayList is a one-dimensional array. It is also a dynamic array which means that the size is not set at compile time but at runtime and it can grow if required.

    Documentation:

  • SU, originally sourced from bitbucket.org/cmasseVolubis/volubis. Like Under Linux, become QSECOFR as needed

    Documentation:

  • Linked List, originally sourced from RPG Next Gen. An array allocates memory for all its elements lumped together as one block of memory. In contrast, a linked list allocates space for each element separately in its own block of memory called a linked list element or node. The list gets is overall structure by using pointers to connect all its nodes together like the links in a chain.

    The linked list utilities service program shows how to get data via a list instead of using a userspace.

    Documentation:

  • Update User-Defined Attribute Tags a QSYS object with a value. The value is stored in the user-defined attribute of the object.

    Documentation:

  • Message, originally sourced from RPGUnit. This service program provides wrappers for the OS message API QMHRCVPM, QMHRSNEM and QMHSNDPM. It eases the handling of program and escape messages.

    Documentation:

Installing OSSILE on your IBM i

Method 1: download the .zip file and compile

  1. Download https://github.com/OSSILE/OSSILE/archive/master.zip and place it in IFS
  2. From a PASE-capable shell (ssh client, QP2term, etc), run:
  • jar xvf OSSILE-master.zip

  • cd OSSILE-master/main && chmod +x ./setup && ./setup

    To exclude an item from building, remove it from buildlist.txt or comment it out with a preceding '#'

Method 2: Download *SAVF

  1. Create a save file object on IBM i.
  2. Download https://github.com/OSSILE/OSSILE/blob/master/ossile.savfsrc and upload it to the IBM i, replacing the contents of the save file you've created
  3. Use the RSTLIB command to restore the OSSILE library from the save file. For example:
  • RSTLIB SAVLIB(OSSILE) DEV(*SAVF) SAVF(MYLIB/MYSAVF)

Method 3: Installing via Relic Package Manager

Each directory in /main/ is a seperate item, each are installable seperatly with Relic. The base command is RELICGET PLOC('https://github.com/OSSILE/OSSILE/archive/master.zip') PDIR('OSSILE-master/main/<ITEM>') PNAME(OSSILE), where <ITEM> is one of those directories. For example:

  • PDIR('OSSILE-master/main/crtfrmstmf')
  • PDIR('OSSILE-master/main/udtf_image_catalog_details')

OSSILE directory structure

These are the main directories within OSSILE:

main/

This directory houses complete, buildable code. In other words, it contains all the tools and utilities we list above as "included in OSSILE". Each subdirectory represents a separate buildable item.

code_examples/

This is where one can find examples of how to accomplish various tasks in ILE languages. They do not need to be working, compilable examples, though that is preferred. Inside this directory, there are subdirectories for the various ILE languages. The code examples are located in the appropriate lanuage directory.

sql_examples/

This directory houses examples of how to accomplish various tasks using SQL scripts.

Contributing

See CONTRIBUTING.md

About

A wide set of utilities for IBM i.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 91.5%
  • Shell 2.4%
  • C++ 1.9%
  • Objective-C 1.4%
  • Batchfile 1.3%
  • Makefile 0.5%
  • Other 1.0%