Guild Companies, Inc.  
 
Midrange Guru - Tech Tips
OS/400 Edition
Volume 2, Number 18 - March 8, 2002

Odds and Ends

Dear Readers:

I get many questions that, in my opinion, aren't tip material for Midrange Guru. Some questions are about the 'old' technology, while others apply to a very limited audience. And, other questions pertain to general knowledge with answers available in manuals (if you can find them).

On the theory that some of this stuff may be of use to people other than those who asked the questions, today I present some of this information.

Please let me know if this is helpful or not. If enough people are interested, on occasion I will run miscellaneous questions and answers .

-- Ted

Question:

I have a customer who wants to track messages being issued from certain users. The users are sending these messages using option 4 of the IBM ASSIST menu. I suggested using the security audit capabilities, but we discovered that option 4 uses the API QEZSNDMG and not a command. The security audit log does not show the message text that is being sent. Do you know of any way we can do this?

Answer:

No. You can log the fact that the message was sent, but I'm 99-percent sure you can't log the text of the message.



Question:

A client has a small DOS batch file running on a PC that starts PC Support, and it performs some file transfers. The client would like it to automagically sign on. Right now, he manually has to sign on with his user ID and password. Do you know if there a keyword that would allow him to automagically sign on?

Answer:

I'm always amazed at how much of this 'old' stuff is still running in AS/400 shops. Put the user ID and password in a DOS text file, one per record. That is, there are two records in the text file; the first with the user ID, the second with a password. I'll assume it's called signon.txt. Use the input redirection operator--a less than symbol (<)--to make the startrtr cmd read from the text file.

startrtr <signon.txt



Question:

Is there a way to monitor for two or more messages with CLLE? In my backup routine, I use the Display Tape (DSPTAP) command to make sure that I did not forget to put a tape in the tape drive. I have one Monitor Message (MONMSG) command following it, but I need to add another one. Is that possible?

Answer:

MONMSG can have more than one message ID. Any of the messages will cause the EXEC to run.

Also, you can follow a command with more than one MONMSG. You'd use this when you want to do different actions for different error messages.

Here's a nonsense example. All three MONMSG's apply to the DSPTAP command:

dsptap tap01 
monmsg (cpf1099 cpf2033 cpf2121) exec(...)
monmsg (cpf1122 cpf9933) exec(...)
monmsg (cpf9323) exec(...)



Question:

We are using message detection software from Tango/04 called Visual Message Center. It enables us to not only monitor and log all iSeries messages, but also optionally do something instantly about them (e.g., run a command, send a message).

My question is this: is there some method to IBM's madness in the naming of the messages that the AS/400 generates? For example, any messages between CPF1000 and CPF1999 have to do with disk drive problems, or all CPAxxxx messages are from RPG programs.

Knowing these standards would help me configure Visual Message Center to take more-precise actions when these messages are detected.

Answer:

There is no method to the madness.  I asked someone at IBM Rochester and got this reply:

There is no such convention. The proper use of prefixes (CPF, CPD, etc.) is policed (for the most part), but the message number is not. Various number ranges are allocated to various components of the system so that you might very well see a given component/command using what appears to be a set range as they are using their own messages, but we also try to share/reuse messages where ever possible.

Picking a command at random (well maybe not random, but rather at random within the group where I would expect to see message number variability), I looked at DSPOBJD. It can send CPF21xx, CPF32xx, and CPF98xx per the online help.

To see which escape messages a command might send, type the command on a command line, move the cursor above the parameters, and press the Help key (F1). The online help text lists the escape messages that the command can send.



Question:

I am using an API that requires full path names. I know how to specify an OS/400 IFS file, but how do I code a library object as a full-path name?

Answer:

Every library object is referenced by two parts--a name and an object type. The two parts are separated by a period (.). The hierarchy begins with QSYS.LIB. That is, QSYS.LIB is the root directory of the library system.

In the following example, member DEMO in file QTEMP/DEMO is moved to a directory of the OS/400 IFS and given the name DEMO.TXT. The DEMO file will still be in QTEMP, but member DEMO will no longer be in the file.

MOV OBJ('/qsys.lib/qtemp.lib/demo.file/demo.mbr')  +
     TOOBJ('/home/jsmith/demo.txt') +
     TOCODEPAGE(*PCASCII) +
     DTAFMT(*TEXT)



Question:

I am working with an RPG II program. I have built a join logical of inventory and description files. I use omit/select, too. How do I code the input specifications, as the two files have fields with the same starting and ending positions?

Answer:

Run the Display File Field Description (DSPFFD) command on the join logical file. Use the field positions it gives you. To a program, all the data appears to be in one record format.



If this information is of help, and/or if you find it interesting, please send me an email and let me know.

-- Ted

Sponsored By
COMMON

Attend the COMMON IT Conference in Nashville April 14-18 -- just $1,150

We've posted a lot of new information on the COMMON Users Group's Spring 2002 IT Education Conference & Expo, April 14-18 at Opryland in Nashville.

Go to: http://www.common.org/Conferences/conf.html

Important: You must register by 03/04/02 to get the Early Bird $1,150 fee and save $245! COMMON membership is required. Individual membership is $125 for one year.

Go to the link above and read more about:

OUTSTANDING EDUCATION: We're offering 720 plus sessions and 37 topic groups (Courses of Study) in Nashville. Also, learn how to follow a Focused Education Roadmap (FER) so you can master a specific subject.

WIRELESS iSeries: We've included more information about our wireless iSeries tour and group of wireless sessions. LANSA -- an iSeries e-business vendor -- is helping provide equipment for this highly informative FER.

NEW OPEN LABS: In Open Labs, you learn-by-doing at your own pace. New labs include Client Access Express for Windows Programming Tools, and iSeries Access for Web and WebSphere.

NEW BANQUET: Our Spring 2002 Awards Banquet will feature Amanda Gore, one of Australia's best-known speakers. Ms. Gore's topic will be "Building Corporate Communities."

WEEK-AT-A-GLANCE: See how your five days will shape up.

REGISTER here: http://www.common.org/LANSA/confnew.html

After you complete the conference registration, stay online and make your hotel arrangements at Opryland. You'll want to stay here, because Opryland is our total conference facility. Under one roof, we'll have all session rooms, the Expo, hotel rooms and special events. Also, all registrants who make their Gaylord Opryland hotel reservations through the COMMON Housing Bureau are automatically entered in the "COMMON Cents!" raffle. Grand prize is $500 CASH. Go to: http://www.common.org/Conferences/Conferences_02/spring/housing.html. If you need more assistance, please call 800-270-8223 and we'll gladly help you.

THIS ISSUE
SPONSORED BY:
iSeries Nation
COMMON
BACK ISSUES
TABLE OF CONTENTS
Edit Code X Converts Numeric to Alpha
Odds and Ends
Reader Feedback and Insights: Page 1 of X
  Newsletters | Subscribe | Advertise | About Us | Contact | Search | Home  
  Last Updated: 3/08/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.