• 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

  • 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