• 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: Not All Hex Dumps Are Created Equal

    November 1, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I have a comment about the use of the Display File (DSPF) command to view a file in hexadecimal format .

    This may or may not be obvious: DSPF can show any file, but the hex view is not of what is in the underlying file.

     

    Rather, it’s comprised of what DSPF has converted the file to for presentation purposes.

     

    Normally, I’m interested in the actual stored value when using hex views and not mapped values.

     

    To illustrate what I’m talking about, I copied a CL source member to the Integrated File System (IFS), specifying a UCS2 target

    …

    Read more
  • Help with RPG II Programs

    November 1, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I know you and the other Guild Companies editors cover a lot of the new stuff in Midrange Guru, so you may not want to address my problem. I have never even seen a System/36, yet I have to maintain some old S/36 code. I am getting the hang of OCL, but trying to work with RPG II after years of RPG III and RPG IV is driving me nuts. The worst part of it is trying to keep up with so many indicators. Do you have any sage advice for me?

    — Brad

    My earliest production

    …

    Read more
  • You Can’t Get There from Here

    November 1, 2002 Timothy Prickett Morgan

    Hey, Howard:

    I have a file on my AS/400 that contains flight segments. I need to identify all jobs by departing and final destination airport codes. The file is keyed by our job number and could have from one to four records per job number. It would be easy if every flight was direct, as the departure and destination codes would be on the same record. When the departure and final destination codes are on different records, that makes a search difficult.

    The file details the date of a flight, the departure city, arrival city, flight number, sequence, and a

    …

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

    October 30, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I receive tons of emails and delete most without even opening them, but I always find time to read your questions and answers in Midrange Guru, OS/400 Edition.

    Thanks for the information, and keep it coming.

     

    — Bob



























    Sponsored By
    ADVANCED SYSTEMS CONCEPTS

    Business Analytics
    – Practical –
    – Cost Effective –
    – Easy to Deploy –

    SEQUEL FYI

    User Quote:
    “I love SEQUEL FYI because it lets me look at the data any way I need to see it, instantly. This is the easiest tool to manage complex product relationships that I have ever seen.”

    SEQUEL FYI

    …

    Read more
  • Get a Hex Dump of

    October 30, 2002 Timothy Prickett Morgan

    Dear Readers:

    Today’s tip proves the old saying, “There’s more than one way to skin a cat.” Here’s another way to view any database file member or IFS file in hexadecimal.

    — Ted

    CL’s Display File (DSPF) command displays any IFS file or database file member.

    To display an IFS file, use the STMF parameter:

    DSPF STMF('/home/mydir/mydata.dat')
    



    Press F10 to see the file in hexadecimal.

    You can specify a path name and/or wildcard characters in the STMF parameter.

    In that case, DSPF provides a list of files from which you can choose.

    This command lists all files and directories in

    …

    Read more
  • SQL’s One-Row, One-Column Table

    October 30, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In the October 25 Midrange Guru article, “SQL to the Rescue!“, a reader named Jeff provides an example that requires a file with one record. IBM provides such a file for just that purpose:

    It’s called QSQPTABL.

    — Yannick

    Thanks for the information, Yannick. QSQPTABL is in library QSYS2. It has one column (field), which is a four-byte integer field called INTCOL (INTEGER_COLUMN). The only row in the table has the value 1.

    It occurred to me that this technique is probably worth further exploration. SQL has a rich set of scalar functions, and IBM adds

    …

    Read more
  • Reader Feedback and Insights: SQL to the Rescue!

    October 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I am writing in regard to the September 20, 2002 Midrange Guru article, “Comparing Lists of Numbers to a Value .” I would like to offer the following embedded SQL example as an alternative solution:

    D found           s              1a              
    D
     * if (field1 or field2 or field3) > 25 
    C/exec sql                                       
    C+    select case                                
    C+      when max(:field1, :field2, :field3) > 25 
    C+         then '1'                              
    C+         else '0'                              
    C+      end                                      
    C+    into :found                                
    C+    from (any file with one record)
    C/end-exec                                       
    C                                                
    C                   if        found = *on        
     .................. whatever ..................
    C                   else 
    ................... whatever ..................
    C                   endif
    

    This

    …

    Read more
  • Another Way to Dump an IFS File

    October 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    When answering the question that was posed in the October 18 issue of Midrange Guru, “Hex Dump of an IFS File,” you provided a Qshell answer. If you don’t happen to have Qshell installed, you can use two CL commands instead. Here’s how:

    CPY OBJ('/somedir/somefile.txt') +
       TOOBJ('/qsys.lib/somelib.lib/hexifs.usrspc') +
       TOCODEPAGE(*CALC) DTAFMT(*TEXT)
    
    DMPOBJ DMPOBJ OBJ(somelib/hexifs) +
       OBJTYPE(*USRSPC)
    

    Experiment with the codepage and data format parameters of the Copy (CPY) command to give needed conversions.

    There are a couple of other details of which you should be aware:

    • CPY fails if the user space already exists.
    • Using CPY
    …

    Read more
  • Johnny Can’t Read and RPG Can’t Do Math

    October 25, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I ran into an anomaly and was wondering if you could shed some light on it.

    A subprocedure that I wrote doesn’t return the correct value. The problem is caused by an expression that doesn’t return the value that I think it should.

    Why does the expression, which returns the correct value (.3) in the Test4 evaluation, apparently return an incorrect value (.29999) when combined in another expression?

    H EXPROPTS(*MAXDIGITS)
    D X               S              5  0 Inz(1)
    D Y               S              5  0 Inz(6)
    D  ABC            S             15A   Inz('13077.39')
    D  NUM            S             15  5 Inz(0000013077.00000)
    D  Digits         S             10    Inz('0123456789')
    
    …

    Read more
  • Reader Feedback and Insights: Extending the Network

    October 23, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In the October 16 Midrange Guru, in the article “Extending the Network,” one of your readers, Greg, asked a question about connecting to the AS/400 with Terminal Server and extending the green screens to users on that network.

    I am assuming that Citrix is running on the Terminal Server also. I administered an AS/400 and a Terminal Server/Citrix Network like this for several years. We used Wyse Terminals and older PCs as terminals. We found that Client Access wouldn’t work with the terminals, and the cost per-license was higher that our client wanted to pay.

    …

    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