11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Caché</strong> <strong>ObjectScript</strong> Special Variables<strong>Caché</strong> without specifying a user name. In this case, $USERNAME contains the string“UnknownUser”.When a process is created using the JOB command, it inherits the same $USERNAME and$ROLES values as its parent process.A user name can be created using the SQL CREATE USER statement and deleted using theSQL DROP USER statement. A user password can be changed using the SQL ALTERUSER statement. A user can have roles assigned to it, either by using the SQL GRANTstatement, or by using system utilities to add a role to the user. You can access the list ofroles assigned to the current process with the $ROLES special variable. A role can be revokedfrom a user using the SQL REVOKE statement.ExamplesThe following example returns the full user name for the current process.WRITE $USERNAMEThe following example returns the default schema name for the current process.WRITE $PIECE($USERNAME,"@")See Also• <strong>Caché</strong> <strong>ObjectScript</strong> $ROLES special variable• <strong>Caché</strong> SQL: CREATE USER DROP USER ALTER USER GRANT REVOKE%CHECKPRIV$XContains the current horizontal position of the cursor.$XDescription$X contains the current horizontal position of the cursor. As characters are written to a device,<strong>Caché</strong> updates $X to reflect the horizontal cursor position.Each printable character that is output increments $X by 1. A carriage return (ASCII 13) orform feed (ASCII 12) resets $X to 0 (zero).454 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!