Page 1 of 1
Decoding the PORT.STATUS "Device"
Posted: Tue Jun 09, 2009 5:01 am
by ArndW
The PORT.STATUS command outputs a DEVICE and INODE. I know that there is some method of XORing or doing some similar manipulation to that number in order to get a major and minor device number but cannot recall how to do that and have played around with reverse-engineering the displayed device number to my system and have made no progress whatsoever; i.e. I get a DEVICE of "655396" for a mounted Major,Minor number of 33,2.
Posted: Tue Jun 09, 2009 5:22 am
by chulett
Posted: Tue Jun 09, 2009 5:35 am
by ArndW
Hello Craig,
no, that doesn't address the issue. What I am writing is utility to analyze locks on this system and to get rid of spurious locks caused by network issues terminating sessions which the deadlock daemon doesn't catch. But in order to do that I need to trace back froma Device/inode value from UniVerse to the actual disk object.
Posted: Tue Jun 09, 2009 7:28 am
by chulett
I didn't mean address the issue directly, thought maybe there might be a useful nugget of information buried in there somewhere. Guess not.
LIST.READU Command Output decoding
Posted: Tue Jun 09, 2009 8:04 am
by ArndW
It was interesting to read - thanks for that. I decided to open up a call and send it straight to Sunil or Len since I know that they know the answer without having to check but I'll probably have to fight my way through support first. I've already have been told that they can't help without knowing the exact version of DataStage (hmm... LIST.READU output hasn't changed since I first used it in the early 1980s...)
Posted: Tue Jun 16, 2009 3:15 am
by ArndW
Ok, it turns out that I was getting the DEVICE number using LIST.READU on one machine, then trying to figure out the the Major,Minor devices from another machine! Once I went back and started checking my work I found the error and then the formula became obvious. For those interested:
Code: Select all
Device = "655396" ;** This is the DEVICE number from LIST.READU
BinDevice = OCONV(Device,'MB')
Major = ICONV(BinDevice[1,LEN(BinDevice)-16],"MB")
Minor = ICONV(RIGHT(BinDevice,16),"MB")
Posted: Tue Jun 16, 2009 5:20 am
by chulett
Now you just need to let us know how your utility comes out.