Notes

Submitting a job as a different user

We are all familiar with the SBMJOB command, but it’s rare that anyone looks beyond the first few parameters. Until you need to. One overlooked parameter is USER which allows you to specify the name of the user profile for the job being submitted. Obviously, you need to have enough Read more…

By Paul, ago
Notes

Better impact analysis with DSPPGMREF

The IBM i Control Language (CL) provides such a rich set of commands that even after almost 30 years, I can still discover something really useful. DSPPGMREF is a case in point: The Display Program References (DSPPGMREF) command provides a list of the system objects referred to by the specified Read more…

By Paul, ago
Notes

Using CPYSPLF to extract spool files via the IFS

I am currently without iSeries Navigator (or IACS, for that matter). I have a 5250 emulator, of course, but nothing else, which makes for an interesting challenge when I want to email a spool file to someone. Fortunately, there’s CPYSPLF: The Copy Spooled File (CPYSPLF) command copies the data records Read more…

By Paul, ago
Notes

Adding variables to ad-hoc SQL queries with CL

Last month I mentioned using REXX to build and execute ad-hoc SQL queries. For the sake of completeness, here is the same solution implemented in CL using the RUNSQL command. The program does exactly the same as the previously describe REXX script — extracts all records flagged with today’s date Read more…

By Paul, ago
Notes

Using RGZPFM to sort physical files

It’s rare that you need to sort a database file (or table), but I have encountered a circumstance in which a sorted file had to be delivered. Being naturally lazy, I started looking around for the least-work method of achieving this and ended up looking at the RGZPFM command. This Read more…

By Paul, ago