Index
As you know, you can get a CSV file (or a TXT, XLS and so on file) from the result of a query with ACS SQL Script… but if you need to generate a CSV directly from a SQL script you could mix SQL and CL command, as in the following example where we get a CSV file an IFS directory from a query on a NETSTAT system view:
create table qtemp.netstat as (SELECT * FROM qsys2.netstat_info) with data; cl: CPYTOIMPF FROMFILE(QTEMP/NETSTAT) TOSTMF('/home/faq/netstat.csv') STMFCCSID(PCASCII) RCDDLM(CRLF) ADDCOLNAM(*SQL);
And if you want schedule or call this script from another program you could execute it with RUNSQLSTM, as in this simple CL program
PGM
RUNSQLSTM SRCFILE(FAQ400/SRC) SRCMBR(XNETSTAT) COMMIT(*NONE) OUTPUT(*PRINT)
ENDPGM
Page: 1 2
Early April saw the release of the "Spring Version" of ACS Access Client Solution, version 1.1.9.5 Interesting new features especially…
If the packed agenda of sessions at Common Europe Congress 2024, June 3-6 Milan, wasn't enough for you, here's another…
Debugging functions with Visual Studio Code have been available for some time but this new version 2.10.0 simplifies the handling…
Two and a half years after my post Transferring objects with ObjectConnect and Enterprise Extender, I finally got around to…
With a little trick even a simple SELECT statement can execute any system command! Let's see how to do that...
A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer