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



Or you could have used PHP which is what I've been doing since it became available.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jan 10, 2018, at 8:03 AM, Richard Schoen <Richard.Schoen@xxxxxxxxxxxxxxx> wrote:

Another option to use might possibly be to write a python script.

I don't know why I've ignored this language for so long, but there are all kinds of things you can do on Windows, Linux and now IBMi with Python and it appears to be fast.

I'm currently working on a presentation on how to build a CL wrapper around your python calls. I'll publish an article when it's ready on the Github site.

This might be an interesting use case to show off the database apis.

FWIW - If Python had been running back on the IBMi a while back I could have saved a lot of time writing RPG and Java layers to create some cool system utilities.

Regards,

Richard Schoen
Director of Document Management
e. richard.schoen@xxxxxxxxxxxxxxx
p. 952.486.6802
w. helpsystems.com
------------------------------

message: 4
date: Wed, 10 Jan 2018 07:16:54 -0500
from: Rob Berendt <rob@xxxxxxxxx>
subject: RE: Convert a database file to Html format

IBM i Access Client Solutions supports:
Comma Separated Values (.csv)
Tab Delimited Text (.txt)
Text (.txt)
Microsoft Excel (.xlsx)
Microsoft Excel 97-2003 (.xls)
OpenOffice (.ods)
Dos Random (.dsr)

We have a few IBM i commands we've downloaded, wrote or modified that are close
Command Library Text
SQL2CSV ROUTINES SQL to CSV
SQL2XLS ROUTINES SQL to Excel
SQL2XML ROUTINES SQL to XML

IBM has a utility called net.data which is pretty simple to use but it's been a long time since I've used it.
https://www-03.ibm.com/systems/power/software/i/netdata/
A simple display of a table could be done with a source member like this %DEFINE { dbtable="ROUTINES.BKPLOG"
DTW_HTML_TABLE = "YES"
DTW_SHOWSQL = "YES"
%}

%FUNCTION(DTW_SQL) query() {
select BLGRPN as Group,
BLLIBN as Library,
BLDATE as Date,
BLTIME as Time,
Case BLMSGN
When 0 then 'Err: Unknown Error'
When 1 then 'Library Saved'
When 2 then 'Err: Partial Save'
When 5 then 'Err: Not Found'
When 6 then 'Err: Save Failed'
Else char(blmsgn)
End as MessageNbr
from $(dbtable)
where (days(current date) -
days(date(substr(digits(bldate),5,2)||'/'||
substr(digits(bldate),7,2)||'/'||
substr(digits(bldate),1,4)) ))<4
and (blmsgn < 3 or
blmsgn in(5,6)
)
order by BLDATE desc, BLTIME desc %}

%HTML(REPORT) {
<HTML>
<BODY>
<H2>Here are the results of your query:</H2>
@query()
</BODY>
</HTML>
%}


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
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: http://amzn.to/2dEadiD


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.