Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
RPGIV Edit Code List
has no ratings.
Published: 21 Jul 2015
Revised: 24 Aug 2015 - 3161 days ago
Last viewed on: 16 Apr 2024 (5364 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.

17 records retrieved.
Edit
Code
Print
Commas
Print
Decimal
Point
Negative
Sign
Zero
Supress
Print
Blanks
When Zero
Examples 1
Packed(7,2)
1234.50
Examples 2
Packed(7,2)
0.00
Examples 3
Packed(7,2)
-1000.00
1YesYesYesYes1,234.50.001,000.00
2YesYes1,234.501,000.00
3YesYesYes1234.50.001000.00
4Yes1234.501000.00
AYesYesCRYesYes1,234.50.001,000.00CR
BYesCRYes1,234.501,000.00CR
CYesCRYesYes1234.50.001000.00CR
DCRYes1234.501000.00CR
JYesYesRightYesYes1,234.50.001,000.00-
KYesRightYes1,234.501,000.00-
LYesRightYesYes1234.50.001000.00-
MRightYes1234.501000.00-
NYesYesLeftYesYes1,234.50.00-1,000.00
OYesLeftYes1,234.50-1,000.00
PYesLeftYesYes1234.50.00-1000.00
QLeftYes1234.50-1000.00
XEmbedYes01234500000000010000}

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

COMMENTS