• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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 to echo each command to stderr before running it.

    This is going to clutter up the display, but you should find where the variable changes and which command changes it.

    — Ted

    Sponsored By
    JACADA

    Research on Presentation Integration Server Market

    Many changes have occurred in the presentation integration server market according to Gartner’s most recent Magic Quadrant research. Jacada is positioned in the leader quadrant for the fifth year in a row. This is important research for anyone planning presentation integration server projects.

    View the report courtesy/with compliments of Jacada at http://www.jacada.com/gartner/quadrant32

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 47 -- June 19, 2002

    Sponsored by
    Raz-Lee Security

    Start your Road to Zero Trust!

    Firewall Network security, controlling Exit Points, Open DB’s and SSH. Rule Wizards and graphical BI.

    Request Demo

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Searching Message Text RPG II

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 47

This Issue Sponsored By

    Table of Contents

    • String Parameters of Various Lengths
    • Tracing a Qshell Variable
    • LAYOUT: An Improved DSPFFD

    Content archive

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

    Recent Posts

    • Public Preview For Watson Code Assistant for i Available Soon
    • COMMON Youth Movement Continues at POWERUp 2025
    • IBM Preserves Memory Investments Across Power10 And Power11
    • Eradani Uses AI For New EDI And API Service
    • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
    • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
    • Fresche Overhauls X-Analysis With Web UI, AI Smarts
    • Is It Time To Add The Rust Programming Language To IBM i?
    • Is IBM Going To Raise Prices On Power10 Expert Care?
    • IBM i PTF Guide, Volume 27, Number 20

    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