• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Printing Leading Zeros with Query/400

    June 7, 2002 Timothy Prickett Morgan

    Hey, Ted:

    Regarding the Odds and Ends column, published in Midrange Guru, OS/400 Edition, May 31, you can also have Query/400 print leading zeros by telling Query to use edit code X for the field containing the customer number.

    — Doug

    Sponsored By
    WORKSRIGHT SOFTWARE

    On June 30, 2002,
    $$$$$$$$    Postal Rates will go UP!    $$$$$$$$

    On Monday, July 1st,
    $$$$$    your postage bill
    can go down.    $$$$$

    How can this happen? By CASS certifying your mailing names
    and addresses and presorting your outgoing mail. Our CASS certification software ensures that your address files
    have valid ZIP Code and

    …

    Read more
  • How Does OS/400 FTP Determine Working Directories?

    June 7, 2002 Timothy Prickett Morgan

    Hey, Joe:

    How does OS/400 determine what the default current working directory or library (CD) is when a remote client starts an FTP session using an AS/400 or iSeries as a host FTP server? How can I change that default?

    — Barbara

    OS/400 sets the current working directory through universal properties that tell FTP where to retrieve this information from for any signed-on user starting an FTP session. These setting are maintained in two places: through the green-screen Change FTP Attributes (CHGFTPA) command and in the iSeries Operations Navigator (OpsNav) program that comes with Client Access Express for Windows and

    …

    Read more
  • Searching the Information Center

    June 7, 2002 Timothy Prickett Morgan

    Hey, David:

    What is the best way to search IBM‘s online Information Center? I have tried searching using IBM’s search, but the order of the results is usually wrong. You mentioned using Google, but it finds matches on other sites. How do you get Google to limit results to one site? When I specify the Information Center domain on the advanced search, my search results are zero.

    — Mark

    The fastest, easiest, and most flexible way I have found to search IBM’s online Information Center is to use Google. Instead of using Google’s advanced search, I use Google’s

    …

    Read more
  • Proper Use of QTEMP

    June 5, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In the article, “Suggestions for a Temporary Library,” the author writes the following statement: “…the top of the library list. QTEMP is already there.”


    So many sites put QTEMP at the top of the library list to save qualifying file names with QTEMP. I have always felt that this exposes a potential security risk. This is mainly for reasons that might never happen, but, if damage can be done, some day it is bound to happen. For example, a user using Query/400 could easily create a file in QTEMP that has the same name as a

    …

    Read more
  • Build SQL to Define Your Existing Files

    June 5, 2002 Timothy Prickett Morgan

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

    Hey, Ted:

    We have always defined our files with DDS, but now we’re ready to use SQL for data definition.

    Do you have a good way to convert our DDS to SQL Data Definition Language (DDL) commands?

    — Paul

    IBM included just the tool you need in V5R1.

    It’s the Generate Data Definition Language (QSQGNDDL) API.

    You can read about it on the Web at http://publib.boulder.ibm.com/html/as400/v5r1/ic2924/index.htm?info/apis/qsqgnddl.htm .

    I’ll give you an example of what it can do. Then I’ll give you some code you can use to generate

    …

    Read more
  • Making PC5250 Look like a Dumb Terminal

    June 5, 2002 Timothy Prickett Morgan

    Hey, Joe:

    Is there any way I can make my PC5250 sessions look like dumb terminal sessions? I have some operators who dislike the Windows framing panel of a PC5250 session, and they just want to see the 5250 screen filling up the display and nothing else when they bring up the program. Is there a way to do this?

    — Jeff

    Sure, this functionality is part of PC5250’s Windows Setup function. Windows Setup is a series of check boxes and radio buttons that allow you to manipulate certain features of PC5250’s Windows interface. In this case, you want to

    …

    Read more
  • A Better Way to Get Query/400 Definitions?

    May 31, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I am writing in response to your article, “Print Query Defintions from a Batch Job” that was published in the May 22 issue of Midrange Guru, OS/400 Edition.

    ASC

    A better solution is to use the Retrieve Query Management Query (RTVQMQRY) command, which works fine for a Query/400 definition (*QRYDFN object).

    This puts the output into a source file that can be manipulated with a program.

    See the following example:

    PGM        PARM(&LIBRARY)
    
       DCL        VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
       DCLF       FILE(DSPOBJD)
    
       CLRPFM     FILE(RTVQRYOUT)
       DSPOBJD    OBJ(&LIBRARY/*ALL) +
          OBJTYPE(*QRYDFN) +
          OUTPUT(*OUTFILE) +
          OUTFILE(QTEMP/DSPOBJD)
       OVRDBF     FILE(QTXTSRC) +
          TOFILE(QGPL/QTXTSRC) +
          MBR(RTVQRYTMP)
    LOOP:
       RCVF       
    …

    Read more
  • Odds and Ends

    May 31, 2002 Timothy Prickett Morgan

    Dear Readers:

    As requested, here are more short tips that don’t qualify as tips in their own right, for whatever reasons. I hope you find something useful.

    ASC

    — Ted

    Question:

    Is it possible for an initial program to determine if the user who is running it is already signed on with another session?

    Answer:

    Yes, attempt to allocate an object with an exclusive lock. If the user is already signed on elsewhere, the allocation should fail.

    Here is some example code to get you started.

       DCL   &USER        *CHAR     10                 
       DCL   &LIB         *CHAR     10  VALUE(QGPL)
    
       MONMSG     MSGID(CPF0000) EXEC(GOTO ENDPGM)
    
       RTVUSRPRF  
    …

    Read more
  • Using Library Lists for JDBC File Access

    May 31, 2002 Timothy Prickett Morgan

    Hey, David:

    How do you set your library list with JDBC and JTOpen? The JDBC documentation says that I should use system naming along with a libraries property. When I do that, it appears that the search stops on the first library. The only way I can get a select statement that uses files from more than one library is to qualify the library name. That makes it difficult to test.

    BCD Int'l

    — James

    To be consistent with the way that the ODBC uses library names, the JTOpen 3.0 JDBC drivers take the first library that you specify and ignore the

    …

    Read more
  • Reader Feedback and Insights: Suggestions for a Temporary Library

    May 29, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In the April 24 issue of Midrange Guru, OS/400 Edition, you described a method of creating a temporary library that would provide the same function as QTEMP. I would like to make a couple of comments:

    ASC

    In addition to creating the temp library, it would be a good idea to add this library to the top of the library list. QTEMP is already there, and including the temp library would allow *LIBL to be used.

    To retain this temporary library, you suggested creating data area KEEPTEMP in a library in the job’s library list. I would

    …

    Read more

Previous Articles Next Articles

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