• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

iSeries - Does CREATE LOGICAL FILE (CRTLF) create an SQL VIEW

Frosty the Coder

Legendary Poster
We need to access specified file members from w/in SQL.
SQL CREATE command does not allow you to point at members.

Create Logical File (CRTLF) DOES permit this.

If I do a CRTLF does the system create an SQL VIEW somewhere for the database?
If so, where would that VIEW be found?

Thanks greatly.
Frosty.
 

Kim Schmidt

Active Member
Frosty,

You can create a database alias to reference a specific existing logical file's member. Then you can use the alias name in your SQL statements. See this link for examples: "https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/sqlp/rbafycreatingalias.htm"
 

Frosty the Coder

Legendary Poster
Thanks, we had tried that.
We also tried creating VIEWs, and VIEWs based on ALIASes.

Something is preventing my counterpart(s) from seeing ALIAS, VIEW, or LOGICALS.
BUT, that's their problem, not mine.

Frosty
 

TerryWin

Well Known Member
.
You should be able to query the system SQL tables to find the location of any Views, Indexes, etc.
 
Top