Decoding the PORT.STATUS "Device"

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Decoding the PORT.STATUS "Device"

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

LIST.READU Command Output decoding

Post 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...)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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")
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8)

Now you just need to let us know how your utility comes out.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply