>>ALLTRIM(SUBSTR(SYS(0),ATC('#',SYS(0))+1,LEN(SYS(0))))
>>
>>I *think* this will always work in a network environment, though you might want to check for a '0' result (I think it is) to ensure there's been a login.
>
>Hi Bruce,
>
>I'd first assign SYS(0) to a variable. This would eliminate three function calls in the above. Further, I'd simplify it to:
>
>lcuser = SYS(0)
>lcuser = ALLTRIM(SUBSTR(lcuser, ATC('#', lcuser) + 1))
Yes, I've already thought about using a local, though it's instantaneous even without it...
>There's no need to provide a length for SUBSTR() since it will take whatever remains of the string if it isn't provided.
As I recall, that's dependent on a SET something. Since I'm turning these off & on a lot during loading, I thought it safer to to be explicit...Do you recall what I'm referring to?
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.