• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Enable Programmatic Access to Remote DB2 Data Using DRDA

    November 19, 2008 Hey, Mike

    I’m trying to set up a stored procedure on our iSeries that can change the server connection to whatever the calling program needs before it runs its query. Your article, Using DRDA to Execute SQL Statements on Another iSeries, seems to address the issue of running SQL statements on a remote iSeries.

    I am new to DB2 and although I can set up stored procedures within System i Navigator with some success, the connection statement only produces errors on compile. Your example runs the commands interactively. Is there a syntax convention or another statement to accomplish this task in

    …

    Read more
  • Admin Alert: When Batch Meets Interactive

    November 19, 2008 Joe Hertvik

    I was recently reviewing i5/OS performance data when I spotted an analysis message that said I should Separate batch from interactive jobs. This prompted me to investigate where batch jobs can intersect with interactive jobs and why it’s bad to run the two of them together in the same subsystem. Here’s what I discovered and what you can do if your batch work starts contaminating your interactive subsystem.

    Where the Problem Develops

    To ensure that critical batch jobs are not held up in a single threaded job queue, some administrators and programmers routinely submit batch jobs that need immediate

    …

    Read more
  • What Is AJAX?

    November 12, 2008 Paul Tuohy

    If you happen to dabble with any sort of Web development (or even if you don’t), you have probably heard of Asynchronous JavaScript and Extensible Mark-up Language (XML)–better known as AJAX.

    Depending on who you talk to AJAX is either “another flash in the pan” or “the greatest thing since sliced bread.” As usual, the truth probably falls somewhere in between.

    In this, the first of two articles, I want to discuss what AJAX is and why you might want to use it. In the following article I will give a simple example of using AJAX with an RPG CGIDEV2

    …

    Read more
  • Retrieve the User ID at Run Time In a .NET Environment

    November 12, 2008 Hey Mike

    I am coding a .NET reporting application. The new .NET reports need to look like the old iSeries reports with the user name at the top. I am using the DB2 managed provider to connect to the data files.

    My code for connecting is:

    Public cni5 As iDB2Connection
    cni5 = New iDB2Connection("DataSource=" + My.Settings.PTCValue)
    cni5.Open()
    

    When connecting, the .NET Windows application displays the Client Access sign-on screen just like the iSeries Access for Windows program does. I can see the connection on the iSeries side under the QUSRWRK Subsystem. It is called QZDASOINIT, user is QUSER, type is PJ (prestart

    …

    Read more
  • Admin Alert: Readers Pimp Joe’s Font, Win No-Prize

    November 12, 2008 Joe Hertvik

    On behalf of Admin Alert reader Jean-Pierre, I recently challenged my readers to a contest to pimp my PC5250 font size in a consistent and validly cool manner. A number of readers responded and they solved Jean-Pierre’s problem, winning themselves no-prizes in the bargain. Here’s how our most recent challenge came about and how it was solved.

    The Making of a Pimp Contest

    Jean-Pierre wanted to change the default font size on his PC5250 sessions, but he couldn’t make the change stick. He was able to change and save the font size on his first session, but every time he

    …

    Read more
  • OPNQRYF Has No “If” But You Can Fake It

    November 5, 2008 Hey, Ted

    We recently started adding Web customers to our customer master file, in which a customer ID is a field of seven characters. The ID’s of Web customers consist of the letter “W” followed by six digits. Is there any way using OPNQRYF to change only the customer IDs that start with “W” to the customer number “5000000” for reporting purposes? Doing so would allow us to keep a lot of existing programs running without a lot of modification.

    –John

    OPNQRYF does not have conditional logic, John, but in your case, you can fake it out. Here’s the type of OPNQRYF

    …

    Read more
  • Embed PJL Statements in a Workstation Customizing Object

    November 5, 2008 Michael Sansoterra

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

    Modern day printers are fabulous in all that they do. In addition to accepting basic ASCII text streams, modern general purpose laser printers usually process either postscript (PS) or printer command language (PCL) streams to generate ornate printouts. So what about using these printers with the IBM i? If the printer understands PCL (or a few other data streams such as IBM’s PPDS or Epson FX/LQ), then there is no problem because IBM’s host print transform functionality magically converts SCS/AFP spool files into one of the aforementioned data

    …

    Read more
  • Admin Alert: Avoiding Restoration Problems with Remote Output Queues

    November 5, 2008 Joe Hertvik

    i5/OS remote output queues are used to send spooled files to printers attached to remote systems. They are commonly created with two objects: the remote output queue itself; and a virtual printer device that allows the queue to function as a locally attached printer device. However, this configuration has some issues when it is restored from backup media, but those problems are easily fixed if you know the right tricks.

    Anatomy of a Remote Output Queue

    Remote output queues (remote OUTQ) are a special type of i5/OS writer that communicates with and sends spooled file output to a printer located

    …

    Read more
  • Calculate a Fractional Number of Years Difference Between Two Dates in SQL

    October 29, 2008 Hey, Mike

    Is there anything new in SQL that will calculate the difference between two dates and return a fractional number of years? For example: “2007-09-10”–“1997-01-01” should return 10.69 years.

    The normal DB2 SQL function to return a difference between two timestamps (TIMESTAMP_DIFF) will not return fractional values as your calculation requires.

    However, if super accuracy isn’t a great need, there is an easy way to do this. Simply calculate the number of days between the two dates to get the number of days difference. Then divide the result by 365.2425, which is the average number of days in the Gregorian calendar,

    …

    Read more
  • Meaningful Names for Null Indicators

    October 29, 2008 Ted Holt

    There are two ways that a column of a SQL result set can contain the null value. One, it can be derived from an expression that contains a null value. Two, null is returned in outer joins and exception joins when a row in a primary table has no match in a secondary table. In either event, RPG has no way to represent a null value, so what’s a guy (a professional i-on-Power guy, that is) to do when an embedded SQL command might return null values?

    Since RPG variables cannot be null, SQL loads two-byte (five-digit) integer variables with

    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • 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
  • Will The Turbulent Economy Downdraft IBM Systems Or Lift It?
  • How IBM Improved The Database With IBM i 7.6
  • Rocket Celebrates 35th Anniversary As Private Equity Owner Ponders Sale
  • 50 Acres And A Humanoid Robot With An AI Avatar
  • IBM i PTF Guide, Volume 27, Number 17

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