Operating System - HP-UX
1834497 Members
2697 Online
110067 Solutions
New Discussion

Barcode script for tape lib

 
SOLVED
Go to solution
Craig A. Sharp
Super Advisor

Barcode script for tape lib

I am using a Surestore E 2x20 DLT8000 tape library.
The lib is able to read barcodes. I am looking for a script to read the barcode data and print it out to a file.
My plan is to have the data automatically sent to Informix. I can do the informix end but I have no clue on how to extract the barcode data from the library.

Thanks,

Craig A. Sharp
Roush Industries
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: Barcode script for tape lib

If you have OmniBack II check out the uma utility (man uma).
The script would be very similar to this:
ROBOT=/dev/robot/c2t3d0 # robotics device
echo "stat" > /tmp/controlfile
/opt/omni/lbin/uma -ioctl $ROBOT -barcode < /tmp/controlfile > /tmp/list

The output file /tmp/list should have the barcode as the fourth field of each output line.
I think that the uma utility is available from HP w/o purchasing OB2 (at least the man page hints at this.) If you can't get the uma utility you will probably have to write a c program to do a scsi inquiry.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Barcode script for tape lib

You might also check out the 'mc' command though you would then have to install the autochanger driver and devices.
man 1m mc
If it ain't broke, I can fix that.
Philip P. Hartl
Valued Contributor

Re: Barcode script for tape lib

execute the command
Don't take life so seriously; nobody gets out alive.
Philip P. Hartl
Valued Contributor

Re: Barcode script for tape lib

execute the command "omnimm -repository_barcode_scan . This will do a barcode scan and produce a report of all tapes in the exchanger.
Don't take life so seriously; nobody gets out alive.
Craig A. Sharp
Super Advisor

Re: Barcode script for tape lib

Hi all,

Thank you for your replies. We do not use Omniback. We had some serious problems that prevented us from using that solution.

I will checkout the MC command and see if that will do what I need.

Please let me know if there are any other ideas not usind Omniback.

Thanks

Craig
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Barcode script for tape lib

Ok Craig. I tried the mc command and here's what happened.
ROBOT=/dev/robot/c2t3d0 # SCSI pass-thru robotics device (set to your picker device)

mc -p $ROBOT -r S > /tmp/list.txt
The output looked like this
ST_slot_1 FULL 000107
ST_slot_2 EMPTY
ST_slot_3 FULL 000187
.
.
.
The 3rd field is the barcode. It appears that MC will dothe job.
If it ain't broke, I can fix that.