× 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.



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..
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Fsqlp%2Frbafyrunsql.htm

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:
RUNSQL SQL('CREATE TABLE qtemp.worktable AS
(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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.