9/16/09 How to obtain further message logging for interactive or submitted jobs

To change the message logging level, and thus gather more logging information on any job, you need to access and change the job parameters per one of the following:

- To change your own interactive job, enter the CHGJOB command, then press F4.

- To change another interactive job: Locate the job using WRKACTJOB SBS(subsystem), use OPTION 2 next to the job, press F4.

- To change a submitted job: Put the JOBQ on HLD status temporarily (WRKJOBQ jobqname, OPTION 3 to HOLD), submit the job, use WRKJOBQ OPTION 5 to “Work With JOBQ,” and use OPTION 2, press F4.

*CAUTION* Holding the JOBQ will hold all jobs being submitted into that JOBQ for the duration that the JOBQ is actually on hold. Once the message level is changed, it is critical to release the JOBQ.)

Once the interactive or batch job is identified, and the OPTION 2 “Change,” menu has been entered, do the following:

1) Press F10 for further detail.

2) Modify the parameters as follows: Message Logging: Level 4, Severity 00, Text *SECLVL, Log CL Program Commands *YES, press enter.

3) Release the JOBQ. (WRKJOBQ jobqname, OPTION 6 “Release”

*Note* The message level will only remain for the job it was changed for, and would need to be repeated anytime it is needed unless further measures are taken to change the Job Description, in which doing so affects all jobs that utilize that Job Description.


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

8/27/09 How to find the primary key of a file created using DDS (rather than SQL)

Primary keys are called Unique keys in iSeries DDS. The Unique key can be held to two places, on the physical file itself or on a logical file based over that physical file.

To check the physical file, on a command line use the Display File Description command over the physical file; e.g. DSPFD library/file. Page down the displayed information looking for "Access Path Description." If the Access Path is shown as "Arrival" then the physical file is non-keyed and the records are stored by Relative Record Number (row number) sequence. If the Access Path is keyed then the file is keyed, but the key will only be a primary key if the "Unique key values required’ value is showing "Yes." The key fields themselves will be listed on the lines just below this entry.

To check whether there is a logical file with a Unique key use this two step process: First, find the names of all the logical files based over the physical file by using the Display Data Base Relations command, eg DSPDBR library/file. Second use the Display File Description command (DSPFD) for each logical file, as described above, checking the Access Path information as previously described.

Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

8/09/09 Using RUNRMTCMD to tell other systems to perform tasks and run scripts

You can have Linux, UNIX and Windows servers do tasks and runs scripts right from an i5/OS command line or a CL program. If you use CL, your program will even wait until the other sever completes its task before moving to the next instruction.

Use the RUNRMTCMD command and enter the foreign system command in the COMMAND parameter, the IP address or host name in the REMOTE LOCATION parameter, and indicate *IP for Type. Of course, you’ll also need a user name and password for the remote server.

The RUNRMTCMD will end and the next CL statement will execute when the command completes on the target system. If you want things to happen "asynchronously," use the COMMAND parameter to run a script on the foreign system that submits another job or spawns off another process. Just remember, whatever process you invoke on the target system has to finish before control returns to your CL. If the target system gets stuck, so does your program.

Using this command can also be a handy way to automatically perform functions when switching servers using the your high availability automation; you can trigger scripts that automatically change DNS, clear DNS cache, alter software configurations, and more.


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

7/17/09 How to find journaled files that are regularly cleared

If you are using a logical replication or high availability solution and you have certain files that are cleared on a regular basis, the following command can be used to identify those objects. If the file is cleared then it may be a file that does not need to be replicated, which will save you bandwidth in the replication process.

DSPJRN JRN(library/journal) RCVRNG(*CURCHAIN) ENTTYP(CR)


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

6/30/09 There's a backup version of the controlling subsystem (QCTL)

If you’ve changed attributes of the QCTL subsystem and lost track of what the defaults should be, or worse yet you’ve changed the controlling subsystem in some way that the system refuses to IPL properly, there’s a little known “backup” version of the controlling subsystem called QSYSSBSD. It’s specially protected so that it cannot be changed, only displayed. It’s always there, in the QSYS library, waiting for you “just in case”.

Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

6/19/09 How To Generate a Disk Analysis Report

Another way to see what is taking up your disk space is to view the i5/OS disk analysis report. To build the Disk Analysis file, use the following command:

SBMJOB CMD(RTVDSKINF) JOB(RTVDSKINF) JOBQ(QSYSNOMAX)

You can monitor the job by issuing the following:

WRKACTJOB SBS(QSYSWRK)
Job name = RTVDSKINF

Once the job finishes running, create the print report:
SBMJOB CMD(PRTDSKINF RPTTYPE(*LIB)) JOB(PRTDSKINF) JOBQ(QSYSNOMAX)


Other ways of seeing what is using disk space can be found on these two posts:
http://visionsolutionsinc.blogspot.com/2008/04/easy-way-to-figure-out-what-is-eating.html
http://visionsolutionsinc.blogspot.com/2009/03/031609-two-ways-to-see-what-is-using.html


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.



6/08/09 Create a Virtual Printer

Use the following steps to create a virtual printer that will print directly from an output queue to a network deskjet or laser printer.

  1. Start System i Navigator on your PC (If you do not have System i Navigator on your PC then it is possible to complete this task using CRTDEVPRT from a 5250 session)
  2. Select Basic operations, Printers.
  3. Right click and select Add Printer.
  4. Use the wizard and accept defaults, enter the IP address of the printer, enter your own name for the printer (not OfficeJet…).
  5. When wizard complete no need to print a test page as this will not print correctly anyway.
  6. Go on to a 5250 session and enter GO PRINTER
  7. Take Option 4 on the PRINTER menu
  8. Take Option 8 against the Printer Description created in step 4. For more information about this on the internet, go to the IBM information center using this link http://publib.boulder.ibm.com/iseries/. Search for the command “CHGDEVPRT” and you will find a list of printer manufacturers and models, lookup the Manufacturer and Model of your printer in the list of information and make a note of the value for MFRTYPMDL (e.g. *HP520 is the HP Deskjet 520.
  9. Return to the 5250 session and take Option 2, scroll down and change the setting for MFRTYPMDL to the value appropriate to your printer (e.g. *HP520).

    You can now print directly to the Printer Description. You may need to first start the writer (GO PRINTER option 2 and option 1 against the appropriate printer).

Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.