Wednesday, August 14, 2024

Who Stole my IBM i Disk Space ?

Solve Your IBM i Disk Use Issues with FREE Disk Utility
In some of my previous roles I often played an extra part as Disk Cop. This often meant scouring through thousands of libraries and directories to find large files and determining who owned them and why they were being kept online. If you understand the phenomena of the ever-growing disk usage you know why Cloud platforms have grown exponentially. It's because storage use never goes down. This post will introduce you to a FREE solution for handling your disk space woes. 

Most likely you might have these disk space questions:  

I need to check ALL the disk space on my IBM i?  

I can't seem to get a handle on our IFS files and I wonder what's taking up space?

The domain of checking free disk space used to belong to commercial utilities or the GO DISKTASKS menu, which was limited to locating only libraries. Let me introduce you to the Ncurses Disk Utility (ncdu). Ncdu is part of the open-source packages available for IBM i. To install ncdu from the PASE or SSH command line simply type: yum install ncdu  Or you can install ncdu from the Open-Source Package Management option in ACS.

After installation, simply change to the appropriate directory and type: ncdu or /QOpenSys/pkgs/bin/ncdu (if the open-source package binary directory is not in your file search path) from an SSH terminal command line. Ncdu must be run from an SSH terminal via putty or your favorite SSH terminal tool.

Listing Free Disk Space for a Single Library
After installation, go to an SSH terminal and log in to the command line and run the following command to check out the QGPL library and show the list of objects descending by size. Libraries exist as a directory inside of the /QSYS.LIB directory. 

ncdu /QSYS.LIB/QGPL.LIB


ncdu results for QGPL - largest objects in use at top in descending order
ncdu results for QGPL - largest objects in use at top in descending order 


After the object list is shown you can use the arrow keys to navigate the list of library objects IFS-style and determine which of them are the largest in-use objects. You can also type a question mark: ? to display options available. If you're brave enough you can use the d option to delete offending objects, but it might be safer to use this tool to identify large objects and delete them another way. It's up to you how you use the app. You have been warned to be careful when deleting objects!

Listing Free Disk Space for the entire IFS Root File System
You can also crawl the entire root / file system on your IBM i partitions using the following command:

ncdu /

It may take a few minutes to get an object list, but you now have a full picture of ALL the directories and libraries (everything under /QSYS.LIB) on your system. 


ncdu root / list results - largest objects in use at top in descending order
ncdu root / list results - largest objects in use at top in descending order

Once again you can navigate through the directories to locate offending objects and decide what to do with them. 

That's it. Start policing your IBM i disk space. 

ncdu is a great forensic analysis tool for determine large objects in use. Let me know if you find value in this tool. I surely have. 

This link on learning ncdu might also be helpful: 

This link points to some ncdu export processing examples

If your team needs mentoring or learning how to use ncdu or automatically monitoring disk utilization, or if your team needs help with process modernization discovery, training, mentoring and integration services, reach out and let's talk about your business automation pain points. Your team will be on track to streamlining and modernizing your
IBM i processes in no time. 



Sunday, August 11, 2024

ActiveMQ Can Integrate IBM i to Anything

In today's world there are a few ways to do platform agnostic messaging with IBM i. This post introduces you to ActiveMQ.

If your business has the need to send and receive messages and data across platforms in a transactional fashion, the classic way to do that internally on IBM i might be to use data queues. Data queues have been around since the early days of the AS/400. The AS/400 was introduced back in 1988. However data queues are generally used to communicate intra-system between RPG, CL and COBOL apps built within the IBM i operating system. In today's world of multi-platform communications with API calls and REST services across multiple servers and services, ActiveMQ and Kafka can be better vehicles for exchanging transaction data and messages than using data queues. The topic of this post will focus on using ActiveMQ to implement platform agnostic messaging from your IBM i. But the same concepts can be applied using Kafka and even RabbitMQ.

First some background on ActiveMQ from the ActiveMQ web site: Apache ActiveMQ® is the most popular open source, multi-protocol, Java-based message broker. It supports industry standard protocols so users get the benefits of client choices across a broad range of languages and platforms. Connect from clients written in JavaScript, C, C++, Python, .Net, and more. Integrate your multi-platform applications using the ubiquitous AMQP protocol. Exchange messages between your web applications using STOMP over websockets. Manage your IoT devices using MQTT. Support your existing JMS infrastructure and beyond. ActiveMQ offers the power and flexibility to support any messaging use-case. 

Let's talk about a few potential use cases for ActiveMQ messaging on your IBM i and other systems. These use case examples are meant to get you thinking about the potential uses for messaging with your apps. 

Shipment lookups - Let's say you have the need to do shipment lookups from an IBM i green screen or web application and it's not so easy to integrate to your shippers from RPG. You can set up a PHP, Node, Python, Java or other server that can easy make the calls to the external shipper. Then you set up a queue via ActiveMQ to receive the shipment lookup request data from your classic IBM i code. Requests are usually sent from direct RPG, COBOL or CL calls by composing a delimited request string of data, a JSON or XML packet. Response data can then be returned directly to your IBM i app from the message queue after a shipment lookup has been performed.

Realtime credit card processing - A credit card request can be composed from RPG and sent to your credit card processing program via JSON, a REST call and an ActiveMQ message. The credit card request gets processed and then the response token or other information can be returned back to the RPG program or directly to a DB2 database table once the transaction is complete. 

Incoming orders or mobile work - Let's say your company has implemented a mobile app to handle capturing new orders on an iOS or Android device. As orders are completed the data can be dropped into a message queue for ActiveMQ to pick it up and send the data to an RPG, COBOL or other process which ultimately updates the system of record database without needing to re-key order data. Orders and service requests could also be staged to a mobile device over message queues as well. 

Sending order or shipment data to e-commerce site - As orders and shipments get fulfilled from an IBM i ERP system, transactions can be queued up for a remote Linux or Cloud based e-commerce app to pick up. On the e-commerce site an agent can be set to receive the order, shipment or inventory updates and auto-update the SQL Server, Oracle, PostgreSQL or MariaDB database in real-time fashion.

Placing EDI supplier orders - Imagine your team currently enters material and parts orders into your IBM i ERP system and then the same orders end up being re-keyed by hand to your supplier's portal, even though they offer a web API.  What if new and updated orders could be entered into your IBM i system once and then updated in real-time to your supplier portal using their integration API. Many hours of manual effort can be saved by entering and checking supplier order status via a web API.

All of the above integration scenarios are available to your RPG, COBOL and CL applications without forcing your classic IBM i RPG development team to learn new methods of coding to implement APIs and integrations between your various application platforms and apps. 

For a little more in-depth reading I listed a couple of articles below. Read these if you want to learn more about ActiveMQ and give it a try with your IBM i. 

Using ActiveMQ message queues on the IBM I

ActiveMQ from PowerWire - Andy Youens

Apache ActiveMQ Site

If your team needs mentoring or learning how to use ActiveMQ, or if your team needs help with process modernization discovery, training, mentoring and integration services, reach out and let's talk about your business automation pain points. Your team will be on track to streamlining and modernizing your IBM i processes in no time. 

Web Site: https://www.mobigogo.net

Email: info@mobigogo.net



Monday, August 05, 2024

IBM i, .Net and C# - Modernizing Your Apps

There are many ways to approach modernizing IBM i applications. They all depend upon your organization's technical background, culture and history. For today's article I'm focusing on using .Net as a modernization platform, however there are many other ways to approach modernizing your apps as well. 

The modernization concepts described in the article can most likely be employed using your favorite language and platform as well based on your team's experience level and desire for a particular technology stack. 

I have been writing applications using C# since .Net was introduced. Over the years I have used .Net to integrate to IBM i from Windows, Linux and even MacOS. If you have been wanting to create apps for your IBM i that utilize C# and .Net, read on to learn about the possibilities. 

In today's development world, C# is the predominant language in the .Net ecosystem and to a lesser extent VB. All kinds of applications that connect to, augment and provide ancillary services to IBM i can be created quickly with .Net. 

Desktop Apps - Desktop applications created using WinForms and XAML are a popular way to create apps running primarily on the Windows desktop. An example of a Windows desktop application is the IBM i PDM/SEU replacement component that I wrote recently called: Work with IBM i - Programming Development Manager for Windows (PDM). This tool is a Windows based replacement for the PDM and SEU tools on IBM i. It sports a built-in editor and can also be hooked up to VS Code for use with Code for i, RDI, Notepad++ and any other external editor you want to use. I'm also working on adding an IFS manager to the utility right now as well. Check it out and let me know what you think. It's FREE to use

Console Apps - These are Windows, Linux or MacOS command line apps that you may want to schedule to do specific work that connects to IBM i via ODBC, JT400, SSH or other web services. I can think of things such as data transfer, exporting or importing data from Excel, XML, JSON and other formats. Other examples include: SFTP file upload upload/download from IBM i to a desktop or server directory, integration to Office 365 to send and receive email, integrating information to SharePoint and OneDrive documents and folders, generating reports with tools like Jasper or Crystal Reports, performing system monitoring activities, connections to web services and more. The automation opportunities for console apps are endless. Console apps are also a nice way to create apps that can be integrated to process automation scripts or other pipelines. Or they can be scheduled to run using the Windows job scheduler or other scheduling tools. Console apps can also be integrated with PowerShell, Bash, Python, PHP or BAT files and other scripting languages to create cohesive automation processes. 

Windows Services - A windows service by its definition is an application that is integrated to the Windows service bus and can be started and stopped using the Windows Service Manager. Many of the IBM i integrated applications you would create for a Windows console app can be easily turned into a Windows Service. A service app doesn't have to be scheduled because the service is always on and processing data from your IBM i system on a regular basis.  

Web Applications - .Net supports several web application types that can be created using the ASP.Net framework. From simple HTML applications to complex React or Blazor-based web apps, .Net can help you easily build highly capable applications to enhance and modernize your existing IBM i applications. Imagine a web-based order entry system capturing real-time orders augmenting your old, tired 5250 screen-based systems. .Net web applications can also be self-hosted with a built-in web server component or served up using Apache, NGINX or Internet Information Server (IIS) on Windows or Linux servers and cloud-based hosted VMs.

Web APIs - Web APIs are the universal communicator for the Internet. The ASP.Net platform allows developers to create new web services and web APIs very quickly, allowing value to be unlocked quickly from their IBM i applications and data. Web services are a safe way to make IBM i data available in a useful manor to vendors and customers. Web APIs can connect directly to IBM i data or be hosted in a cloud environment where the IBM i securely refreshes data without exposing the IBM i system directly to the web. 

Mobile Apps - Let's say you have employees in the field and want to make information available to them in real-time on their phones or tablets. Or maybe you need them to be able to work offline. A mobile app is the best way to go. By using .Net to create mobile applications and services you can modernize your business and streamline your paper-based processes by providing an app to allow real-time work to get done. There's often a large return on investment (ROI) to be had by creating a mobile application for your organization to gather information more efficiently without re-keying or entering data into an old green screen app. And you can eliminate the paper and shipping costs associated with old-style paperwork.

Single Pane of Glass - Dashboard - Picture this - A customer service representative receives an inbound call or email with a status request. The customer wants to check their order shipment status. The rep first navigates to the CRM system to get the customer number.  Next they are required to navigate to the green screen Order Entry System to look up order and shipment numbers on separate screens. Then they log in to the UPS or Fedex web site to check on a shipment status. Finally, the service rep needs to compose an email response or generate and print some correspondence to physically send out to the customer or vendor. This conundrum is referred to as swivel-chair processing, where an employee has to navigate between several applications to get a single answer to a business question. This is a huge time waste for customers and employees, forcing companies to have larger service staffs than needed. Imagine if employees could spend time servicing customers rather than attending to mundane questions that could be answered online. Everybody wins.

.Net is a great platform for creating integrated desktop or web-based applications that provide dashboards to display real-time metrics reporting using a single form, single pane of glass or 360-degree view. This approach to providing real-time information to customers, vendors and employees allows users and managers to interact with related information from one or more systems via a single dashboard in real-time at the press of a button instead of swiveling between many apps to answer a single question.  

Middleware - When you need to create components that queue data or push transactions between systems, .Net is a great platform to build those apps on. Imagine syncing real-time data between DB2 and other databases, queueing up and processing transactions via Kafka, ActiveMQ, RabbitMQ or other message queuing components and then processing the data via your IBM i system.

Intersystem Communications - Perhaps you have a few systems that need a real-time service bus between them to exchange information. Creating a pipeline to communicate between those systems in real-time can be accomplished using .Net and the various communication mechanisms such as HTTP, WebSocket, gRPC, RPC, WebHook and other methods. As an example, imagine committing a source member in a Git DevOps pipeline and having it trigger a process back on IBM i or one of your other systems to ingest and compile the source changes. DevOps automation is just one of many places where intersystem communications can allow systems to work together in a real-time fashion. 

Desktop Automation - Imagine pressing a function key from a 5250 screen or web app and having it launch a new link in your desktop browser. Or your customer service system auto-generates a new word correspondence document from a template on your IBM i business system and you want to auto-launch it in MS Word or Office 365 for editing before sending it out. Or you want to transfer files securely between your desktop and an IBM i folder without needing to set up insecure Windows file shares. And maybe you want to transfer print files to your user desktops directly from a print queue without the need to physically print the documents. Desktop automation with .Net is a great way to make all of  this desktop automation happen. 

RPA - Robotic Process Automation - Microsoft Power Apps and Power Automate are tools that can be used on the desktop and in the cloud to write automation scripting that can interact with web and desktop applications, send/receive database information, compose and send or receive email messages, ingest and process Excel, XML and JSON files, perform secure file transfers and more. If your company is using Office 365 you probably already have a FREE desktop license available to you and you may not even know it yet. This tool is a must-learn for any automation your team is doing today. 

Artificial Intelligence-AI - Many organizations are just getting started trying to put GenAI and tools such as ChatGPT to use in their organizations. .Net Copilot has been introduced for Windows and other Office services. And ChatGPT is being used by many to start embracing AI into their organizations and business processes to augment user-driven processes. If your organization is thinking about AI, Microsoft Power Automate and other products are being infused with AI automation. I would love to hear your thoughts on AI and IBM i.

If your team needs help with process modernization discovery, training, mentoring and integration services, reach out and let's talk about your business automation pain points. Your team will be on track to streamlining and modernizing your IBM i processes in no time. 

Web Site: https://www.mobigogo.net

Email: info@mobigogo.net








Friday, July 26, 2024

What Rhymes with IBM i ? - FastAPI

Has your team ever wanted to quickly create a web API that can access data from your IBM i or integrate with your other internal or external business systems? Or possibly you need to be able to call IBM i programs and procedures from another platform. One of the fastest ways I have found to create Web APIs is by using the Python based FastAPI framework.

With FastAPI you can simply define routes and business logic for your APIs and start testing them very quickly. I use FastAPI a lot as a first stop for prototyping API calls that I may be using in other languages.

As a first introduction to FastAPI take a look at the Python FastAPI Mock Server GitHub project I created. You can set up the server and start utilizing any CSV or JSON file as a data source for API testing. 

Give it a spin and let me know what you think: https://github.com/richardschoen/fastapimockserver

You'll be up and running with FastAPI in a matter of minutes. Have fun.

And if your team needs affordable training, mentoring or integration services for creating and implementing web APIs for your IBM i and other business systems, reach out and let's talk about your API pain points. Your team and systems will be API-enabled in no time.

Web Site: https://www.mobigogo.net

Email: info@mobigogo.net

Wednesday, July 24, 2024

Mobilize and Modernize Your Paper Based Workflows

Picture your team working seamlessly, free from the constraints of paperwork and outdated green screen or desktop apps. By adding a mobile app and modernizing your IBM i, Windows, Linux or Mainframe platform processes, you can increase efficiency, lower costs and empower your workforce to focus on what truly matters. Getting work done and keeping customers, vendors, and employees happy.

Mobile apps can serve a variety of useful purposes such as: attracting new talent and improving productivity and cashflow across the organization for different industries and scenarios.

Here are some good use cases for mobile apps: 

Field Service Management: Mobile apps can enable field technicians and delivery drivers to receive job assignments, update work status, access manuals or technical documents, and communicate with the back office in real-time.

Logistics and Supply Chain: Mobile apps can track shipments, manage inventory, provide route optimization for delivery drivers, and enable real-time updates for customers regarding their orders.

Manufacturing and Warehouse Management: Mobile apps can streamline inventory management, track production schedules, perform quality inspections, and manage equipment maintenance.

Sales Enablement:
Sales teams can use mobile apps to access customer information, update CRM systems, generate quotes or proposals, and even process orders directly from the field.

Retail and eCommerce:
Mobile apps can enhance the shopping experience by allowing customers to browse products, make purchases, track orders, receive personalized offers, and provide feedback.

Real Estate and Property Management:
Real estate agents and property managers can use mobile apps for property listings, scheduling viewings, virtual tours, client communication, service requests, payments and document signing.

Financial Services:
Banking apps allow customers to check account balances, transfer funds, pay bills, and manage investments securely from their mobile devices.

These are just a few examples, but the versatility of mobile apps makes them valuable tools across every industry for improving efficiency, enhancing customer experience, and enabling better communication and collaboration.

Reach out today to discuss your needs and learn how your business can mobilize, modernize and maximize your existing systems without ripping and replacing your existing apps.

Ask about the Affordable Mobile App service which allows your team to visualize what a new app would look like in your environment and calculate the real business value and ROI before you commit to a mobile app project. 

Web Site: https://www.mobigogo.net
Email: info@mobigogo.net


Sunday, July 21, 2024

Use Jasper Reports to Create Business Reports and Queries

If you're an IBM I or Java platform developer who was using DB2 Web Query or just looking for a nice report and form creation tool to create reports for your IBM i, you should consider learning Jasper Reports.  Check out the IBMi Jasper - https://github.com/richardschoen/ibmijasper project for using Jasper Reports from your IBM i system. 

Please don't hesitate to contact us regarding assistance with learning and creating reports and forms using Jasper Reports. We can also arrange training sessions on report design if you're interested in mastering Jasper Reports. Reach out to info@mobigogo.net for more information.

 



Thursday, July 18, 2024

Upgrade Windows 11 21H2 to 23H2

 If you are a Windows 11 user and started with it early on you may not know that the initial version of Windows 11 - 21H2 is almost out of support. 

When you want to upgrade to latest Windows 11 build, you're faced with the choice to upgrade to Windows 11 23H2 or newer by upgrading or reinstalling Windows 11.

Check the following video link for steps on how to download the latest Windows 11 23H2 ISO and upgrade your Windows 11 verion in place, even if your hardware is not supported. 

How to Upgrade to Windows 11 23H2 from 21H2 or 22H2 on Unsupported Hardware
https://youtu.be/U8dPFaPprSY?si=udGDw_831lqenq4m

Essentially the steps are as follows
The video basically has you edit this file with notepad:
C:\Users\richard\Desktop\WIndows11-23h2\sources\appraiserres.dll

Select All text, delete contents and save file. It should be 0 bytes now. 

The hardware check will get skipped next time you run install.

**NOTE: Make sure not to allow automatic downloads. Change to "Not right now".
Downloads updates AFTER the install or upgrade and it should work fine.


Sunday, June 23, 2024

Backup and Restore PostgreSQL Databases from Command Line

 If you are using PostgreSQL on Windows, Linux, MacOS or IBM i, it's not super obvious how to back up your database on a regular basis. 

The following how-to article I created on GitHub will help you to back up and restore your PostgreSQL databases if PostgreSQL is a part of your database environment. 

Click the following link to view the article. Enjoy and let me know if you have any PostgreSQL questions.

Backup and Restore PostgreSQL Databases from Command Line


Wednesday, June 19, 2024

Running JasperReports from IBM i

For any of you looking to do reporting from IBM i. I created a wrapper around Pete Helgrens RPG Report Generator Java code that can execute Jasper Reports from IBM i. 

I have done work with Jasper Reports since 2007. JasperReports has a bit of a learning curve but well worth it if you learn to build reports and documents with it. 

This wrapper is IBM i specific, but Jasper can be used anywhere to generate reports. Have fun.
https://github.com/richardschoen/ibmijasper

Tuesday, May 21, 2024

Configure NGINX with specific user without user needing *ALLOBJ Authority

User was seeing the following error in their NGINX log file when trying to start or restart the NGINX server via:

Errors showed up in the log file in file: /QOpenSys/var/log/nginx/error.log

Accessing error.log from 5250 command line:
WRKLNK '/QOpenSys/var/log/nginx/error.log'

2024/05/21 13:00:46 [notice] 3215038#1: signal process started                 
2024/05/21 13:00:46 [alert] 3214934#1: recvmsg() failed (13: Permission denied)
2024/05/21 13:00:46 [alert] 3215039#1: recvmsg() failed (13: Permission denied)
2024/05/21 13:00:46 [alert] 3215041#1: recvmsg() failed (13: Permission denied)
2024/05/21 13:00:46 [alert] 3215042#1: recvmsg() failed (13: Permission denied)

This seems to be related to setting up an appropriate user profile to run the NGINX server and threads under.

By default the main thread user will be the user who started the NGINX server. And worker thread jobs run under user profile: QTMHHTTP by default.

What we want is for the main thread and worker threads to run under the same user profile. See the following GitHub article for a resolution: https://github.com/richardschoen/howtostuff/blob/master/nginx-ibmi-without-allobject-auth.md


Saturday, February 03, 2024

Update IBM i System Time with Python

I just completed a nice example of integrating IBM i system commands with Python when you have a need to update your system time. The IBM i has a built in time sync, but in my case some of the firewalling services I used get in the way so I needed a way to update on demand via an NTP time server. And Python didn't disappoint. 

Check out this link for the Python code example:    
https://github.com/richardschoen/PythonSamples/blob/master/ibmi/ibmintptimeupdate.py

Friday, November 24, 2023

Resolving ODBC and SSL Issues with IBM i

 If you are an IBM i / AS400 developer and use ODBC, you've possibly had a need to connect to the IBM i using ODBC with SSL. 

Well this last week I tried using SSL for the first time on Linux, Windows and MacOS.  Each of them had their unique connectivity challenges. 

Check out the following links for info on how to possibly resolve your SSL issues: 

How to set up IBM i Access ODBC Driver for MacOS to use an SSL Certificate

How to set up IBM i Access ODBC Driver for Windows to use an SSL Certificate

How to set up IBM i Access ODBC Driver for Linux to use an SSL Certificate