• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Odds and Ends

    September 18, 2002 Timothy Prickett Morgan

    Dear Readers:

    Here are more miscellaneous short tips. I hope you enjoy them.

    — Ted

    Question:

    Our shop has a junior programmer who, by not using our change management system, messed up an RPG Source member, . He then tried to correct his own mistake, and he only proceeded to make things worse.

    Can I restore a specified member from tape from the QRPGSRC file?  I know how to restore the whole library, but I really only need one member from the QRPGSRC File.

    Answer:

    The Restore Object (RSTOBJ) command can restore a single file member. Here is an example.

    …

    Read more
  • Is It a Different ‘Hello World’ in OS/400 V5R1?

    September 18, 2002 Timothy Prickett Morgan

    Hey, Joe:

    I just loaded the Java Development Kit (JDK) v1.3 on one of our new V5R1 iSeries boxes, and I can’t get the ‘Hello World’ sample to work. It works on our V4R5 AS/400 when I type in the following Run Java (RUNJVA) command:

    RUNJVA CLASS(com.ibm.as400.system.Hello) PROP((java.version '1.3'))
             
    

    But when I type this command on my V5R1 box, I get an error. What’s happening?

    — Mike

    I went to one of my OS/400 V5R1 boxes and typed in the RUNJVA Class command, just as you sent me. It failed, but–again, just as you wrote–it worked on one of my

    …

    Read more
  • Reader Feedback and Insights: Binder Language

    September 13, 2002 Timothy Prickett Morgan

    Hey, Ted:

    Great article, Ted! It was a very clever presentation, and I enjoyed reading it. I do have one comment and one question, though. I don’t always create binder source when I first create a service program. When I’ve later added another procedure, I create the service source with a *CURRENT signature and a *PRV signature that defines the original situation and that seems to prevent any problems with needing recompiles.

    Here’s my question: Someone once told me that when I created new procedures, or at least when I create the binder source, that new procedures must be

    …

    Read more
  • Put Users On the Fast Track

    September 13, 2002 Timothy Prickett Morgan

    Hey, Ted:

    We are a very user-oriented shop, that is, users do virtually everything on their own. Since the days when we ran a System/34, users have been menu oriented, but they also understood the command line.

    In the S/34 and S/36 days, users ran OCL procedures. Unlike CL programs, which are initiated with the CALL command, OCL procedures are run by simply typing the procedures’ names. Users learned the names of frequently used procedures and became accustomed to running procedures from the command line rather than from menus.

    When the AS/400 came along, users wanted to continue to use

    …

    Read more
  • Properly Sorting Numeric Arrays

    September 13, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In a program, data could be stored in arrays related to each other. Arrays could be filled from different files, but they could have the same index.

    To sort the arrays, we would have to combine the arrays into one alphanumeric array and sort it. However, if the sort field is numeric, and there are negative numbers in the sort field, this is not going to work.

    I have a technique that allows proper sorting of numeric values in cases like this one. Would you like to publish it in Midrange Guru?

    — A Devoted Reader

    I

    …

    Read more
  • Reader Feedback and Insights: Security Flaws

    September 11, 2002 Timothy Prickett Morgan

    Hey, Ted:

    The Validating a User Password sample program in the August 21 issue of Midrange Guru, OS/400 Edition, has some basic security flaws. As you said, the Check Password (CHKPWD) command can produce any of three messages (CPF2362, CPF2363, and CPF2364). The problem is that the program only monitors for one of those messages. The program works correctly for the CPF2362 message but it fails for the other two. When it gets either of these two error messages (because the user has intentionally given a bad password several times in a row) the program will function check

    …

    Read more
  • Excuse Me…Can You Hold this Secondary Partition While I Upgrade the Primary?

    September 11, 2002 Timothy Prickett Morgan

    Hey, Joe:

    I have an iSeries box with two logical partitions (LPARs) running OS/400 V4R5. Our shop needs to upgrade the primary partition to OS/400 V5R1, and we want to put the secondary partition on hold while the upgrade is occurring (we don’t want the secondary to IPL every time we have to IPL the primary). How do I shut down the secondary partition and keep it down while I’m doing the upgrade?

    — Ralph

    This is a common situation with OS/400 partitions, and many people have configured OS/400 partitions exactly the way you describe in your setup. When you

    …

    Read more
  • Adding Subprocedures to a Service Program, Revisited

    September 11, 2002 Timothy Prickett Morgan

    Hey, Ted:

    Regarding your article, “Adding Subprocedures to a Service Program,” there’s a question I’ve always wondered about.

    Why is the *CURRENT/*PRV way of handling new exports, such as this example:

    STRPGMEXP PGMLVL(*CURRENT)
    EXPORT SYMBOL('ONEMORETHAN')
    EXPORT SYMBOL('TWICE')
    EXPORT SYMBOL('ONETHIRDOF')
    ENDPGMEXP
    STRPGMEXP PGMLVL(*PRV)
    EXPORT SYMBOL('ONEMORETHAN')
    EXPORT SYMBOL('TWICE')
    ENDPGMEXP
    STRPGMEXP PGMLVL(*PRV)
    EXPORT SYMBOL('ONEMORETHAN')
    ENDPGMEXP
    

    so popular compared to the hard-coded signature method, where you only keep one export list, as shown in this example:

    STRPGMEXP PGMLVL(*CURRENT) SIGNATURE("MATH")
    EXPORT SYMBOL('ONEMORETHAN')
    EXPORT SYMBOL('TWICE')
    EXPORT SYMBOL('ONETHIRDOF')
    ENDPGMEXP
    

    You have to keep the exports in the same order and add news ones at the

    …

    Read more
  • Reader Feedback and Insights: Copying Records in RPG

    September 6, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I’m writing about the August 23 Midrange Guru Tech Tips regarding moving records between files with different field names. One option that I didn’t see, and the one I now prefer, with RPG IV is using the prefix keyword to rename the fields from one of the files.

    Here’s an example:

    Fpaywork   if   e           k disk
    Fpayhist   o    e             disk     prefix(pw : 2)
    
    C                   read      paywork
    C                   dow       not %eof(paywork)
    C                   write     histrec
    C                   read      paywork
    C                   enddo
    
    C                   eval      *inlr = *on
    

    — Scott

    Good idea, Scott. A few other readers suggested the same thing. That

    …

    Read more
  • Convert J.D. Edwards Dates to Other Formats

    September 6, 2002 Timothy Prickett Morgan

    Hey, Howard:

    I want to convert a J.D. Edwards date, (CYYDDD where C represents the century, YY represents the year, and DDD represents the day of the year) to a more readable format, (like YYYY-MM-DD). I can do this in Crystal Reports, but is there a way to do it in SQL?

    — Domenic

    This is a good one, Domenic, as I first thought it was impossible, but on further reading of the IBM documentation, I found a little known use for the DATE function. I found that DATE can take a variety of arguments. As I was reading the

    …

    Read more

Previous Articles Next Articles

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