• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • String Parameters of Various Lengths

    June 19, 2002 Timothy Prickett Morgan

    Hey, Ted:

    In the May 29 issue of Midrange Guru, OS/400 Edition, you describe a method for passing string parameters of variable length to a subprocedure. This possibility has some risks.

    The subprocedure must guarantee that it only changes the data passed to it by the caller.

    For example, suppose a parameter field in the called program or procedure is defined with a length of 15 bytes. A calling procedure passes five bytes. The API CEEDOD determines a length of five bytes, which is correct, but the length of the parameter field is however unchanged. If contents of the

    …

    Read more
  • Tracing a Qshell Variable

    June 19, 2002 Timothy Prickett Morgan

    Hey, Ted:

    A variable is getting changed in a Qshell script, but I can’t determine where it’s happening. How can I track changes to a variable?

    — Len

    Add the following lines to the top of the script:

    trap 'echo "DBG: $var = "$var""' DEBUG
    set -x 
    

    The trap command with the DEBUG condition executes the command between single quotes (‘) after each simple command of the script runs. In this case, Qshell echoes the value of a variable named var to the display. Replace var with the name of your variable.

    The set command with -x option causes Qshell

    …

    Read more
  • LAYOUT: An Improved DSPFFD

    June 19, 2002 Timothy Prickett Morgan

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

    The article was revised on 12/22/14.

    Dear Readers:

    Tim Swearingen recently sent me a copy of his LAYOUT utility. It shows records layouts, as does the Display File Field Description (DSPFFD) command, but in a nicer format, and it also includes access path information. I liked it and thought some of you might find it helpful too.

    The utility consists of four objects:

    • a command object called LAYOUT

    • a printer file called LAYOUTP

    • a CL program called LAYOUTC

    • an RPG III (RPG/400) program called LAYOUTR

    Place the source

    …

    Read more

Content archive

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

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

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