IBM added a new command RUNSQL in V7r1 (in 2012 via ptf) and ptf'd it also into V6R1.
Infocenter has doc on how it works. This is not all the features of iNav or STRSQL..

What IBM did not do is some new way to read files or result sets. But CLP has always had RCVF to read records in a file,
so the above link to the infocenter has this example

In a CL program, you could use the Receive File (RCVF) command to read the results of the table generated for this query:
(SELECT * FROM qsys2.systables WHERE table_schema = ''MYSCHEMA'') WITH DATA')
COMMIT(*NONE) NAMING(*SQL)So I did a test RUNSQL SQL('create table qtemp.worktable as (select distinct bid from tran) with data') COMMIT(*NONE) and got a file Display Physical File Member File . . . . . . : WORKTABLE Library . . . . : QTEMPMember . . . . . : WORKTABLE Record . . . . . : 1 Control . . . . . Column . . . . . : 1 Find . . . . . . . *...+. A.A50 A&A44 A&A75 A&B60 A-A50 A-112 AAC25 Read the InfoCenter link above for all the limitations. Jim Franz ----- Original Message ----- From: "Hoteltravelfundotcom" <hoteltravelfun@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Sunday, June 01, 2014 7:02 PM
Subject: how to use the Select Distinct

Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot 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 here. If you have questions about this, please contact