Newsletters Subscriptions Media Kit About Us Contact Search Home

mgo
OS/400 Edition
Volume 3, Number 39 -- June 13, 2003

Reader Feedback and Insights: Frightened by the Midrange Guru


Hey, Ted:

In your tech tip "How Dynamic Is OPNQRYF?" there is one frightening sentence:

Now that you understand what's going on, let me tell you that this is not just an OPNQRYF phenomenon. It is true of any program that opens an open data path for input. Run the RPG program by itself and you will experience the same behavior. The RPG program will get an added record if the KEYFLD value is greater than the key field values of the original three records.

A little test program shows that it is not always so, and it is a good thing, too! I adapted your program so that it does not use the RPG cycle.

Fmydata    if   e           k disk    rename(mydata   : myrec)
Fqsysprt   o    f  132        printer

D Counter         s              3  0
        c     *LOVAL        setll     mydata
c                   read      mydata
c                   dow       not %eof

C                   eval      Counter = Counter + 1
C                   if        Counter = 1
C     'Add rec now' dsply
C                   endif

c                   except    detail

c                   read      mydata
c                   enddo
    
c                   eval      *inlr = *ON
    
Oqsysprt   e            detail      1
O                       counter       4
O                       keyfld           +0001     
O                       datafld          +0001     

--Jan


I'm sorry, Jan. I didn't mean to frighten you!

By using the SETLL op code, you changed the file to random access, so the system doesn't buffer the input.

Thanks for writing!

--Ted


Sponsored By
ADVANCED SYSTEMS CONCEPTS

Quoted from an experienced programmer
new to the iSeries (AS/400):

"The best thing about working on the AS/400 is using ASC's SEQUEL product."

If you're tired of the limitations imposed by Query/400 or ODBC-based query and reporting tools, you need SEQUEL. Discover how thousands of sites around the world have improved access to iSeries data using SEQUEL's Windows- and Web-interfaces. It's the one tool you can rely on for virtually all your iSeries data access needs.
FREE trial available.

Read More about SEQUEL


THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
WorksRight Software


BACK ISSUES

TABLE OF
CONTENTS

Retrieving the Host Name from an IP Address

Variable-Length Character Data

Reader Feedback and Insights: Frightened by the Midrange Guru


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris
Shannon O'Donnell

Managing Editor
Shannon Pastore

Publisher and
Advertising Director:

Jenny Thomas

Advertising Sales Representative
Kim Reed

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.