45 pts.
 Monitoring Tape Drives
Hello everybody, Well, I'm trying to write in C or CL a program that will monitor the different Tape Drives to know when and by who the drives are vary on and vary off. Does anyone as an example or can give me some infos to start because I'm really lost... Thanks in advance, Pierre.

Software/Hardware used:
ASKED: April 21, 2006  6:13 AM
UPDATED: December 6, 2009  8:26 AM

Answer Wiki:
Hi Pierre I don't know if there's anything you can do with the QAUDJRN security journal to help, but one thing you can do (although you may not want to) is to use CL to write a Command Validation Program and attach it to the VRYCFG command using the CHGCMD command. Your CVP could look something like this: PGM PARM(&DEV &TYP &STS + &x1 &x2 &x3 &x4 &x5 &x6 &x7 &x8 &x9) DCL VAR(&DEV) TYPE(*CHAR) LEN(13) DCL VAR(&TYP) TYPE(*CHAR) LEN( 3) DCL VAR(&STS) TYPE(*CHAR) LEN( 2) /* Other Parms */ DCL VAR(&X1) TYPE(*CHAR) LEN(3) DCL VAR(&X2) TYPE(*CHAR) LEN(2) DCL VAR(&X3) TYPE(*CHAR) LEN(3) DCL VAR(&X4) TYPE(*CHAR) LEN(4) DCL VAR(&X5) TYPE(*CHAR) LEN(10) DCL VAR(&X6) TYPE(*CHAR) LEN(10) DCL VAR(&X7) TYPE(*CHAR) LEN(3) DCL VAR(&X8) TYPE(*CHAR) LEN(3) DCL VAR(&X9) TYPE(*CHAR) LEN(3) DCL VAR(&QTY) TYPE(*DEC) LEN(2) VALUE(0) DCL VAR(&USR) TYPE(*CHAR) LEN(10) DCL VAR(&TST) TYPE(*CHAR) LEN(10) dcl var(&msg) type(*char) len(64) CHGVAR VAR(&TST) VALUE(%SST(&DEV 3 3)) IF COND(&TST *EQ 'TAP') THEN(DO) RTVJOBA USER(&USR) CHGVAR VAR(&MSG) VALUE(%SST(&DEV 3 5) *CAT ' varied + ' *CAT &STS *TCAT ' by ' *CAT &USR) SNDMSG MSG(&MSG) TOUSR(*SYSOPR) enddo ENDPGM This will send a message to the *SYSOPR message queue any time a user varies a TAP device on or off. The assumptions here are: a) Only one device will be varied off or on at a time b) Tape device names begin with TAP You can modify the program to suit your own setup easily enough. Hope it helps Jonathan
Last Wiki Answer Submitted:  April 21, 2006  9:15 am  by  astradyne   370 pts.
All Answer Wiki Contributors:  astradyne   370 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi Pierre,
I had a similar situation where I have 8 partitions sharing 5 tape drives and it is difficult to know which partition has TAP01 varied on so that you can varied it off to give it to another partition.
I have decided to use the ISeries Navigator approach to monitor these:
For each partition, I’ve created a shortcut on my desktop from ISeries Nav.>My system>Config & Service>Hardware>Tape Devices>Stand Alone Devices. The batch file created will look like this:
“C:Program FilesIBMClientAccesscwbunnav.exe” “/s=Mysystem /o=UNY0systemAS40Configuration and ServiceCFG2HardwareHWF2Tape DevicesTapeDevices9Stand-Alone DevicesStandAloneTapeDevices0 /r=1″

I then created a main Batch file that just says “Start file1.bat” “Start fil2.bat”, etc…

It might not be the best solution, but at least it allows the operators to see the status of all drives on all system at the same time.

Hope that help.
A la prochaine

Hubert

 20 pts.

 

You can get ZC (object change) entries in QAUDJRN for the vary off/on operations, but they won’t show the commands. The QHST log has CPC2606 for vary off, and CPC2605 for vary on. You can do command auditing to get CD entries in QAUDJRN. You might put exit programs on the QIBM_QCA_CHG_COMMAND or QIBM_QCA_RTV_COMMAND exit points to trap VRY* commands.

Tom

 110,175 pts.