× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks!



-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx]
Sent: Thursday, July 30, 2015 1:19 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: 7.2 New features confusion

<snip>
Also they list this: Allow period separator for qualification of objects in system naming. What does this new feature mean exactly?
</snip>

As stated in the reply
http://archive.midrange.com/midrange-l/201507/msg00575.html
Prior to this PTF to 7.1 (which came out in base 7.2) when you specified *SYS vs *SQL in many SQL commands (like CRTSQLRPGI, RUNSQLSTM, etc) you would specify library/file While, if you specified *SQL instead of *SYS you specified schema.table The big difference being the slash versus the period.
However, with the advent of 7.2 (and the fixing PTF for 7.1) You could still say *SYS and use the period as in schema.table versus using the slash as in library/file.
Now, the only difference between *SYS and *SQL is that when you do not qualify a table (like schema.table or library/file) when you use *SYS it will use the library list while *SQL will use the default schema.

Let's assume you're current on OS and PTF's.

From a 5250 session.
STRSQL
F13=Services
1. Change session attributes
Naming convention . . . . . . *SYS

SELECT * FROM QSYS2.LIBRARY_LIST_INFO
ORDINAL_POSITION SCHEMA_NAME
1 QSYS
2 QSYS2
3 QHLPSYS
4 QUSRSYS
5 QSQL
6 QGPL
7 QTEMP
CREATE TABLE HOKEYPOKEY(MYINT INT NOT NULL WITH DEFAULT) Table HOKEYPOKEY in QGPL created but was not journaled.
DROP TABLE ROB.HOKEYPOKEY
HOKEYPOKEY in ROB type *FILE not found.
Notice that I didn't specify any schema in the create table and it put it into QGPL?
Notice that I didn't specify any schema in the drop table and it tried to drop it from ROB? Which isn't in the library list?

DROP TABLE QGPL/HOKEYPOKEY
Drop of HOKEYPOKEY in QGPL complete.

F13=Services
1. Change session attributes
Naming convention . . . . . . *SQL
CREATE TABLE HOKEYPOKEY(MYINT INT NOT NULL WITH DEFAULT) Table HOKEYPOKEY in ROB created but was not journaled.
DROP TABLE HOKEYPOKEY
Drop of HOKEYPOKEY in ROB complete.

So, while 7.2 and this 7.1 ptf, allow you to pretty much interchangeably use the slash or the period regardless of *SYS or *SQL, there are still some differences in how *SQL or *SYS operate.

Understand?

See also
*SQL
VALUES CURRENT SCHEMA
retrieves ROB
*SYS
VALUES CURRENT SCHEMA
retrieves *LIBL

Now if I run
set schema qgpl
VALUES CURRENT SCHEMA
will retrieve QGPL instead of *LIBL

From Infocenter:
<snip>
If system names were specified, the table will be created in the schema that is specified by the qualifier. If not qualified:

If the value of the CURRENT SCHEMA special register is *LIBL, the table will be created in the current library (*CURLIB).
Otherwise, the table will be created in the current schema.
</snip>


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.