• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Determine Elapsed Days, Weekdays, and Workdays

    March 31, 2004 Hey, Ted

    Finding the number of days between two dates is a common requirement in IT shops. We have a method that works well for us. It lets us include or exclude holidays and weekends.

    We have a calendar file that has a record for every date between January 1, 1940, and December 31, 2039. It has quite a few fields, but the three that pertain to this discussion are DATE, DAYOFWEEK, and HOLIDAY. DATE is the date itself, defined with the date data type. DAYOFWEEK is a one-digit packed decimal number in the range 1 (Sunday) to 7 (Saturday), the same

    …

    Read more
  • Thinking in Sets

    March 31, 2004 Hey, Howard

    I have an interesting problem and was wondering if you could show me how to code it in SQL. I have a file that records changes to packages in our facility. The file has a package ID number, date of activity, time of activity, and activity code. I want to find the last date and time of activity for each package but can’t get the query to work, because using MAX on the date and time can return a time value for when an activity did not occur.

    –Michael

    This is a really interesting problem, Michael, because your schema does

    …

    Read more
  • Admin Alert: Moving ASCII Data Between IFS and Windows

    March 31, 2004 Joe Hertvik

    Last week, I discussed how to get started using the QNTC file system, which lets you access Windows server data from OS/400 applications. This week, I’ll explain how to use QNTC to move ASCII files between Windows file shares and the OS/400 Integrated File System.

    The OS/400 IFS generally refers to the subsection of the OS/400 file system that supports stream file data and directory structures that are similar to what you would find in a PC Windows or Unix operating system environment. Although the QSYS.LIB file system (where all the DB2 UDB files that are natively accessed inside

    …

    Read more
  • OS/400 Alert: Virus Programming for the Novice

    March 31, 2004 Shannon O'Donnell

    Viruses spread so fast, it’s a wonder that all computers are not infected all the time. If you’ve ever wondered how viruses are created with such alarming regularity, you will want to read this week’s “OS/400 Alert” on writing your own viruses. I’ll also share some of the more outrageous programming practices IT professionals have reported. Read this tongue-in-cheek article and see how many of these “techniques” are used in your own shop.

    WRITING VIRUSES HAS NEVER BEEN EASIER

    Ever wondered how there can be so many viruses dancing around the Web? There are dozens of new viruses found each

    …

    Read more
  • V5R3 CL Programming Enhancements, Part 2

    March 24, 2004 Ted Holt

    Last week I wrote about the integer data types, the select structure, and the looping commands that will be available in V5R3. This week I’ll finish my tour of new V5R3 CL programming features by telling you what’s new with input/output operations, parameter passing, and the generation of CL command documentation.

    DECLARE MORE FILES!

    One limitation that System/38, AS/400, and iSeries programmers have complained about is that only one Declare File (DCLF) command was allowed in a CL procedure (i.e., a compiled program or module). Using a database file automatically eliminated the possibility of using a display file, and vice

    …

    Read more
  • Better Data Transfers

    March 24, 2004 Bruce Guetzkow

    [The code for this article is available for download.]

    I’ve been searching for ways to automate user tasks and, preferably, to have them initiated from the iSeries. One such task is transferring data between a network folder or the Integrated File System (IFS) and an externally described iSeries database file. But there are problems associated with using IBM’s Copy from Stream File (CPYFRMSTMF) and Copy to Stream File (CPYTOSTMF) commands. So I developed my own commands.

    When using the CPYFRMSTMF and CPYTOSTMF commands, the parameters and associated values are difficult to keep straight, and externally-described iSeries database

    …

    Read more
  • Delimited List Processing in SQL

    March 24, 2004 Michael Sansoterra

    [The code for this article is available for download.]

    I recently worked on the database side of a Web project for which the Web developers needed to pass several item numbers to an iSeries for processing. Traditional methods would have dictated these items be inserted into a temporary or transaction file, then converted and processed as an XML file or passed individually to a stored procedure for processing.

    An alternative that is fast and painless (provided the related item information is minimal) is to make a single call to a stored procedure and to pass the item

    …

    Read more
  • OS/400 Alert: Microsoft Closes the Doors on JVM

    March 24, 2004 Shannon O'Donnell

    This issue of “OS/400 Alert” lets you in on what was an inevitable move by Microsoft in announcing it will no longer support or provide its own Java Virtual Machine. We’ll also let you know what to do if you find a bug in one of IBM‘s Licensed Program Products. And if you ever felt sorry for hackers, thinking these poor folks must have no friends or social life, you might be surprised to learn the number of Web sites devoted to the hacker lifestyle.

    SUPPORT FOR MICROSOFT JVM TO END SOON

    In what is likely one of the

    …

    Read more
  • V5R3 CL Programming Enhancements, Part 1

    March 17, 2004 Ted Holt

    In the October 10, 2003, issue of Midrange Guru, I said I doubted that the good folks at IBM would ever enhance the CL programming language. Well, I was wrong. I recently had a long phone conversation with one of those good folks, and he told me what IBM is doing to beef up CL programming in V5R3. I liked what I heard, and I hope you’ll be as happy as I was to hear the news.

    I’m going to tell you about what’s new with declarations, looping structures, and selection structures. The rest will have to wait until

    …

    Read more
  • Using ‘New’ SQL Data Types in RPG

    March 17, 2004 Raymond Everhart

    As RPG programmers, we have become very comfortable with character, zoned, and packed decimal data types. Occasionally, when dealing with APIs or subprocedures, we’ve been forced to dabble with binary numbers or variable length strings. More recently some of us have started taking advantage of the strengths of the date, time, and timestamp data types supported in RPG IV. And just when we think we’ve got it all covered, we find out that DB2 supports even more data types.

    DB2 supports data types that are seldom used by iSeries programmers. However, since C or Java programmers may create tables (or

    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • SEU’s Fate, An IBM i V8, And The Odds Of A Power13
  • Tandberg Bankruptcy Leaves A Hole In IBM Power Storage
  • RPG Code Generation And The Agentic Future Of IBM i
  • A Bunch Of IBM i-Power Systems Things To Be Aware Of
  • IBM i PTF Guide, Volume 27, Numbers 21 And 22
  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D

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