• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Reader Feedback and Insights: Overlooking the Obvious

    November 8, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I have been following the SQL tips in Midrange Guru (“SQL to the Rescue!” and “SQL’s One-Row, One-Column Table“) that use a one-row, one-column table to execute SQL functions.

    There’s an easier way.

    Use the SET statement instead.

    The following code is equivalent to the first tip on this subject, which was published in the October 25 issue.

    d found           s              1
    d field1          s              5u 0 inz(5)
    d field2          s              5u 0 inz(15)
    d field3          s              5u 0 inz(30)
    
    C/EXEC SQL
    C+ set :found =
    C+  case when max(:field1, :field2, :field3) > 25
    
    …

    Read more
  • Odds and Ends

    November 8, 2002 Timothy Prickett Morgan

    Dear Readers:

    Here, by popular demand, are more “Odds and Ends.” I hope you find something here you like.

    — Ted

    Question:

    I’m trying to read a table by key in a CL program, and I am having trouble. I know there has to be a way to do this, but I keep getting either the first record in the table or an error message that states ‘key not found.’ Can you provide an example of a CL program that reads a file randomly by key?

    Answer:

    It sounds as if the Receive File (RCVF) command didn’t find a matching

    …

    Read more
  • Omitting Parameters in RPG Programs and Modules

    November 8, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I have a program that can receive four parameters. The first one is mandatory, and the last three are optional. If I call the program and pass parameters 1, 2, and 4 to it, the %parms built-in function tells me that three parameters were passed. How does the program know which three it is getting? Thanks!

    — Doug

    You can’t skip a parameter. If you pass three parameters, they are parameters 1, 2, and 3; number 4 will be undefined.

    The only way to skip parameter 3 is to specify OPTIONS(*OMIT) in its D spec. The value *OMIT

    …

    Read more

Content archive

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

Recent Posts

  • 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
  • Will The Turbulent Economy Downdraft IBM Systems Or Lift It?
  • How IBM Improved The Database With IBM i 7.6
  • Rocket Celebrates 35th Anniversary As Private Equity Owner Ponders Sale
  • 50 Acres And A Humanoid Robot With An AI Avatar
  • IBM i PTF Guide, Volume 27, Number 17

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