• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Duplicating CPYF Function Using SQL

    March 16, 2011 Skip Marchesani

    There are a few questions that I am frequently asked re: SQL that are interrelated. First, can SQL be used to duplicate the function found in the native CPFY (copy file) command? Next, can SQL be used to duplicate a table similar to the function found in the native CRTDUPOBJ (create duplicate object) command? And lastly, can a field reference file be used as the source for column definitions with the CREATE TABLE SQL statement? The answer is a qualified YES to all three questions, and it is relatively easy to do.

    From a SQL perspective, I break the CPYF

    …

    Read more
  • Circumventing Integer Division

    March 16, 2011 Hey, Ted

    My computer seems to have forgotten how to divide. When I divide one value by another, using SQL, the answer is always exactly one or zero. What gives?

    –RPG Professional

    This took a little while, but we finally found his problem. First, the background.

    Assume a database file with three fields: customer ID, the number of orders from that customer, and the number of shipments to the customer.

    select CustID, Orders, Shipments
      from Summary  
              
    CUSTID  ORDERS       SHIPMENTS
         1      75              25
         2      10              16
         3      20               0
         4       8               8
    

    Now let’s add a ratio to the query to gauge order

    …

    Read more
  • Admin Alert: Corralling i/OS Storage Hogs, Part 2

    March 16, 2011 Joe Hertvik

    Last week, I published part 1 of my series detailing the seven biggest culprits of unnecessary i/OS storage consumption. This week, let’s continue with the remainder of my list and see what you can do to keep your storage problems under control.

    Again, the Seven Sinister Storage Hogs

    While not inclusive of all the ways processes can consume disk on your machine, I usually focus my attention on the big seven culprits of unnecessary storage consumption when an issue appears on one of my iSeries, System i, or Power i systems.

    1. Excessive spooled files and other system objects
    2. Walking Dead
    …

    Read more

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