General information
Category:
Coding, syntax & commands
Brenda,
Is this what you are looking for? HTH...
Bill
* lcString is the string you want to extract the User ID from
* Variables we will need
LOCAL lnPos, lcTmpString
lcTmpString = ""
* See if USERID is in the string
lnPos = AT("USERID", lcString)
IF lnPos > 0
* USERID is in the string, so take everything after it.
lcTmpString = SUBSTR(lcString, lnPos + LEN("USERID"))
* See if we have any spaces in the string, and only take
* up to the space.
lnPos = AT(" ", lcTmpString)
IF lnPos > 0
* There is a space here, so take everything up to the
* space
lcTmpString = SUBSTR(lcTmpString, 1, lnPos - 1)
ELSE
* There is no space, so the User ID goes to the end of the
* string. Nothing to do.
ENDIF
ENDIF
* At this point lcTmpString is empty if there was no user ID,
* or contains the user ID.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only