• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Reader Feedback and Insights:

    September 27, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I find your Web site and the information stored there more and more useful. Today, somebody I know was having trouble with data being truncated on FTP. Overhearing this triggered me to find the Midrange Guru article where you were discussing “locsite trim 0.” I went to the Midrange Guru Web site, found the article, and passed it on to the person in need of the information. It worked.

    I just thought I would pass that information along.

    Keep up the good work.

    — Darrell



























    Sponsored By
    ADVANCED SYSTEMS CONCEPTS

    SEQUEL meets all your iSeries and AS/400 data

    …

    Read more
  • Loading a Tilde-Delimited File into the Database

    September 27, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I received via an e-mail attachment a file that did not contain any sort of CR/LF record separators, although the stream of information did have tilde characters (~) between each logical record.

     

    So I tried to use Copy from Import File (CPYFRMIMPF) command to upload it to a 96-byte single-field “catch” file, specifying the tilde character as the RCDDLM (record delimiter), but OS/400 says this isn’t allowed.  Do you have any suggestions?

    — Bill

    Since you’re using CPYFRMIMPF, I take it the file is in the IFS. Use Qshell’s stream editor, sed, to convert the tilde characters to

    …

    Read more
  • Find the Cursor Position in a CL Program

    September 27, 2002 Timothy Prickett Morgan

    Hey, Howard:

    At my shop, we have field on-line help in our RPG programs that allows the user to place the cursor on a field, then press F1 and get help for that field. The RPG passes row and column data to the help text program to accomplish this. Is there way to capture row and column in a CL program to accomplish the same thing? Currently, we get a help text-screen that covers the entire screen, not just the field that the cursor is on.

    — Larry

    My friend Holley Davis can help you with this one, Larry. Here’s

    …

    Read more
  • Reader Feedback and Insights: Displaying Menu Options

    September 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In regards to your tip on displaying menu options, which published in the “Odds and Ends” column in the September 18 issue of Midrange Guru, OS/400 Edition, I have a suggestion. Use the Work with Message Descriptions (WRKMSGD) command instead of Display Message Descriptions (DSPMSGD) command. WRKMSGD MSGF(menuname) will display all the options in a panel.

    — Michael

    Thanks, Michael. You are right.

    — Ted























    Sponsored By
    WORKSRIGHT SOFTWARE

    On June 30, 2002,
    $$$$$$$$    Postal Rates went UP!    $$$$$$$$

    On July 1, 2002,
    $$$$$    you wanted your postage bill to go down.    $$$$$

    We have

    …

    Read more
  • FTP’ing a Library

    September 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I think there is a way to FTP an entire library to a PC file and then restore the PC file to another iSeries machine. I just don’t know where to look. Can you tell me what to do?

    — Darrell

    FTP only transfers files, Darrell, so the only way to FTP a library is to put the library into a file. In this case, you need to use a save file.

    First, create a save file and then save the desired objects to it:

    CRTSAVF   FILE(bbb/XYZ)
    SAVLIB   LIB(aaa) DEV(*SAVF) +
       SAVF(bbb/XYZ) TGTRLS(*CURRENT)
    

    Be sure to specify the

    …

    Read more
  • OPNQRYF Date Arithmetic

    September 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I need to select records for the period beginning 210 days ago and ending 30 days ago using Open Query File (OPNQRYF). The date field is eight digits packed, in YYYYMMDD format.

    I thought this was going to be easy, but I am a little tired and stumped.

    So how do I do this?

     

    — David

    You’ll have to convert that numeric date to a date data type in order to use OPNQRYF’s date duration functions.

    Here’s an example that illustrates the conversion:







    DCL        VAR(&QRYSLT) TYPE(*CHAR) LEN(512)
                                                             
    DCL        VAR(&QRYSLT) TYPE(*CHAR) LEN(512)
    
    CHGVAR     VAR(&QRYSLT) + 
                 VALUE('DtDate *ge (%curdate - 
    …

    Read more
  • Reader Feedback and Insights: Thanks for the Tips

    September 20, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I appreciate the tips and techniques that you provide in Midrange Guru, OS/400 Edition. It’s nice to get a few tips each day and try them out rather than be inundated with a bunch at one time.

    — Lori



































    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
    …

    Read more
  • Comparing Lists of Numbers to a Value

    September 20, 2002 Timothy Prickett Morgan

    Hey, Ted:

    It’s a shame you can’t do something like this in RPG:

    * if any of the fields > 25
    If       (field1 or field2 or field3) > 25 
             etc
    Endif
    
    * if all three fields > 25)
    If       (field1 and field2 and field3) > 25 
             etc
    Endif
    

    — David

    Who says you can’t, David? You just have to do it a different way. You know, cogitate external to the rectangular container constructed of corrugated paper.

    Many programming languages have minimum and maximum functions, which return one value from a list. OPNQRYF and Microsoft Excel come to mind.

    Below is

    …

    Read more
  • JD Edwards Dates, Revisited

    September 20, 2002 Timothy Prickett Morgan

    Dear Readers:

    After I published the piece on how to convert JD Edwards date to DB2 date data types, I received more mail than I have ever received before.

    Obviously, you guys are salivating for date routines. Well, so as not to let you down, I will publish in this issue a user-defined function that you can use in place of the date conversion formula. However, for those of you that do not have V5 or the C Compiler and SQL Development Kit, I will provide instructions on how you can download a working version of the function and

    …

    Read more
  • Reader Feedback and Insights: More Binder Language

    September 18, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I just read your tip: “Adding Subprocedures to a Service Program .” After I picked myself off of the floor because I was laughing so much, I reread the article, and your narrative makes the whole binder thing make sense. Thanks for the amusing and informative answer. Your tip ties it altogether and puts the binding part of ILE in easy-to-understand terms.

    — Doug

    Thanks, Doug. I’m glad you enjoyed the article.

    — 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
    …

    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