• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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

Content archive

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

Recent Posts

  • LANSA Developing Business Intelligence Tool
  • Blazing The Trail For VTL In The Cloud
  • Data De-Dupe Gives VTL Customers More Options
  • Four Hundred Monitor, March 29
  • The Big Spending On IT Security Is Only Going To Get Bigger
  • IBM Tweaks Some Power Systems Prices Down, Others Up
  • Disaster Recovery: From OS/400 V5R3 To IBM i 7.4 In 36 Hours
  • The Disconnect In Modernization Planning And Execution
  • Superior Support: One Of The Reasons You Pay The Power Systems Premium
  • IBM i PTF Guide, Volume 25, Number 13

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