|
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
|