I have a wrapper-type class for some SQLCLI stuff. I call it FTPDatabase.
I have a constructor where you pass in a data source name, default library,
user & password. On our old Power7 systems we didn't have any iASPs at
all. We simply used *SYSBASE and the default database that came configured
with the system. I had coded in all of my programs for the data source
name to be "*LOCAL". Being new to the IBMi at the time, I probably got
"*LOCAL" from some web page or IBM manual.
Here is a snippet of code that connects to the database.
sqlRet = SQLConnect(iv_ConnectionHandle, (char *)
iv_DataSourceName.c_str(), SQL_NTS, (char *) userName.c_str(), SQL_NTS,
(char *) password.c_str(), SQL_NTS);
On our Power8 system, we're going to have iASPs and our data is going to be
separated from *SYSBASE. I had a sample program laying around that just
did a SELECT from a well-known table/file & spit the results out. This
library/schema exists on iASP "DATADEV". I compiled this program, which
still connected to *LOCAL on the new system, expecting it to fail because
(I thought) "*LOCAL" would connect to *SYSBASE.
Can anyone shed some light? I cannot find a difference between
FTPDatabase m_dbConnection("*LOCAL", "", "", "");
FTPDatabase m_dbConnection("DATADEV", "", "", "");
Both work. Why is this? My user profile is set to use DATADEV as my
initial ASP. I did not execute any command that changed my working ASP