Monitoring Tape Drives

45 pts.
Tags:
Application development
AS/400
Backup & recovery
CLP
DataCenter
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Hmonat
    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 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following