How to get the Windows SID number using Caché Command?

Answers

SET Command="wmic useraccount get name,sid"
SET $ZT = "CommandErr"
OPEN Command:"QR"
FOR {
USE command
READ Text
USE $P
SET Array($I(Array))=Text
}
CommandErr ;
SET $ZT=""
SET ZE=$ZE
USE $P
CLOSE command
IF $P(ZE,">")'="<ENDOFFILE" {
; some error other than end of file
}
ELSE {
; parse contents of Array()
}