• 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: SQL to the Rescue!

    October 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I am writing in regard to the September 20, 2002 Midrange Guru article, “Comparing Lists of Numbers to a Value .” I would like to offer the following embedded SQL example as an alternative solution:

    D found           s              1a              
    D
     * if (field1 or field2 or field3) > 25 
    C/exec sql                                       
    C+    select case                                
    C+      when max(:field1, :field2, :field3) > 25 
    C+         then '1'                              
    C+         else '0'                              
    C+      end                                      
    C+    into :found                                
    C+    from (any file with one record)
    C/end-exec                                       
    C                                                
    C                   if        found = *on        
     .................. whatever ..................
    C                   else 
    ................... whatever ..................
    C                   endif
    

    This program uses the SQL CASE statement to evaluate whether any one of a list of input host variable values is greater than a control value. A pseudo-Boolean character value is returned, indicating whether the condition was satisfied. The appropriate program logic can then be executed based upon the resulting value.

    — Jeff

    Thanks for the idea, Jeff. Isn’t it silly that you have to have a one-record dummy file for these things?

    — Ted

    Sponsored By
    ADVANCED SYSTEMS CONCEPTS

    Business Analytics
    – Practical –
    – Cost Effective –
    – Easy to Deploy –

    SEQUEL FYI

    User Quote:
    “I love SEQUEL FYI because it lets me look at the data any way I need to see it, instantly. This is the easiest tool to manage complex product relationships that I have ever seen.”

    SEQUEL FYI offers outstanding OLAP business intelligence functionality for a fraction of the cost of comparable solutions.

    Read More > View Streaming Video

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 82 -- October 25, 2002

    Sponsored by
    ARCAD Software

    [Live Webinar] Rewrite your Synon in Java? It could be… a mistake!

    Converting from Synon CA 2E to a modern language? There are many good reasons to take this step. Beyond the critical shortage of Synon skills, applications developed in this 4GL environment can no longer take advantage of key technology advances in the IBM i operating system. And though a leader in its day, the Synon CASE tool is incompatible with modern DevOps practices and concurrent development.

    Do you think the best way to move away from Synon CA 2E is by rewriting everything in Java?

    Think again. A full rewrite is risky, expensive, and slow — often leading to years of redevelopment and countless functional regressions.

    Join Philippe Magne, CEO of ARCAD Software and Ray Bernardi, senior solution architect to learn why a conversion to Free Form RPG is a risk-free and high-performance option that leverages the architecture of the original Synon application – retaining all the reliability and security advantages of the host platform.

    In our Webinar, we will share a secure, automated migration path for business applications developed in Synon CA 2E:

    • 100% automated conversion to modern Free Form RPG and DDL (SQL)
    • Guaranteed conversion accuracy with test automation process
    • Possible modernization of the user interface during the project
    • Risk free, fixed price Modernization as a Service (MaaS)
    • Modern full DevOps framework for delivery

    Leverage the competitive advantage within your Synon application.

    Register Today!

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Type2 IFS Directories Reader Feedback and Insights: Thanks for the Information

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 82

This Issue Sponsored By

    Table of Contents

    • Reader Feedback and Insights: SQL to the Rescue!
    • Another Way to Dump an IFS File
    • Johnny Can’t Read and RPG Can’t Do Math

    Content archive

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

    Recent Posts

    • Stacking Up Power10 And Power11 Systems Price/Performance
    • Where Infor Is Headed With Its ERPs For IBM i
    • Rocket Delivers More DevOps Capabilities For IBM i
    • A Few More Power Systems Announcements Before Year End
    • IBM i PTF Guide, Volume 27, Number 46
    • Bang For The Buck On Entry Power10 And Power11 Machines
    • A Hardware Refresh Is The Perfect Time To Re-Evaluate Your HA/DR Strategy
    • Fresche Taps AI For New RPG-To-Java Conversion Tool
    • Gartner Raises 2025 IT Spending Forecast, Puts Out 2026 Prediction
    • IBM i PTF Guide, Volume 27, Number 45

    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