5/28/08 How to find journal receivers taking the most disk space

Use the following command for an easy way to see the journal receivers that are taking up a lot of disk space on your system:

DSPOBJD *ALL/*ALL *JRNRCV

Example:


Display Object Description - Basic
Library 3 of 87
Library . . . . . . : AUDRCV Library ASP device . : *SYSBAS

Type options, press Enter.
5=Display full attributes 8=Display service attributes

Opt Object Type Size Text
_ AUDRCV1270 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1271 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1272 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1273 *JRNRCV 516202496 Qaudjrn receiver
_ AUDRCV1274 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1275 *JRNRCV 514105344 Qaudjrn receiver
_ AUDRCV1276 *JRNRCV 516202496 Qaudjrn receiver
_ AUDRCV1277 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1278 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1279 *JRNRCV 515153920 Qaudjrn receiver
_ AUDRCV1280 *JRNRCV 516202496 Qaudjrn receiver
_ AUDRCV1281 *JRNRCV 514105344 Qaudjrn receiver



The size of the receivers in the above example are .5 GB or larger. Press the Enter key to move from library to library, viewing the size of each receiver, look for receivers with a size of 10 positions which would indicate a receiver with the size of 1 GB or larger.


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 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners

5/21/08 Creating symbolic links on the IFS

Anybody familiar with UNIX or Linux operating systems is aware of the usefulness of symbolic links to folders and files. This basically involves creating a link to a file in another location from the original, allowing people to access or edit the original file from another location.

On the System i this can be done by prompting the ADDLNK command. Enter the full IFS path of the object you want to link to in the Object field and the full IFS path of the link you would like to create for it.


Use link type *SYMBOLIC if you need to link to an object on another file system or if you would like the link to remain regardless of whether the object you are linking to still exists, use link type *HARD if you would like to make sure links are only maintained whilst the object exists (if you choose to delete the object at a later date you would need to remove its *HARD links first).

**Editor's note: This post was updated on 07/21/08 to correct an inaccuracy pointed out in the comments posted by a reader.

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 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

5/13/08 How to stop page up/page down iterations

Ever held down the ‘Page Down’ or ‘Page Up’ keys down too long and the screen wouldn’t stop advancing? The easy way to stop it is to simply press the ‘Ctrl’ key.


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 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

5/5/08 Copy contents of spool file to a flat file

Step 1:
Create a flat file that has a record length of 132 (most spool files have a width of 132).

CRTPF FILE(FLATFILE) RCDLEN(132)

Step 2: Copy the spool file to the newly created flat file.

CPYSPLF FILE(QPDSPAJB) TOFILE(FLATFILE) JOB(*) SPLNBR(1)

Step 3: Copy the file to the IFS.

CPYTOSTMF FROMMBR('/qsys.lib/library.lib/flatfile.file/flatfile.mbr') TOSTMF('/somewhereintheifs/spoolfile.txt')



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 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

5/1/08 How to streamline the deletion of logical files when deleting a physical file

Deleting a physical file can be time consuming at times due to the number of logical files that might are associated with it that have no common prefix to the name of the LF (thus cannot be found with a wildcard search).

This short program can help:


PGM PARM(&SYS1OBJ &SYS1LIB)
DCL VAR(&SYS1OBJ) TYPE(*CHAR) LEN(10)
DCL VAR(&SYS1LIB) TYPE(*CHAR) LEN(10)
DCLF FILE(QADSPDBR)
OVRDBF FILE(QADSPDBR) TOFILE(QTEMP/DBRRMV)
DSPDBR FILE(&SYS1LIB/&SYS1OBJ) OUTPUT(*OUTFILE) +
OUTFILE(QTEMP/DBRRMV)
MONMSG MSGID(CPF3012) EXEC(GOTO CMDLBL(EOF))
READ: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(DLTF))
IF COND(&WHNO *EQ 0) THEN(GOTO CMDLBL(DLTF))
DLTF FILE(&WHRELI/&WHREFI)
MONMSG MSGID(CPF0001)
GOTO CMDLBL(READ)
DLTF: DLTF FILE(&SYS1LIB/&SYS1OBJ)
MONMSG MSGID(CPF0001)
EOF: ENDPGM



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 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.