AS/400 error message - Cannot allocate device
When I display tape or initialize a tape using DSPTAP or INZTAP commands and enter the parameters I get the error message "Cannot allocate device tap01..." Please help me as I am new to AS/400.
Solution 1:
You may find the device is either in use or varied off. I am presuming you have the right device name.
To check the status of the device:
WRKCFGSTS *DEV TAP01
- If the status says VARIED ON then the device is ready to use.
- If the status says ACTIVE the device is in use; the job using the device will appear to the right on the display.
- If the status says VARIED OFF then the device is unavailable and must be varied on. Option 1 on this screen will allow you to vary the device on if you have authority.
On the off-chance you have the wrong device name:
WRKCFGSTS *DEV TAP*
If your tape device has been named staring with "TAP" then you should see it in the resulting list. Use the na ein the list but consider checking with someone that knows if that is the appropriate device name.
Good luck.
Solution 2:
You can check what job is locking the device with the following command:
WRKOBJLCK TAP01 *DEVD