I reran the statement without qualifying the table.
All that did was change the location of the table.
The content of the table was the same
RUNSQL SQL('create table schemachk (cur_schema) as (values cast (current schema as char(10)) ) with data') COMMIT(*NONE) NAMING(*SQL) DFTRDBCOL(GDISYS)
Ownership of object SCHEMACHK in GDISYS type *FILE changed.

dsppfm gdisys/schemachk
still shows
*...+....1
ROB

Basically I think DFTRDBCOL is NOT equal to SET SCHEMA. It just sets where tables are created by default.
I really need to set the schema.
Why?
Because my real sql statement will be using the current schema like:

select count(*)
from qsys2.systables
where table_schema=current schema
and table_name = 'BRMS_STS';

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Tyler, Matt
Sent: Thursday, May 9, 2019 11:34 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Setting CURRENT SCHEMA

Try not qualifying the create table statement.

-Matt


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Thursday, May 9, 2019 9:28 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Setting CURRENT SCHEMA

Shouldn't the result of DSPPFM ROB/SCHEMACHK be GDISYS and not ROB after running this?
RUNSQL SQL('create table rob.schemachk (cur_schema) as (values cast (current schema as char(10)) ) with data') COMMIT(*NONE) NAMING(*SQL) DFTRDBCOL(GDISYS)

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jack Callahan
Sent: Thursday, May 9, 2019 8:36 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: RE: Setting CURRENT SCHEMA

Just like the RUNSQLSTM command, RUNSQL also has a DFTRDBCOL parameter to set the current schema for unqualified SQL object references
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=Syhk_0FbtQ_zwlXfSkGMi4njYkJdL9QpxU7faVaMYoA&s=IfQazVZyq5DyUZ81ouSrWwJLFt39DJx-EIzR17W14kQ&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=Syhk_0FbtQ_zwlXfSkGMi4njYkJdL9QpxU7faVaMYoA&s=IMHm3z3vbcOOdfi0KVkS_F3bLI3lkIKMVokN1q8nwCM&e= .

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=Syhk_0FbtQ_zwlXfSkGMi4njYkJdL9QpxU7faVaMYoA&s=XeRznmjqnT8teinAiWT0kd7CCUj3QpHRQz71QiZU_1A&e=
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=Syhk_0FbtQ_zwlXfSkGMi4njYkJdL9QpxU7faVaMYoA&s=IfQazVZyq5DyUZ81ouSrWwJLFt39DJx-EIzR17W14kQ&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=Syhk_0FbtQ_zwlXfSkGMi4njYkJdL9QpxU7faVaMYoA&s=IMHm3z3vbcOOdfi0KVkS_F3bLI3lkIKMVokN1q8nwCM&e= .

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=Syhk_0FbtQ_zwlXfSkGMi4njYkJdL9QpxU7faVaMYoA&s=XeRznmjqnT8teinAiWT0kd7CCUj3QpHRQz71QiZU_1A&e=
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

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.