Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
RPGIV Edit Code List
has no ratings.
Published: 21 Jul 2015
Revised: 24 Aug 2015 - 1682 days ago
Last viewed on: 30 Mar 2020 (3317 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

RPGIV Edit Code List Published by: Bob Cozzi on 21 Jul 2015 view comments

These are the primary Edit Codes available to RPG IV on IBM i

SQL Query File for Web/Mobile is used here to generate this Scroll Table containing RPG IV Edit Codes. You can also output the data directly as JSON if you prefer.

About this example...

To create this example, I embedded an SQL Query File for Web statement that retrieved the rather lengthy SQL SELECT statement and processed it, and then returned the complete scrolling Table HTML to the browser.

The SQL Statement uses the example EDITCODES table created in this blog entry. The SQL SELECT query statement was a bit long, but is standard SQL that could be run on any platform.

SQL Query File for web allows you to run any SQL SELECT statement from your web pages and receive the results as either HTML (as is the case here) or in JSON format. It is so easy to use, and no additional software is required.

I embedded the original EDITCODES table's SQL SELECT statement below, but to obscure it from viewers, I've placed it into a source file member and referenced it instead of directly embeddeding the SELECT statement--but the results are the same.

This is the simplest way to build a web element with your data. Just tell SQL Query File the type of output you want and then pass in the SQL SELECT statement and you get your data in that format. You can use it with JQUERY, pure JavaScript, HTML, Dojo, Ruby and any JSON-aware JavaScript library. You may even embedded an App/Excel header so that it opens Excel from a Webpage for our users. It's so easy and reliable that you'll think it's part of the operating system, only better.

When Zero
Examples 1
Examples 2
Examples 3
1 Yes Yes Yes Yes 1,234.50 .00 1,000.00
2 Yes Yes 1,234.50 1,000.00
3 Yes Yes Yes 1234.50 .00 1000.00
4 Yes 1234.50 1000.00
A Yes Yes CR Yes Yes 1,234.50 .00 1,000.00CR
B Yes CR Yes 1,234.50 1,000.00CR
C Yes CR Yes Yes 1234.50 .00 1000.00CR
D CR Yes 1234.50 1000.00CR
J Yes Yes Right Yes Yes 1,234.50 .00 1,000.00-
K Yes Right Yes 1,234.50 1,000.00-
L Yes Right Yes Yes 1234.50 .00 1000.00-
M Right Yes 1234.50 1000.00-
N Yes Yes Left Yes Yes 1,234.50 .00 -1,000.00
O Yes Left Yes 1,234.50 -1,000.00
P Yes Left Yes Yes 1234.50 .00 -1000.00
Q Left Yes 1234.50 -1000.00
X Embed Yes 0123450 0000000 010000}

Return to midrangenews.com home page.
Sort Ascend | Descend