• 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

  • IBM Tweaks Some Power Systems Prices Down, Others Up
  • Disaster Recovery: From OS/400 V5R3 To IBM i 7.4 In 36 Hours
  • The Disconnect In Modernization Planning And Execution
  • Superior Support: One Of The Reasons You Pay The Power Systems Premium
  • IBM i PTF Guide, Volume 25, Number 13
  • IBM i Has a Future ‘If Kept Up To Date,’ IDC Says
  • When You Need Us, We Are Ready To Do Grunt Work
  • Generative AI: Coming to an ERP Near You
  • Four Hundred Monitor, March 22
  • IBM i PTF Guide, Volume 25, Number 12

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 © 2023 IT Jungle