• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Timestamps and V5R1 RPG

    August 28, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I enjoy reading the tech tips in Midrange Guru, especially how to break up a string in Qshell . (You figured that out on a cocktail napkin at a bar, right?)

    Craig Rutledge’s recent tip on comparing timestamps in RPG free is a bit too “robust.” To create a timestamp, just do this:

    legacy_stamp = %date(legacy_date:*MDY) + %time(legacy_time:*hms);
    
    defined_stamp = defined_date + defined_time;
    

    — Chris

    I can’t take credit for the Qshell tip to split up a parameter. As with so many other RPG, CL, OCL, and VB tricks of the trade, I learned that tip from somebody else.

    Thanks for the simplified code. Craig and I had tried your method, but for some reason, we couldn’t get it to work.

    Several other readers sent in the same information. One of them, Carsten Flensburg, had the following comment to make:

    “Having a brief look in the manual didn’t reveal any documentation for this behavior, but I guess that’s a documentation issue rather than a compiler issue.”

    — Ted

    Sponsored By
    ADVANCED SYSTEMS CONCEPTS

    SEQUEL meets all your iSeries and AS/400 data access needs in a single, integrated solution:

    • Windows, Web or host user interfaces

    • Convert AS/400 data into PC file formats

    • E-mail or FTP query results, reports and spool files
    • Run-time prompted queries and reports for end users

    • IF-THEN-ELSE logic in queries and reports

    • Report, form and label formatting second to none

    • Easily convert date fields, character-to-numeric, numeric-to-character and other data manipulation

    • SORT or JOIN using a calculated field

    • Quick summarization of data with Tabling function

    • Run multiple SEQUEL requests as one with the SEQUEL Scripting function

    • OLAP Business Intelligence at a fraction of the cost of comparable solutions

    Take 6 minutes to view a SEQUEL ViewPoint ScreenCam movie to see how simple Windows-based AS/400 and iSeries data access can be! In just a few short minutes, you can find out ways to make your job easier and improve data access throughout your organization. Download the ViewPoint movie here .

    For more information or a FREE trial of SEQUEL, call 847/605-1311 or visit Advanced Systems Concepts.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 65 -- August 28, 2002

    Sponsored by
    Rocket Software

    Software built on TRUST. Delivered with LOVE.

    For over 35 years, Rocket Software’s solutions have empowered businesses to modernize their infrastructure, unlock data value, and drive transformation – all while ensuring modernization without disruption.

    Learn More

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Odds and Ends Reader Feedback and Insights: Splitting a Qshell Variable

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 65

This Issue Sponsored By

    Table of Contents

    • Timestamps and V5R1 RPG
    • A CPYF Idiosyncrasy Revisited
    • Edit with Parentheses in Query/400

    Content archive

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

    Recent Posts

    • The Power11 Transistor Count Discrepancies Explained – Sort Of
    • Is Your IBM i HA/DR Actually Tested – Or Just Installed?
    • Big Blue Delivers IBM i Customer Requests In ACS Update
    • New DbToo SDK Hooks RPG And Db2 For i To External Services
    • IBM i PTF Guide, Volume 27, Number 33
    • Tool Aims To Streamline Git Integration For Old School IBM i Devs
    • IBM To Add Full System Replication And FlashCopy To PowerHA
    • Guru: Decoding Base64 ASCII
    • The Price Tweaking Continues For Power Systems
    • IBM i PTF Guide, Volume 27, Numbers 31 And 32

    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