It sounds like what you are looking for is this:
for lUser in userList do {
string uName = lUser.name
string uEmail = lUser.email
string uSys = lUser.systemLoginName
string uAdr = lUser.address
outBuf += uName sep uSys sep uEmail sep uAdr
outBuf += "\n"
if(null uSys)
{
print uName " doesn't have a System Name.\n"
} else {
bool flagDuplicate = false
string nameDuplicate = ""
string s = ""
for s in skiplist do {
if(s == uSys) {
flagDuplicate = true
nameDuplicate = (string key skiplist)
break
}
}
if(flagDuplicate) print "Users '" uName "' and '" nameDuplicate "' have the same System Name (" uSys ")."
else put(skiplist,uName,uSys)
print "\n"
}
}
EDIT: I added a check for a blank uSys
, you can do anything you want there, if you want to just add all the empty ones to a list then print it out at the end that would work too.
This should at least point you in the right direction.
NOTE: I don't have the ability to test this code currently so I apologize if there are any errors or typos. But I think it will get you close enough.
Good luck!