SRCPARSER packaged code
The full code is distributed in just two files. SRCPARSER.MBR is CL code that creates all the required source physical files in the the DBG400 library then unpacks ALLSRCMBRS.MBR into their individual source members. As a number of my utilities use the same two file installation system, these instructions are fairly generic. Just compile and run the appropriate MAKExxx CL program to build the packages. The page for each tool will tell you the specific name of the MAKExxx program. To install DBG/400, or any of the other SRCPARSER packaged utilities, do the following:
Here in your browser
- Download the relevant code in a *nix format tarball or a Windows zipfile.
On your AS/400 / iSeries / System i
Do this if it's a first time install of DBG/400 or other utility. Reinstallation or additional utilities can reuse the same library & file created here.
- Create a library called DBG400.
- Create an 112 length source physical file in DBG400 called DBGSRCFILE
CRTSRCPF FILE(DBG400/DBGSRCFILE) RCDLEN(112)
On your PC
- Unpack the archive you downloaded. Note to Windows users - I recommend using WinZip (cheap) or 7-Zip (free) which, like the tools in GNU/Linux, can handle both .tar.gz and .zip files fine. In GNU/Linux, tar zxvf DBG400.tar.gz (or other package) should do the job.
- Open a terminal session or MS-DOS box and cd into the dbg400 directory just created
- Start an ftp session to your AS/400
- Login as a profile that has full authority to your newly created library & source file.
- Set the naming convention to '1' IFS format
quote site namefmt 1
- Change remote directory to the DBGSRCFILE file
- Upload the parser code
- Upload the file with the joined member sources
- Logout of ftp
Back to your AS/400 / iSeries / System i
- Add DBG400 to your library list, at the top, but after QTEMP
ADDLIBLE LIB(DBG400) POSITION(*AFTER QTEMP)
- Use PDM to get to DBG400, then take option 12 against DBGSRCFILE
- Have a look at member SRCPARSER and satisfy yourself it isn't going to doing anything nasty
- Change the source type of SRCPARSER to CLP - PDM option
- Compile it
CRTCLPGM PGM(DBG400/SRCPARSER) SRCFILE(DBG400/DBGSRCFILE) or PDM option
- Call (or submit a call) to SRCPARSER
- Back to DBG400 library and refresh to see the new source files, work with QCLSRC, and look through member MAKExxx until you're happy
- If you want to compile everything into the DBG400 library, then go to the next step, otherwise edit member MAKExxx and change the value of &LIBRARY to whatever library (which must exist) you require. If you're doing this, watch out for name conflicts. Almost all objects start with DBG, apart from the commands, and the tools used to build the package. See the member list for details.
- Compile then run MAKExxx.
CALL PGM(MAKExxx) This will then submit itself to batch for the create process.
- Wait a while.
- When complete, type DBG and have fun
- DBG400 should be in your library list to run the tools, but at the bottom will do fine. If you've merged it with an existing library, then that's fine.
There purposely isn't any fancy error trapping in the installation routine. If SRCPARSER doesn't compile, or compiles but doesn't run without errors, check the job log. If MAKExxx doesn't compile or run, ditto. MAKExxx clears out all about-to-be-created
objects from the object library (DBG400 by default) prior to any creates, so it should be okay to restart once any problems have been rectified.
XML packaged code
1. Upload entire XML to your AS/400 to a source file 112 long, into any mbr name not in this XML (suggest member name like ABCX or XYZX). The source file must be in the library where source and objects are to be installed.
2. If you have XMLPREVIEW
installed, skip to step 3.
Copy the text between the start tag and the end tag
into any member name (your choice) in file QRPGLESRC member type RPGLE. CRTBNDRPG to compile. NOTE: You need extract the install program only once, this same program will install any upload on this page.
3. Call the install program (or execute XMLPreview) passing these 3 parms.
- 'your-member-name you uploaded this text into'
- 'your-source-file-name the member is in'
- 'your-library-name the source file is in'
The various source members will be extracted and the objects required for the application will be created in your-library-name.