DBG/400 logo

/... Home / Extras Site map

DBG/400 - Additional Tools

bullet point

Additional Tools

There are quite a number of tools that I've written over the years, which may be of interest to others. The idea is to give a brief description of the tool, and if you want to see more, email me. If I get a request for a tool, I'll do my best to make it available here. Note that all tools are distributed and installed in the same fashion. Two source members are in each zip file you download from here - follow the instructions on the download page to extract, upload and install them on your AS/400. The only difference will be the name of the MAKExxx member you need to compile and run to build the tool.

Requirements. Most of these utilities were developed at V4R4, though some will probably install as far back as V3R2. As you have the source, you can backport as required. Also note that most of the utilities are dependant on my DBG/400 package for common runtime routines & files. For most tools, an existing installation of DBG/400 is mandatory, prior to installing the selected utility. There may be additional prerequisites, which will be listed in the instructions for each package. Note that the vast majority of help requests that I get are from people that haven't installed required packages first.

bullet point

Already uploaded

Progress meter. This standalone program graphically charts the progress of your program through a file, so your users have something to look at waiting for the system X to go away ;-) You get a message like this

File upload progress  45% ########################..........................

See more details on the DBG202R4 program, with some screenshots, on the progress page

CHKLVLCHK - Check for "level checks" a very useful pre-implementation check. A standalone package. See the details on this page

WRKUSROUTQ - a hybrid version of WRKSPLF & WRKOUTQ with some usefuls extras. Check it out on this page. Requires DBG/400 be installed.

MOVOUTQ - a tool for fine control when moving spoolfiles from one *OUTQ to another. Details on this page. Requires DBG/400 & WRKUSROUTQ be installed.

CRTCSVDTA - a flexible database to .csv generator. Screenshots, etc are here. Requires DBG/400 be installed.

EXCSQL - a command to run SQL statements relying on QM Queries rather than IBM's Interactive STRSQL. Check out the ExcSQL page for details & download. Standalone application.

The following don't have their own pages - either because they're only code samples, or because I haven't had the time :-)

PRGOUTQ - a simple purge old spoolfiles command. You specify an output queue and the number of days spoolfiles should be retained. You can optionally set a retention value for spoolfiles in HLD and in SAV status. Requires that DBG/400 and WRKUSROUTQ must already be installed. Download it from here (12Kb). MAKEPRGOUT is the build routine for this utility.

RTVJOBD - pull back all the attributes of a job description - used by quite a few of my utilities. No separate download - it's included in CHKLVLCHK

BLDLIBINFO - Build Library information. Running a DSPLIB to *PRINT is a handy way of getting the total size of a library but there isn't an *OUTFILE option. Decoding the spool file is one option, but that can change between releases. A better way is via the system API QLIRLIBD. I've used this to build my own *OUTFILE to get disk use stats over time. Just schedule program BLDLIBINFO to run in batch at the frequency you want (daily, weekly, etc) and work with the results in file LIBINFO.

How it works: BLDLIBINFO dumps a list of all libraries on the system to a user space (via the List Objects API, QUSLOBJ) and calls a small RPGIV wrapper (RTVLIBINF) to the QLIRLIBD API for each library. The summary info (Library, type, ASP, number of objects, total size etc,) is written to LIBINFO, along with the extract date. It's fairly straightforward to get growth stats from this information. I may add a report and/or screen frontend to the file to present this data in a more user friendly fashion if anyone's interested.

Download BLDLIBINFO (13Kb), which was mentioned and requested on comp.sys.as400.misc. As with the majority of my utilities the installation procedure is based on my DBG400 installer, so follow those instructions. The make routine (to compile the file & three programs) is MAKELIBINF. (See the EMS quick install guide below for the jist of it). Standalone application.

EMS - Electronic Message System. A single machine messaging system that's a bit more user friendly than SNDMSG/DSPMSG. Users can send, reply, copy & delete messages, and you can track through a conversation thread of replies to replies via command keys. Includes an API so that programs can send messages to users. A simple form of group lists is supported. I wrote this back in '94, before I had had much exposure to email & the Internet. It's no Lotus Notes, but it does its job well. Standalone application, probably installs as far back as V3R2.

This was requested following a reply I sent to MIDRANGE-L, so here it is: emscode.zip (38Kb). Follow the installation instructions for DBG/400 (see the download page), putting ALLSRCMBRS.MBR & SRCPARSER into DBG400/DBGSRCFILE. Compile and run SRCPARSER then compile & run MAKEEMS (found in QCLSRC). Mail me with your questions, until I get a chance to do some proper documentation. There is full on line help. Just run command EMS to get going.

This one doesn't qualify for its own page, as there's not much to it. It's a cut down version of a message break handling program. I had a request for it from someone on the MIDRANGE-L mailing list, so here it is. The basic function is to execute commands on behalf of a user when requested by helpdesk/support staff. It's handy when you want to see what's in their QTEMP library - you just send a command to copy objects to a permanent library you can look at. The version we use can emulate *BREAK, *HOLD & *NOTIFY message delivery, as well as add a *STATUS version (resends user messages as status messages). It also links into EMS (see above), but I've dropped that as well. This version just does *HOLD. The code is packaged like DBG/400, but I haven't included a MAKE routine for it as there are only a few members, and they're only a few lines each. If you want the full set of routines, let me know. Standalone application - installing to V4R2 or maybe earlier.

RUNPGMTRC/PRTPGMTRC - Tracks all executed statements when a program is run, and prints an indented listing of the source showing how many times each line has been run. Only works on Original Program Model (OPM) programs - RPG38 & RPG400. It will also work for CL38 & CL programs, but just a straight listing (no indentation). This one is packaged in Craig Rutledge's CMD.xml format which I hope to move all my code to as I get time. The installation process is explained at the top of the file, and if you have an XML-aware browser (ie. IE 5.x and up at present), you can view the file directly. Check out Craig's site http://www.alltel.net/~craigru/jcrcmd2.html for more details, and for accessory tools when working with this format. Download RunPgmTrc (19Kb). Standalone application, but the installer requires V4R4.

CHKEVALS - Check EVAL statements for potential MCH1210 errors (receiver too small to hold result). We hit these quite often when converting OPM RPG to RPGLE, and it helps to find them before the users do ;-) Prints out a source listing of just the EVAL lines where the result field size is potentially smaller than variables/values it is being set to. Download ChkEvals (17Kb). Standalone application, but the installer requires V4R4.

CHKTMPSTG - Check temporary storage used by active jobs on the system. It displays a list of jobs using storage over a preset threshold. This is just a single RPGLE source member, so there is no install procudure. Just ftp CHKTMPSTG to your AS/400 or iSeries, or cut'n'paste into your SEU session.

DASDMon - a background job that monitors system DASD, and temporary storage used by active jobs on the system. It automatically holds any job that uses over the set level of temporary storage. Warnings are given if the overall DASD % rises above a set level (separate to the standard 90% warning that OS/400 sends) and if the % rise over the user defined check period exceeds your chosen value. Packaged in xml format, installation is done by downloading the DASDMon zipfile, then ftping the unzipped dasdmon.xml file to a QRPGLESRC source file on your system, and follow the instruction at the top of the code. STRDASDMON (F4) to submit it and ENDDASDMON to terminate the background job.

GETMSGD - generates a CLP member with code to recreate all the messages in a message file. It's how I put the messages into the MAKEDBG, etc routines. Just four (or three if you already have DBG/400) source members, a CMD, CL and 2xRPG, make up GETMSGD.

ACTOUTQ - a variation on MOVOUTQ that lets you release, hold, save and delete spoolfiles on an output queue. As yet I haven't packed it but most of the code is already in the WRKUSROUTQ package. You just need four other source members from CVS. Once WRKUSROUTQ is installed, then download and install ACTOUTQ CMD, ACTOUTQ PNLGRP, DBG197CL CLP and DBG197R4 RPGLE

bullet point

Prospective/In the pipeline

Here is a list of the utilities (in no particular order) that I can think of at the moment - I'll be adding more as I remember them ;-)

  • CHKFLDOVL - Check field overlaps. Uses a compile listing to show which record format(s) each field appears on. Handy to see if data corruption might occur with the same field used in multiple formats.
  • SRCOPT - A raft of source member tools including
    • Comment highlighting
    • Indentation marking (B001, E001, etc in columns 1-5)
    • ENDxx completion
    • Indented printout (like the indent option for the compiler listing)
    • RPGLE case conversion (standardises case of opcodes, field names, etc in RPGIV code - see any RPGLE member in DBG/400 for an example)
    • Source member merged with debug trace data to give a more meaningful printout (OPM RPG only)
  • CVTLIBL - change the current library list to match that of a named job description.
  • Various tools to extract Synon/Cool 2E xref information and routines to feed that into our Hawkeye database - fairly specific but they might be of use to someone.
  • DSPDTAQD - display data queue description. Uses the Retrive Data Queue Description API to give a DSPFD type screen for a data queue. I think I've also got a RTVDTAQD command kicking around somewhere.
  • DLTJOBSPLF - delete job spooled files. Submits itself to batch to delete spool files for a nominated job
  • DLYCMD - delay command - sends a reply message to the user invoking it and doesn't continue until answered. There's a similar program that can be called from a routine you want to debug in batch. It sends a reply message to the submitter with a STRSRVJOB prefilled, ready to cut and paste on to a command line. Once you've started debug on the program, just answer the message. Saves messing about holding job queues etc.
  • IMPTXTOLD - import a PC text file into the On-line documentation system used in DBG/400 system
  • SNDDTAQ - send a data queue entry. Front end to the QSNDDTAQ API that does a bit more for you.
  • RMVDTAQENT - remove the first n entries from a data queue.
  • TALK/REPLY - data queue based interactive conversation utility. Handy for remote access users whose modem is already using their only phone line, and they need to "talk" to someone on site.
  • TIMEOUTJOB - run a command that will self terminate if it runs beyond a scheduled time
  • WRKCONJOB - Work with concurrent jobs. A companion routine regularly extracts job start & end details from QHST and this command lets you see what jobs were running simultaneously at any given date & time.
  • WRKUSRF - Work with user files. A simple screen to work with physical files in a library, designed with Query users in mind. Lets you view, clear, or remove files, and sort them in various sequences.
  • WRKUSRQRY - Front end to WRKQRY/RUNQRY with more sequencing options for selecting the query you want.

There are others that I can't remember. I'll keep adding to this list as I come across them, or develop new ones.