Journaling & Gratitude

How to Journal in AS400: Simple Methods for Your Notes

Updated · By the Relaxmid editors

Reading time
5 min
Sections
9
Topic
Journaling & Gratitude

You can journal on an AS/400 (IBM i) system using a text editor like Run Command (RUNCMD) or the built-in PDM editor. This method is free, takes about five minutes to set up, and requires basic keyboard skills. You will create a plain text file in your home directory to store your entries.

Preparation Checklist

Before you begin, ensure you have the following ready to avoid interruptions:

  • A terminal emulator installed on your computer (such as Reflection, NetScape, or IBM i Access Client Solutions).
  • Your user ID and password with authority to create files in your home library (typically QSYS.LIB).
  • A quiet space where you can type without interruption for at least ten minutes.

The Fast Way: Using Notepad and FTP

This method is best if you want to write freely with full formatting options and then transfer your notes to the AS/400 later. It separates the writing process from the system interface.

  1. Open a standard text editor like Notepad on your local computer. Do not use Word processors that add hidden code; plain text is required for compatibility.
  2. Type your journal entry. Keep paragraphs short, about three to five sentences each, to make reading easier on smaller screens.
  3. Save the file with a .txt extension, such as “journal_entry_1.txt”. Note the folder location where you saved it.
  4. Open your FTP client or the command line tool within your terminal emulator.
  5. Navigate to your home directory on the AS/400 by typing cd /home/your_userid.
  6. Transfer the file by typing put journal_entry_1.txt. Wait for the confirmation message that the upload is complete.

The Thorough Way: Direct Editing on the System

Use this method when you are already working in the AS/400 environment or need to access your journal from any terminal connected to the system. It keeps your data secure within the system boundaries.

  1. Log into your AS/400 session and open a command line window.
  2. Type WRKLNK OBJ('/home/your_userid/journal.txt') to check if a file already exists. If it does, you can edit it. If not, proceed to the next step.
  3. To create a new file, type CRTPF FILE(QGPL/JOURNAL) RCDLEN(132). This creates a physical file with a record length of 132 characters, which is standard for most terminals.
  4. Open the file for editing by typing EDTF STMF('/home/your_userid/journal.txt'). This launches the default text editor.
  5. Start typing your entry. Use the Enter key to move to a new line. Avoid pressing special function keys unless you know their specific action in your version.
  6. When finished, press F3 to exit the editor. The system will ask if you want to save changes; press F5 to confirm.

Common Mistakes and How They Cause Problems

Even simple tasks can go wrong if certain settings are ignored. Here are four specific errors and their consequences.

Using Rich Text Formats

Mistake: Saving a document as a .docx or .rtf file directly on the system.
Cause: The AS/400 text editors cannot read hidden formatting codes. The file will appear as gibberish or refuse to open entirely.

Ignoring Record Length

Mistake: Creating a file with a record length shorter than your paragraph size.
Cause: Lines longer than the limit will be cut off automatically. You may lose the end of your thoughts without realizing it until you try to read the file later.

Forgetting to Save

Mistake: Closing the terminal session before pressing the save function key (usually F5 or F10 depending on the editor).
Cause: All text entered since the last save is lost. The system does not auto-save in real-time for security reasons.

Using Special Characters

Mistake: Copying and pasting text with smart quotes or em-dashes from a modern word processor.
Cause: These characters often do not map correctly to the ASCII character set used by older systems. They may appear as blank spaces or strange symbols.

Organizing Your Entries

As your journal grows, finding specific entries becomes harder. Use a simple naming convention to keep things orderly.

Name your files using the date format YYYYMMDD followed by a brief topic. For example, 20231027_reflection.txt. This sorts files chronologically by default when you list the directory. Create a separate folder in your home directory named /home/your_userid/journals/ to keep these files away from work-related documents.

Reviewing Your Past Entries

To read what you wrote previously, return to the command line and use the display command. Type DSPFSTF STMF('/home/your_userid/journals/20231027_reflection.txt'). This opens the file in a read-only view, allowing you to scroll through your thoughts without risking accidental edits.

Backing Up Your Thoughts

If you worry about losing your journal due to system maintenance, download the files to your local computer periodically. Use the same FTP method described earlier, but reverse the direction: get journal.txt C:\LocalBackups\. Store these backups in a password-protected folder on your hard drive.

Searching Within Files

If you remember writing about a specific topic but forgot the date, use the search command. Type STRQSH to start a shell, then type grep -i "topic" /home/your_userid/journals/*.txt. This lists all files containing that word. Note that this command may vary slightly depending on your system’s shell configuration.

When to Use Each Method

Choose the fast way (Notepad + FTP) when you prefer a comfortable writing experience with spell-check and easy formatting. This is ideal for long, reflective essays or creative writing. Choose the thorough way (Direct Editing) when you are already logged into the system for other tasks, or when you need immediate access from multiple terminals. It is also better for quick, daily logs that require minimal setup time.

Security Considerations

Your journal contains personal thoughts. Ensure your user password is strong and unique. Do not share your login credentials. If you are working on a shared terminal, always log out completely after finishing your session to prevent others from seeing your screen.

Handling Long Entries

If your journal entry exceeds 132 characters per line, the direct editor will wrap the text. While readable, this can make copying and pasting difficult. In this case, write the content locally and use the FTP method. This preserves the exact line breaks and structure you intended.

Restoring Deleted Files

If you accidentally delete a journal file, do not panic. Check the system’s recycle bin equivalent, often accessible via the Work with Objects (WRKOBJ) command. Look for objects with a name starting with QDFSRST or similar recovery prefixes. You can restore them by selecting the option to recover the object to its original path.

Summary of Best Practices

Stick to plain text formats. Use clear, date-based filenames. Back up your files regularly to a local device. Always save your work before closing the session. Keep your passwords secure. By following these steps, you maintain a private, accessible, and organized digital journal on your AS/400 system.

Related

General information for everyday wellbeing, not medical advice. If something affects your health, sleep or mood for more than a short while, talk to a qualified professional. Read more

Spotted an error? Tell us and we will correct it (corrections policy).