|
Here's a macro straight off our system; maybe it'll give you some ideas. You might also try the url http://www.as400.ibm.com/netdata - believe me, it's an invaluable reference... %define mytable1 = %TABLE %define name = "" %MESSAGE { 8000 : "" : continue %} %{=========================================================== This function reads thru the testfile, and builds a table display with: Last Name, First Name, PlanType, Status, Creation Date, Billing Cycle (Term), Dates (MM/DD/YYYY) One row for each entry If no records match the selection criteria, a message is given to the user =============================================================%} %function(dtw_sql) TestFunction (OUT t1) { SELECT ALL SFLNAM, SFFNAM, SFPLAN, SFSTS, SFStrt, SFLDAT, (SFLDAT), SFEND, SFREFR, sfcrdt, sfterm, sfzip FROM MYLIB.MYFILE T01 WHERE SFUSER <> ' ' AND SFplan <> ' ' AND SFEND < 20990101 AND DIGITS(SFEND) > SUBSTR(CHAR(CURRENT DATE,ISO),1,4)||SUBSTR(CHAR(CURRENT DATE,ISO), 6,2)||SUBSTR(CHAR(CURRENT DATE,ISO),9,2) ORDER BY sfldat DESC, sflnam ASC, sffnam ASC %MESSAGE{ 100: {No records found Please try again <a NAME="result"></a>%} %} %report { %row{ <tr><td>$(V_sflnam)</td><td>$(V_sffnam)</td> <td>$(V_sfplan)</td><td>$(V_sfsts)</td> <td>$(V_sfcrdt)</td><td>$(V_sfterm)</td> <td>@dtw_rsubstr($(V_sfstrt),"5", "2")/@dtw_rsubstr($(V_sfstrt),"7", "2")/@dtw_rsubstr($(V_sfstrt),"1", "4")</td> <td>@dtw_rsubstr($(V_sfldat),"5", "2")/@dtw_rsubstr($(V_sfldat),"7", "2")/@dtw_rsubstr($(V_sfldat),"1", "4")</td> <td>$(V_sfzip)</td> <td>$(V_sfrefr)</td></tr> %} %} %} %{=========================================================== Call this function like so in order to run the thing: http://testme.com/cgi-bin/db2www/report2.mbr/run =============================================================%} %HTML(run) { <center> <FONT face=Arial size=4 color=\"#004080\"><B>Customer List <FONT face=Arial size=4 color=\"#004080\">By Last Used Date</B></center> <FONT face=Arial size=2 color=\"#004080\"> Subscription Plan Codes: <BR>         A=Unlimited <BR>         B=Metered <BR> Billing Cycle Codes: <BR>         A=Annual <BR>         M=Monthly <BR>         Q=Quarterly <BR> <TABLE BORDER=1><CELLPADDING=2><CELLSPACING=2> <tr><td><B>Last Name</B><td><B>First Name</B></td></B> <td><B>Subscrip Plan</B></td><td><B>Status</B></td> <td><B>C/C Type</B></td><td><B>Billing Cycle</B></td> <td><B>Plan Start Date</B></td><td><B>Last Used</B></td> <td><B>Zip Code</B></td> <td><B>Referred by</B></td></tr> @TestFunction(mytable1) </table> %} "Karen D. Summers" <ksummers@sasainc.c To: <MIDRANGE-L@midrange.com> om> cc: Sent by: Subject: RE: Web Data Presentation owner-midrange-l@mi drange.com 04/24/00 09:18 AM Please respond to MIDRANGE-L Can you recommend a "two-hour" source that I can use to create the Net.Data macros? I think I have it configured. I have downloaded some whitepapers and redbooks, but I would like to drag this up today. Karen The opinions expressed are my own and may be the opinion of my company if I say so. -----Original Message----- From: owner-midrange-l@midrange.com [mailto:owner-midrange-l@midrange.com]On Behalf Of tomh@simas.com Sent: Friday, April 21, 2000 1:34 PM To: MIDRANGE-L@midrange.com Subject: Re: Web Data Presentation I don't think I've ever seen "Wheeha!" in a post before... I'd use Net.Data to serve the database info, no need to FTP them anywhere. One of our dot coms (http://www.idocket.com) is written in Net.Data scripts using CL/RPG/SQL to retrieve database info; it's pretty easy once you get the hang of it. The only client side functionality you would need is a browser. You could achieve the same results using RPG, but you need to know something about the API's to get it working. "Karen D. Summers" <ksummers@sasainc.c To: <midrange-l@midrange.com> om> cc: Sent by: Subject: Web Data Presentation owner-midrange-l@mi drange.com 04/21/00 10:34 AM Please respond to MIDRANGE-L I apologize in advance for the length of this post... I have an intranet site on an NT server that is serving up the nightly error and balancing reports. These are currently generated on the 400, copied to database files and the data files are ftp'd to the NT server. Due to the volatile nature of the ftp services on the NT server (and my own curiosity), we are moving the site to the AS/400. (Did you know that FrontPage 2000 recognizes the IFS as a place to put webs? Wheeha!) My question is, how would you access these error and balancing reports without requiring additional desktop functionaility? a) CPYTOSTMF b) ASP pages c) standalone CGI programs d) NET.DATA e) servlets and JSP's served up with WebSpere f) output converted to PDF files +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.