Guild Companies, Inc.  
 
Midrange Guru - Tech Tips
OS/400 Edition
Volume 2, Number 31 - April 24, 2002

Handling Break Messages Revisited

Hey, Ted:

I read your tip on handling break messages and created the two programs to incorporate your tip. I made two changes to the code for the initial program. I substituted *USRPRF for the message queue name and added a Monitor Message (MONMSG) command to trap message CPF2451. Half the users of my machines run multiple display sessions. Without the MONMSG command, subsequent sessions after the first would abend.

-- Jack

Thanks for the suggestions. I like both of them. Specifying MSGQ(*USRPRF) instead of hard-coding a user profile name makes the code portable to other users and won't break if the user profile is renamed.

I rarely sign on to two sessions because I use group jobs, so I had never needed to monitor for CPF2451. I had a global MONMSG command that caught it. I like your way better.

Here's the improved code:

CHGMSGQ    MSGQ (*USRPRF) DLVRY(*BREAK) PGM(THOLTMSGH)
MONMSG     MSGID(CPF2451)                          

Thanks for sharing with the rest of us, Jack.

-- Ted

Sponsored By
TRAMENCO

Learn what's over the horizon for the iSeries and AS/400, and how it will impact your career, by attending the premier training event of 2002. It's the iSeries and AS/400 Connection Conference June 16 – 19, 2002 in Naples Florida. Join 19 of the industries greatest minds including Dr. Frank Soltis, Skip Marchesani, Wayne O. Evans, Susan Gantner, Jon Paris, Marie Finnegan-Cronin, and Howard Arner, Jr. as they deliver AS/400 training and education to prepare you for the challenges of tomorrow. A full agenda of 96 sessions (including 10 hands-on labs) provide practical instruction in a full range of topics, including:

  • Understanding Websphere Development Studio

  • Accessing DB2/400 data from Linux

  • Learning how JavaBeans are used

  • Make the most of RPG IV's built in functions

  • SQL Tricks and Techniques

  • ABCs of System Management

  • And much more!
Whether you are an old pro, or just getting your feet wet, there is something for everyone during this intensive four-day conference. Best of all, your classroom is the Registry Resort and Spa, Naples Florida's premier 5-star resort. To register, or for more information, call 1 800 897.5923, or go to the web at www.tramenco.com. But hurry, you must register before May 15, 2002 to save $200 off the standard registration and be eligible for special hotel rates.
THIS ISSUE
SPONSORED BY:
WorksRight Software
TRAMENCO
BACK ISSUES
TABLE OF CONTENTS
Looking at another Job's Temporary Objects
Handling Break Messages Revisited
Reader Feedback and Insights: Get with the Times
  Newsletters | Subscribe | Advertise | About Us | Contact | Search | Home  
  Last Updated: 4/24/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.