• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Calling SQL Functions From RPG, A Service Program

    November 15, 2016 Paul Tuohy

    Note: The code accompanying this article is available for download here.

    In this article I would like to introduce a service program that provides RPG subprocedure “wrappers” for using SQL scalar functions. This means you can use an SQL scalar function as if it were an RPG built-in function.

    Using an SQL scalar function can be a lot easier than using the RPG alternative:

    • Use the UPPER function instead of defining two translation strings and using %XLATE.
    • Use DAYNAME function instead of calculating the day of the week and using an array to provide the day name.
    • Using the
    …

    Read more
  • SQL PL–The LOOP Loop

    November 15, 2016 Ted Holt

    In the previous episode of this exciting series, I wrote about FOR, arguably the most useful of the SQL PL looping structures. Next in line of usefulness, in my opinion, is the LOOP structure. Like the rest of SQL PL, this is an easy structure to master, and I am pleased to write about it.

    In its simplest form, the syntax of the LOOP structure is as follows:

    LOOP - body - END LOOP
    

    Here is a more realistic version of the syntax:

    label: LOOP - body - END LOOP label
    

    The body contains any assortment of simple statements

    …

    Read more
  • QTEMP Is A Different Animal

    November 15, 2016 Hey, Ted

    I have a problem with an FTP script. I wish to send a file in QTEMP to a remote system, but the script tries to send the file from QGPL instead. The PUT command does not tell which library to send the file from because our standards prohibit the use of hard-coded library names. Any thoughts will be appreciated.

    –Al

    I commend you and other wise people in your shop for outlawing the hard-coding of library names, Al. The library list is a wonderful feature of IBM i, a feature that is sorely missing from other database systems. I have

    …

    Read more

Content archive

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

Recent Posts

  • Unattended IBM i Operations Continue Upward Climb
  • VS Code Is The Full Stack IDE For IBM i
  • Domino Runs on IBM i 7.5, But HCL Still Working on Power10
  • Four Hundred Monitor, March 6
  • IBM i PTF Guide, Volume 25, Number 11
  • You Ought To Be Committed
  • Thoroughly Modern: What You Need to Know About IBM i Security
  • Spring Brings Events To IBM i Community, And More
  • As I See It: AI-AI-O
  • IBM i PTF Guide, Volume 25, Number 10

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