IBM Support

Db2 Connect - system naming attribute

News


Abstract

Db2 Connect V10.1 and IBM i 7.1 have been enhanced to provide naming mode control.

Content

You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Functional Enhancements > Db2 Connect - system naming attribute

SQL_ATTR_DBC_SYS_NAMING is used on the sqlsetconnectattr() API
  • SQL_TRUE - switch the connection to SYSTEM naming
  • SQL_FALSE - switch the connection to SQL naming
 
sqlsetconnectattr() can be called before or after a connection is made
SET PATH = *LIBL can be used to reset the path for system naming use
 
This support is implemented via a special package flow which is flown at execute time.
Example:
Typical execution:
> > > quickc 1 1 sysnam rwpgmr rwp2gmr
> sqlallocstmt 1 1
> sqlsetconnectattr 1 SQL_ATTR_DBC_SYS_NAMING SQL_TRUE
> sqlexecdirec 1 "create schema ashok" -3
> sqlexecdirec 1 "set current schema ashok" -3
> sqlexecdirec 1 "create table ashok/emp1 (id1 int)" -3

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
14 January 2020

UID

ibm11167334