|
Hi Fellows I'm having a problem with a CGI Program. I am using DATATABLE.NET
in my HTML through External CDN but when I render the HTML table it doesn't
show up the CDN DATATABLE.NET(https://datatables.net/) features, it seems
to me that it doesn't recognize the DATATABLE.NET external CDN besides how
do I debug a CGIDEV2 program through RDI. I know that the user under the
DEBUG should be QTMHHTTP but even so the debug is not working in RDI for
me.. Below is my HTML Code and my CGIDEV2 Program
-----
HTML
---/$top
Content-type: text/html
<!DOCTYPE html>
<html>
<head>
<script
src="http://code.jquery.com/jquery-1.11.3.min.js"
</script>
<link href="https://nightly.datatables.net/css/jquery.dataTables.css"
rel="stylesheet" type="text/css" />
<script
src="https://nightly.datatables.net/js/jquery.dataTables.js"
</script>
<Script>
$(document).ready( function () {
var table = $('#example').DataTable();
} );
</script>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
<body>
<div class="container">
/$tabh
<table id="example" class="display nowrap" width="100%">
<thead>
<tr>
<th>Last Name</th>
<th>Street</th>
<th>City</th>
<th>State</th>
</tr>
</thead>
<tbody>
/$tabd
<tr>
<td>/%LSTNAM%/</td>
<td>/%STREET%/</td>
<td>/%CITY%/</td>
<td>/%STATE%/</td>
</tr>
<tr>
/$tabe
</tbody>
</table>
</div>
/$end
</body>
</html>
-------
And my RPG program
// +----------------------------------------------------------------------
// | Program name : CGIDEVLIB/CGITST
// | Created On : 03/26/2022
// | programmer : Jose E. Perez Marmolejos
// | Descr. : This is a sample CGI program
// |
// |
// | +=====================================================================
// | ***** maintenance history ***** *
// +=====================================================================
// | *
// | Proj/Task# Who When Desc.
// +=====================================================================
// +-------------------------------------------------------------------+
// | File Declaration
// +-------------------------------------------------------------------+
Ctl-opt dftactgrp(*no);
// +-------------------------------------------------------------------+
// | Entry Parm, Data Structure, Stand Alone Field Def,Proc Def.n
// +-------------------------------------------------------------------+
// Copy Book
/copy CGIDEVLIB/qrpglesrc,hspecs
/copy CGIDEVLIB/qrpglesrc,hspecsbnd
/copy CGIDEVLIB/qrpglesrc,prototypeb
/copy CGIDEVLIB/qrpglesrc,usec
/copy CGIDEVLIB/qrpglesrc,variables3
// Stand Alone Fields Definition
Dcl-c PGMPATH Const('cgidevlibp');
Dcl-s LNAM Char(8);
Dcl-s STREET Char(13);
Dcl-s CITY Char(6);
Dcl-s STATE Char(2);
/copy CGIDEVLIB/qrpglesrc,prolog3
// +-------------------------------------------------------------------+
// | Main Module
// +-------------------------------------------------------------------+
// Write qualified job name to debug file. The *on
// parameter forces output even if debugging is off.
// Remove this parameter or change it to *off if you
// want the output only if debugging is on.
wrtjobdbg(*on);
// Ask the service program to load into memory
// the HTML member CGISAPBIL
// from IFS Folder /Cgidevlib/html/
gethtmlifs('/CGIDEVLIB/HTML/datatbltst.HTML');
// issue section "top"
wrtsection('top');
// issue section "tabh"
wrtsection('tabh');
// Display table detail
Exsr $Display_File;
// Send the response html buffer and exit
// End the HTML
wrtsection('end');
// Do not delete the call to wrtsection with section name *fini.
// It is needed to ensure that all output html that has been buffered
// gets output.
wrtsection('*fini');
return;
// +----------------------------------------------------------------+
// | $Display_File;
// +----------------------------------------------------------------+
Begsr $Display_File;
//Select SAP Billing records
Exec sql
Declare C1 Cursor For
Select LSTNAM, STREET, CITY, STATE
From QIWS/QCUSTCDT;
//Open the cursor
Exec Sql Open C1;
// Read the cursor
Exec sql Fetch C1 into :LNAM, :STREET,
:CITY, :STATE;
Dow Sqlcode = *zeros;
updHTMLvar('LSTNAM':LNAM:'0');
updHTMLvar('STREET':STREET);
updHTMLvar('CITY':CITY);
updHTMLvar('STATE':STATE);
wrtsection('tabd');
// Read Next record
Exec sql Fetch C1 into :LNAM, :STREET,
:CITY, :STATE;
Enddo;
// Close the cursor
Exec sql Close C1;
// write the end of the table
wrtsection('tabe');
Endsr;
As an Amazon Associate we earn from qualifying purchases.
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.