• 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

  • LANSA Developing Business Intelligence Tool
  • Blazing The Trail For VTL In The Cloud
  • Data De-Dupe Gives VTL Customers More Options
  • Four Hundred Monitor, March 29
  • The Big Spending On IT Security Is Only Going To Get Bigger
  • IBM Tweaks Some Power Systems Prices Down, Others Up
  • Disaster Recovery: From OS/400 V5R3 To IBM i 7.4 In 36 Hours
  • The Disconnect In Modernization Planning And Execution
  • Superior Support: One Of The Reasons You Pay The Power Systems Premium
  • IBM i PTF Guide, Volume 25, Number 13

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 © 2023 IT Jungle