16.20 - Session-userid - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Teradata Tools and Utilities
September 2019
Programming Reference

The Session-userid might be used to obtain the userid for the session without having to parse the logon string.

Refers to the session whose CLIv2 connection number is specified in the QEPCONN field. The session must have been established using a value of C for the Connect-type option. Since they do not apply, the QEPTLEN, QEPRQST, and QEPTOKEN fields must contain binary zeroes.

Returns the userid associated with the session. Older Database releases whose object names are thirty characters long return the userid left-justified padded on the right with blanks. Newer Database that support longer object names trim trailing blanks.

Item Code Mnemonic Response DBQERSUI (DbqerSUi for C)
Field Value
14 QEPISUI QERSUI ('userid' for C) Between one and 2304 bytes long, encoded in the character set specified when the session was established.