Showing posts with label pase. Show all posts
Showing posts with label pase. Show all posts

Tuesday, July 28, 2026

QSHONI SQL Query Commands Just Got an Upgrade

I use the QSHQRYTMP and QSHQRYSRC commands as part of my QShell on i tools a lot in my daily travels for running SQL statements and creating output files from the results. Recently I've had more of a need to run multiple commands and aggregate the results to an output file. And I didn't want to start getting overly fancy by writing UNION queries all the time, although they do have their place.

The easiest way to do this was implementing a parameter set that allows the QSHRYTMP and QSHQRYSRC commands to copy their temporary results to a second output file by optionally using the CPYF command. Of course you can do this yourself, but having a CPYF option built right in to QSHQRYTMP and QSHQRYSRC just adds more value when you have a need for multiple SQL queries to aggregate to a single table. 

Upgrade to V1.0.55 and give them a spin and let me know what you think.

https://github.com/richardschoen/QshOni 




Saturday, April 18, 2026

I Can't Find My IBM i Open Source Packages

If you're like I am you may have struggled a little when starting to use PASE and open source packages for your IBM i application development or operations. 

The open source packages are usually installed in a directory named: /QOpenSys/pkgs/bin

For example the first thing you may have run into when trying to call a git command from a QShell or PASE session might have been: git: command not found.

You development or operations leaders told you to use git, but it's not running for you. And you don't want to look dumb asking why the git command won't run. 

Well just like we have library lists for classic IBM i jobs, PASE jobs and command lines use a directory search path which is the PASE equivalent to the library list. 

If you run the following commands from a QShell, PASE or SSH terminal session you should be all set to start using open source command line apps because the commands create a profile file including a search path for QShell and other PASE apps if you happen to be using bash instead of QShell.

To run these PASE profile creation commands you should be able to run STRQSH from a 5250 command line. 


First make sure your user profile has a home directory. This same value must also be set in the user profile Home Directory setting if you do a WRKUSRPRF or DSPUSRPRF on your user profile.


mkdir /HOME/RICHARD.  


Note: If your home directory gets created or already exists you're in good shape either way.


Then type and run each of the following individual commands.


What they will do:


The rm command first deletes the profile file if it exists. 

Note: If you get an error that file does not exist, that should be OK just continue to the next command.  


The touch command creates an empty profile file with CCSID 819 which is ASCII. This will make sure that QShell write ASCII data to your profile files.


The echo command writes the desired open source search path and appends the existing search path to it using the $PATH directive.


Let's create the profiles now.


WARNING: If you already have bash or QShell profile files you may not want to run these commands as they overwrite those profile files. Or make backups of the files beforehand. If you want to just edit your existing profile files, you might need to edit the file with the EDTF command from 5250 or vim or nano from the PASE command line instead and simply add the path statement. 


Create a QShell profile 

rm ~/.profile 

touch -C 819 ~/.profile 

echo PATH=/QOpenSys/pkgs/bin:$PATH > ~/.profile


Create bash profiles

rm ~/.bashrc

touch -C 819 ~/.bashrc 

echo export PATH=/QOpenSys/pkgs/bin:$PATH > ~/.bashrc


rm ~/.bash_profile

touch -C 819 ~/.bash_profile 

echo export PATH=/QOpenSys/pkgs/bin:$PATH > ~/.bash_profile

 

After you've created these profile files, you should be able to access any of the IBM i open source packages from any of the command line shells, QShell, PASE (CALL QP2TERM) or bash command lines in an SSH terminal client.

 

Simply exit and restart your favorite PASE command line shell, type git (or whatever other command you were trying to access) and it should show work as expected.


If you happen to be using my QShell on i utilities to run PASE commands the path handling is done automatically when you run a command. Check them out at: https://github.com/richardschoen/QshOni 


Saturday, August 09, 2025

PASE (Portable Application Solutions Environment) and QShell on IBM i feels a lot like Linux

PASE (Portable Application Solutions Environment) and QShell on IBM i feels a lot like working in a Linux or UNIX environment, and there's a good reason for that.

Why PASE Feels Like Linux

PASE is essentially a runtime environment on IBM i that allows AIX (IBM’s UNIX) binaries to run. Since AIX is UNIX-compliant, and Linux shares much of the same philosophy and command-line behavior, working in PASE can indeed feel like working on Linux.

Here are some similarities and practical takeaways:


Similarities Between PASE and Linux

  • Shell commands like ls, cd, pwd, grep, cat, grep, etc., are available in both environments.

  • File system navigation behaves similarly (though the underlying file systems are quite different — IFS on IBM i vs ext4, xfs, etc. on Linux).

  • Environment variables like $PATH, $HOME, and others are used in both.

  • Scripting with shells like sh, ksh, or even bash (if installed) can be practiced in both systems.

  • SSH access allows terminal-based work just like in a Linux shell.

  • Tools like vi, awk, sed, ps, kill,nano , and cron are either identical or very close in functionality.


What’s Different

  • QShell vs PASE:

    • QShell is a POSIX-like shell on IBM i, but it's not a full UNIX shell. It lacks some scripting features and behaves differently in areas like redirection and process handling.

    • PASE is closer to real UNIX/Linux, especially when running native AIX binaries.

  • File paths:

    • IBM i uses the IFS (Integrated File System) which is different from the hierarchical Linux file system. /home/user might work, but behind the scenes, you're still dealing with IBM i objects and structure.

  • Access to native IBM i resources:

    • Native IBM i commands (like WRKACTJOB, DSPLIB, etc.) aren't directly usable in PASE without special handling via the system command.


Why Working on One Helps with the Other

  • Linux gives you muscle memory for shell navigation, scripting, and using standard UNIX tools.

  • PASE gives you exposure to working in a hybrid environment, where UNIX concepts meet IBM i's robustness and control.

So yes — if you're an IBM i developer looking to sharpen your skills, getting comfortable with Linux can directly enhance your productivity in PASE and QShell, and vice-versa.