• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Distinct File and Record Names with SQL

    June 28, 2002 Timothy Prickett Morgan

    Hey, Ted:

    When I create a physical file using the SQL CREATE TABLE command, the system gives the same name to the file and record format.

    This means that I have to remember to rename the record format in every RPG program I write that defines the file in an F spec. Is there a way to make SQL give the record format some other name?

    — Dan

    I know of one way.

    Let’s say you want to create a file called MYFILE in library MYLIB and name the record format MYREC.

    Run the following SQL commands in an interactive SQL session.

    create table mylib/myrec (
       name char (20),                  
       number dec (5))                  
    
    rename table mylib/myrec to myfile
    

    The physical file will be renamed to MYFILE, but the record format name will remain MYREC.

    — Ted

    Sponsored By
    CENTERFIELD TECHNOLOGY

    Take the guesswork out of iSeries DASD Management with disk/HUNTER

    Why wait until your system slows down or stops because a run-away query eats up your disk space?

    Many application and database problems can lead to disk spikes, including:

    • Database queries that create large, temporary indexes (access paths)
    • Database queries that create large temporary spaces to implement hash joins or grouping
    • Applications that use heap storage but do not free it (memory leaks)
    • Java-based applications that create a large number of objects but that do not get reclaimed because of dangling object references
    • Applications that use the Integrated File System (IFS) and create large stream files but do not always delete them when they are done
    • Users who create copies of data in IFS as backups not realizing how much disk space they consume
    • Jobs caught in an infinite loop writing printing and creating very large spool files
    • Applications that write to log files that do not get cleared often or at all
    • Data collected by IBM performance and trace tools

    Once installed and configured, disk/HUNTER runs continuously in the background on your AS/400 iSeries, and “wakes up” at intervals that you specify. Every time disk/HUNTER wakes up, it will measure the amount of free space remaining within specified ASPs or all ASPs.

    When the amount of free space decreases by a user-specified percentage or by a user-specified amount (in megabytes or gigabytes), disk/HUNTER will go to work, generating messages and reports pointing to the origination of the spike.

    The combination of detection and diagnostic capabilities within disk/HUNTER provides a powerful element of control to iSeries shops that experience high levels of activity and that also need to be proactive in managing storage.

    To really see how disk/HUNTER can be both an insurance policy and a time-saver in your shop, click here to download a demo or order a no-charge 30-day support-assisted trial evaluation.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 50 -- June 28, 2002

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Service Program Catch-22 Reader Feedback and Insights: Avoiding Object Locks

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 50

This Issue Sponsored By

    Table of Contents

    • Determining Whether a User Is Already Signed On, Take Three
    • Easy Subfile Windowing
    • Distinct File and Record Names with SQL

    Content archive

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

    Recent Posts

    • IBM i Has a Future ‘If Kept Up To Date,’ IDC Says
    • When You Need Us, We Are Ready To Do Grunt Work
    • Generative AI: Coming to an ERP Near You
    • Four Hundred Monitor, March 22
    • IBM i PTF Guide, Volume 25, Number 12
    • 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

    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