This FAQ is a collection of answers to some of the common Client/Server questions, which tend to pop-up from time to time. The answers (however trivial they might be) get easily forgotten when not in daily use and sometimes they are hard to find in the multitude of books and manuals each treating its subjects in a different way and often discussing details, while defaulting on the basics (presuming, I guess, that they are obvious – well, they are, but only after you know them). However, when you need the answer, it might be a burning issue and a desperate search under pressure can be quite stressful and frustrating.
This selection is an attempt to avoid that frustration by trying to put the important data together into one FAQ hyperlinked for the ease of use and accessible from anywhere and by anybody who might have interest in it. However, this selection is not compiled for the Web only – rather it's my working reference, which I try to maintain as accurate and current as possible. As such it inevitably will always lack an overall integrity and completeness, yet it is still a rather useful tool that often saves time.
Most of the questions originated from a real-life experience of a Client/Server programmer. The answers were looked for in every available source ranging from formal manuals to the news group discussions and conducting an exhaustive experiments when nothing else would help. Every answer was checked to the best of my competence and was as a rule tested by a substantial time of repeated usage. This is not to say that it is in any way guaranteed to be error-free – you will be using any advice you pick from this FAQ entirely at your own risk and will be completely responsible yourself for any problems that might arise from this usage. So when trying an advice, please exercise the common sense precautions and test it most thoroughly yourself before applying it to anything serious.
This legal mantra been chanted, I want to mention that all error reports and any comments about this FAQ are most welcome, and I'll try to do my best to fix any known problem as quick as I'll be able to do this.
E.g.: $ uname -a
SunOS srv07 5.5.1 Generic_103640-23 sun4m sparc SUNW,SPARCstation-20
E.g.: $ umask -S
u=rwx,g=rx,o=r
E.g.: $ umask a=r,ug+x,u+w
$ umask -S
u=rwx,g=rx,o=r
E.g.: $ > file
E.g.: command | tee file
command | tee -a file
command | tee file_a file_b
$ ksh -n script
$ ksh -vx script
E.g.: echo setmqaut -m $MQM -p $User -t queue -n $Queue +allmqi
setmqaut -m $MQM -p $User -t queue -n $Queue +allmqi
E.g.: Dbg=echo # Uncomment for debugging
$Dbg setmqaut -m $MQM -p $User -t queue -n $Queue +allmqi
. ~/.profile - User profile containing basic setup of user environment
. SETQMNAM $1 - Callable script to set Queue Manager name to environment variable
$ echo One Two Three
One Two Three
$ echo "One Two Three"
One Two Three
Lower=$(echo $1 | tr [A-Z] [a-z]) or Lower=$(echo $1 | tr "[:upper:]" "[:lower:]")
Upper=$(echo $L | tr [a-z] [A-Z]) or Upper=$(echo $L | tr "[:lower:]" "[:upper:]")
E.g.: $ id
uid=0(root) gid=1(other)
User =$(id | cut -f2 -d'(' | cut -f1 -d')')
Group=$(id | cut -f3 -d'(' | cut -f1 -d')')
User =$(id | awk '{print substr($1,index($1,"(")+1,index($1,")")-index($1,"(")-1)}')
Group=$(id | awk '{print substr($2,index($2,"(")+1,index($2,")")-index($2,"(")-1)}')
for var in files; do command; done
# for F in *.TRC; do dspmqtrc -t /opt/mqm/lib/amqtrc.fmt $F > ${F%%.*}.DSP; done
E.g.: $ pkginfo | grep mq
application mqm MQSeries for Sun Solaris 2
application mqm-upd02 MQSeries for Sun Solaris 2 - U474789
E.g.: $ pkginfo -l mqm
PKGINST: mqm
NAME: MQSeries for Sun Solaris 2
CATEGORY: application
ARCH: sparc
VERSION: 5.2.0
. . . . . .
E.g.: # awk /DefaultQueueManager:/,/Name=/ /var/mqm/mqs.ini
DefaultQueueManager:
Name=MYQMGR
E.g.: # grep LogType /var/mqm/qmgrs/MYQMGR/qm.ini
LogType=LINEAR
# cd /var/mqm/trace
# for F in *.TRC; do dspmqtrc -t /opt/mqm/lib/amqtrc.fmt $F > ${F%%.*}.DSP; done
# rm *.TRC
# runmqsc -v < mqsc.cmd | tee mqsc.log
| Note: |
Remember that it is only command
syntax that gets validated. This won't show
logical errors, such as an attempt to create an alias to a
non-existent queue or use it as a model. Authorization
problems also can't be revealed by validation.
|
I.e., specify: DISCINT(0)