• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Generating a Unique Identifier

    July 26, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I just read your article, “Using Timestamps as Unique Keys,” in the July 17 issue of Midrange Guru, OS/400 Edition.

    There might be a better way of creating a unique ID, one that doesn’t require retries. It’s the GENUUID API and/or MI built-in.

    Universal Unique Identifier (UUID) is supposed be a totally unique ID, even across all the machines in the entire world. I’m assuming that in reality this is 100 percent true, but I wouldn’t worry about it.

    Here’s some code that I’ve had stashed away:

    H option(*NoSrcStmt) DftActGrp(*No)                       
                                                                   
    D UUIDTemplate    ds                                          
    D   BytesProv                   10u 
    …

    Read more
  • Restore a Single IFS Directory

    July 26, 2002 Timothy Prickett Morgan

    Hey, Joe:

    I backed up my entire Integrated File System (IFS) using option 21 (Entire System) from the GO SAVE menu. Now I want to restore just one IFS directory called /test1, not the entire IFS.

    How do I do it?

    — Alex

    The answer here is to use OS/400’s Restore (RST) command. This is a fairly easy command to run, but there are one or two quirks to watch out for as you do it. Here’s my drill for restoring a single directory to the IFS.

    First, put the tape (or tapes) from the full system backup containing the

    …

    Read more
  • Sending Escape Messages from RPG

    July 26, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I know how to use the Send Program Message (SNDPGMMSG) command to send an escape message from a CL program to its caller.

    How do I send an escape message from an RPG program?

    — Len

    Use the Send Program Message API, QMHSNDPM.

    Here’s an example:

    D SendEscMsg      pr                  extpgm('QMHSNDPM')
    D   MsgID                        7    const             
    D   MsgFile                     20    const             
    D   MsgDta                      80    const             
    D   MsgDtaLen                   10i 0 const             
    D   MsgType                     10    const             
    D   MsgQ                        10    const             
    D   MsgQNbr                     10i 0 const             
    D   MsgKey                       4                      
    D   ErrorDS                     16                      
                                                            
    D ErrorDS         ds            16                      
    D   BytesProv                   10i 0 inz(16)           
    D   BytesAvail                  10i 
    …

    Read more

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle