|
Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
rpg400-l-request@xxxxxxxxxxxx
You can reach the person managing the list at
rpg400-l-owner@xxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of RPG400-L digest..."
*** NOTE: When replying to this digest message, PLEASE remove all text
unrelated to your reply and change the subject line so it is meaningful.
Today's Topics:
1. Re: Reasons for using RPGIV (Hockchai Lim)
2. RE: Reasons for using RPGIV (Monnier, Gary)
3. Re: Reasons for using RPGIV (sjl)
4. RE: Reasons for using RPGIV (DeLong, Eric)
5. RE: Reasons for using RPGIV (Monnier, Gary)
----------------------------------------------------------------------
message: 1
date: Thu, 14 Apr 2011 15:50:58 -0500
from: "Hockchai Lim" <lim.hock-chai@xxxxxxxxxxxxxxx>
subject: Re: Reasons for using RPGIV
Most will probably disagree but this is from expriences:
I think your best option is try not to get into a head to head battle with
her about how bad RPG400 is and how super duper RPGIV is. My guess is that
every compelling reasons you come up with will likely to get shut down.
The
best approach for me seems to be to agree with her that RPG400 should
remain
as one of the primary focus. But the shop should not ban RPGIV or free
form. This will allow growth and not letting shop get too behind on RPG
release. Crack open a little bit will go a long way.
Here are some example on how you can get shut down easily:
1) Local variable ==>
Why do we need that. It is confusing especially some developers create
mutilple local variables with same name.
2) if else indent ==>
We can use STRSRCHLT to indent the RPG400 source easily. You can't even
use
STRSRCHLT on free form. If developer does not indent in free form
correctly, it ends up a mess.
3) Prototype ==>
You meant to tell me that everytime I need to call an external program,
I've
to declare the prototype. What a pain.
4) Long field name ==>
Why would you want such long field name. Most of us already know short
file
field name by heart. Mixing long a short will just create confusion.
. . . .
"sjl" <sjl_abc@xxxxxxxxxxx> wrote in message
news:mailman.38471.1302645343.2702.rpg400-l@xxxxxxxxxxxx...
I am involved in a philosophical argument with one of the lead developersthe
in
the JDE/Oracle V5R4 shop where I have been working as a consultant for
last five years.code
If I understand her correctly, her argument is that as a JDE shop that we
should NOT be using RPGIV at all, and that we should be writing /all/
in RPG/400. I don't necessarily disagree, in the case of simple mods tofree-form
an
existing JDE program, but I would argue that /all/ new development should
be
done in free-form RPGIV.
Background:
We currently have a mixture of OPM and RPGIV code.
Some of the RPGIV is programs that have simply been run through CVTRPGSRC
to
convert them to fixed-form ILE source, other RPGIV code includes several
including entire sub-systems which have been written entirely in
RPGIV utilizing service programs and binding source.
Other than hitting the RPG/400 compiler limits on the number of arrays,
tables, and files (which necessitates converting the program to RPGIV in
order for it to compile successfully), she wants me to present five
compelling reasons to justify the use of RPGIV, particularly free-form
RPGIV
code.
Any thoughts? I need ammunition!
- sjl
------------------------------
message: 2
date: Thu, 14 Apr 2011 17:06:47 -0400
from: "Monnier, Gary" <Gary.Monnier@xxxxxxxxx>
subject: RE: Reasons for using RPGIV
Another thing to keep in mind is "The customer is always right. At
least until they change their mind."
Gary
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hockchai Lim
Sent: Thursday, April 14, 2011 1:51 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Reasons for using RPGIV
Most will probably disagree but this is from expriences:
I think your best option is try not to get into a head to head battle
with
her about how bad RPG400 is and how super duper RPGIV is. My guess is
that
every compelling reasons you come up with will likely to get shut down.
The
best approach for me seems to be to agree with her that RPG400 should
remain
as one of the primary focus. But the shop should not ban RPGIV or free
form. This will allow growth and not letting shop get too behind on RPG
release. Crack open a little bit will go a long way.
Here are some example on how you can get shut down easily:
1) Local variable ==>
Why do we need that. It is confusing especially some developers create
mutilple local variables with same name.
2) if else indent ==>
We can use STRSRCHLT to indent the RPG400 source easily. You can't even
use
STRSRCHLT on free form. If developer does not indent in free form
correctly, it ends up a mess.
3) Prototype ==>
You meant to tell me that everytime I need to call an external program,
I've
to declare the prototype. What a pain.
4) Long field name ==>
Why would you want such long field name. Most of us already know short
file
field name by heart. Mixing long a short will just create confusion.
. . . .
"sjl" <sjl_abc@xxxxxxxxxxx> wrote in message
news:mailman.38471.1302645343.2702.rpg400-l@xxxxxxxxxxxx...
I am involved in a philosophical argument with one of the leaddevelopers
inthe
the JDE/Oracle V5R4 shop where I have been working as a consultant for
last five years.we
If I understand her correctly, her argument is that as a JDE shop that
should NOT be using RPGIV at all, and that we should be writing /all/code
in RPG/400. I don't necessarily disagree, in the case of simple modsto
anshould
existing JDE program, but I would argue that /all/ new development
beCVTRPGSRC
done in free-form RPGIV.
Background:
We currently have a mixture of OPM and RPGIV code.
Some of the RPGIV is programs that have simply been run through
toseveral
convert them to fixed-form ILE source, other RPGIV code includes
including entire sub-systems which have been written entirely infree-form
RPGIV utilizing service programs and binding source.arrays,
Other than hitting the RPG/400 compiler limits on the number of
tables, and files (which necessitates converting the program to RPGIVin
order for it to compile successfully), she wants me to present five
compelling reasons to justify the use of RPGIV, particularly free-form
RPGIV
code.
Any thoughts? I need ammunition!
- sjl
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
------------------------------
message: 3
date: Thu, 14 Apr 2011 16:55:50 -0500
from: "sjl" <sjl_abc@xxxxxxxxxxx>
subject: Re: Reasons for using RPGIV
Here is what I have come up with so far - see below...
- sjl
RPGIV versus RPG/400 (V5R4M0)
April 14, 2011
Subprocedures and prototypes
o Code isolation
* local variables
* Simplifies program changes and testing
* Lowers coupling between modules (a good thing)
o Simplifies program coding when using service programs (which contain
reusable subprocedures)
* Enhances productivity though code re-use
o Binding source makes it possible to add new subprocedures
to existing service programs without having to
recompile all programs which use the service program.
* Mixed programming language support by allowing modules
written in different ILE languages to be bound into a
single program object
* Performance improvement when using bound programs
o Prototypes can reduce the errors caused by coding
program/subprocedure calls incorrectly.
One of the most common sources of difficult-to-debug errors
comes from having mismatched parameters between the
caller and the called routine.
Free-Form code
o Procedural language
o Easier to read (English-like)
o Blank lines allowed
o Longer comments permitted in-line with the RPG code
o Mixed case permitted
o Easier to maintain
o Easier to learn than fixed-format RPG
o More resembles modern programming languages
o Native ability to parse XML documents
* XML-INTO
* XML-SAX
File handling
o Unlimited number of files can be defined in a program
o RPGIV allows renaming all fields within a record format
at the file level with one line of code
Examples:
Prefix( AA : 2 ) changes the current field prefix to 'AA',
thus SDDOCO becomes AADOCO
Prefix(AA) prepends 'AA' to the existing field names,
thus SDDOCO becomes AASDDOCO
o User-opened files can be overridden to other files with
EXTFILE keyword, eliminating the need to use
OVRDBF before calling the program
Data Structures
o Unlimited number of data structures can be defined
o RPGIV allows renaming all fields within a externally-defined
data structure with one line of code
Example: Prefix( AA : 2 )
o By using Prefix('XX') to rename fields within a data structure,
ability to define an multiple external data structures over the
same file without errors caused by duplicate field names
in the data structures.
o Qualified data structures make code more readable.
o Key data structures
* LikeRec (see PDC4701A)
o Read a record from a file directly into a data structure
* LikeRec (see PDC4701A)
o Write a record to a file directly from a data structure
* LikeRec (see PDC4701A)
o Except for the DSTXT data structure, it is unnecessary
to specify From & To positions for subfields -
only subfield lengths need to be specified
o LikeDS allows defining new data structures
the same as existing data structures
o Overlay keyword simplifies overlaying fields within a data structure
* Overlay an array over data structure subfields
* Data structure arrays can be sorted
* Data structure arrays can be sorted by a sub-field
Variables
o Underscore character permitted in variable names
o Long variable names allowed (up to 4096 characters in length)
* Self-documenting
o Longer variables (up to 65535 characters)
o More data types allowed
* Pointer support
o INZ keyword allows work field initialization in D-specs
o On D-spec field definition, LIKE keyword allows defining
fields similar to existing fields
(similar to *LIKE DEFN in RPG/400)
o Indicators
* Named Indicators make code easier to read
* Less dependence on indicators - an RPGIV program
can usually be written without using /any/ indicators
Access to iSeries / System i / IBM i operating system resources
o Ability to use C run-time library functions
* Simplifies executing CL commands from within RPG programs
* Ability to directly manipulate (read, write, update) stream files
in the IFS (and QNTC or NFS) from RPG programs
o Access to System API's and MI built-in functions
o Access to Java Functions (See existing program Pxxxxxx)
RPGIV allows recursion
New Operation Codes
o EVAL
o EVALR
o CALLP
o CALLB
o XML-INTO (free-form only)
o XML-SAX (free-form only)
RPGIV Built-In Functions (BIF's)
(approximately 90 currently available)
o Date-and-time functions
o Data conversion and string-handling functions are
easier to read and understand, simplify coding
* %SUBST
* %REPLACE
* %TRIM
* %EDITC
* %CHAR
* %DEC
* %ADDR
Expressions
o Ability to specify complex mathematical expressions in a single line of
code
o Logical expressions easier to understand
Examples:
If %EOF ( FILE ); {used for READ operations}
If %EQUAL ( FILE ); {used for SETLL operations}
If %FOUND( FILE ); {used for CHAIN operations}
o Character expressions
Example:
Message = 'File ' + FileName + ' not found';
Arrays/Tables
o Unlimited number of Arrays and Tables
o Enhanced array and table handling
* More elements
* Longer elements
* Multidimensional arrays
Better exception and error handling capabilities
o MONITOR - ENDMON operation codes
o Operation extenders reduce (eliminate) dependence on
indicators for detecting errors, making code easier to
read and maintain
Example:
READ(E) FILE;
If %Error();
// do something
EndIf;
------------------------------
message: 4
date: Thu, 14 Apr 2011 22:07:49 +0000
from: "DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
subject: RE: Reasons for using RPGIV
Ask her to write in RPGIII a web based UI for her applications... You do
yours in RPGIV with CGIDEV2... First one done wins!
If she doesn't like the WEB UI approach, then challenge her to something
REALLY easy like writing data to a streamfile, or reading data directly out
of a network shared folder... Ask her to explain all the advantages that
RPGIII gives her over RPGIV...
If none of that gives her a clue, I'd suggest replacing her windows PC with
DOS, since she has no need of anything ever produced since ILE and RPGIV was
introduced in 1994...
-Eric DeLong
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of sjl
Sent: Tuesday, April 12, 2011 4:55 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Reasons for using RPGIV
I am involved in a philosophical argument with one of the lead developers
in
the JDE/Oracle V5R4 shop where I have been working as a consultant for the
last five years.
If I understand her correctly, her argument is that as a JDE shop that we
should NOT be using RPGIV at all, and that we should be writing /all/ code
in RPG/400. I don't necessarily disagree, in the case of simple mods to an
existing JDE program, but I would argue that /all/ new development should
be
done in free-form RPGIV.
Background:
We currently have a mixture of OPM and RPGIV code.
Some of the RPGIV is programs that have simply been run through CVTRPGSRC
to
convert them to fixed-form ILE source, other RPGIV code includes several
including entire sub-systems which have been written entirely in free-form
RPGIV utilizing service programs and binding source.
Other than hitting the RPG/400 compiler limits on the number of arrays,
tables, and files (which necessitates converting the program to RPGIV in
order for it to compile successfully), she wants me to present five
compelling reasons to justify the use of RPGIV, particularly free-form
RPGIV
code.
Any thoughts? I need ammunition!
- sjl
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
------------------------------
message: 5
date: Thu, 14 Apr 2011 18:09:38 -0400
from: "Monnier, Gary" <Gary.Monnier@xxxxxxxxx>
subject: RE: Reasons for using RPGIV
As has been suggested by myself (my first 2 items implied it) and others
- Don't do it. Don't argue. Let it come of its own accord.
Gary
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of sjl
Sent: Thursday, April 14, 2011 2:56 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Reasons for using RPGIV
Here is what I have come up with so far - see below...
- sjl
RPGIV versus RPG/400 (V5R4M0)
April 14, 2011
Subprocedures and prototypes
o Code isolation
* local variables
* Simplifies program changes and testing
* Lowers coupling between modules (a good thing)
o Simplifies program coding when using service programs (which contain
reusable subprocedures)
* Enhances productivity though code re-use
o Binding source makes it possible to add new subprocedures
to existing service programs without having to
recompile all programs which use the service program.
* Mixed programming language support by allowing modules
written in different ILE languages to be bound into a
single program object
* Performance improvement when using bound programs
o Prototypes can reduce the errors caused by coding
program/subprocedure calls incorrectly.
One of the most common sources of difficult-to-debug errors
comes from having mismatched parameters between the
caller and the called routine.
Free-Form code
o Procedural language
o Easier to read (English-like)
o Blank lines allowed
o Longer comments permitted in-line with the RPG code
o Mixed case permitted
o Easier to maintain
o Easier to learn than fixed-format RPG
o More resembles modern programming languages
o Native ability to parse XML documents
* XML-INTO
* XML-SAX
File handling
o Unlimited number of files can be defined in a program
o RPGIV allows renaming all fields within a record format
at the file level with one line of code
Examples:
Prefix( AA : 2 ) changes the current field prefix to 'AA',
thus SDDOCO becomes AADOCO
Prefix(AA) prepends 'AA' to the existing field names,
thus SDDOCO becomes AASDDOCO
o User-opened files can be overridden to other files with
EXTFILE keyword, eliminating the need to use
OVRDBF before calling the program
Data Structures
o Unlimited number of data structures can be defined
o RPGIV allows renaming all fields within a externally-defined
data structure with one line of code
Example: Prefix( AA : 2 )
o By using Prefix('XX') to rename fields within a data structure,
ability to define an multiple external data structures over the
same file without errors caused by duplicate field names
in the data structures.
o Qualified data structures make code more readable.
o Key data structures
* LikeRec (see PDC4701A)
o Read a record from a file directly into a data structure
* LikeRec (see PDC4701A)
o Write a record to a file directly from a data structure
* LikeRec (see PDC4701A)
o Except for the DSTXT data structure, it is unnecessary
to specify From & To positions for subfields -
only subfield lengths need to be specified
o LikeDS allows defining new data structures
the same as existing data structures
o Overlay keyword simplifies overlaying fields within a data structure
* Overlay an array over data structure subfields
* Data structure arrays can be sorted
* Data structure arrays can be sorted by a sub-field
Variables
o Underscore character permitted in variable names
o Long variable names allowed (up to 4096 characters in length)
* Self-documenting
o Longer variables (up to 65535 characters)
o More data types allowed
* Pointer support
o INZ keyword allows work field initialization in D-specs
o On D-spec field definition, LIKE keyword allows defining
fields similar to existing fields
(similar to *LIKE DEFN in RPG/400)
o Indicators
* Named Indicators make code easier to read
* Less dependence on indicators - an RPGIV program
can usually be written without using /any/ indicators
Access to iSeries / System i / IBM i operating system resources
o Ability to use C run-time library functions
* Simplifies executing CL commands from within RPG programs
* Ability to directly manipulate (read, write, update) stream files
in the IFS (and QNTC or NFS) from RPG programs
o Access to System API's and MI built-in functions
o Access to Java Functions (See existing program Pxxxxxx)
RPGIV allows recursion
New Operation Codes
o EVAL
o EVALR
o CALLP
o CALLB
o XML-INTO (free-form only)
o XML-SAX (free-form only)
RPGIV Built-In Functions (BIF's)
(approximately 90 currently available)
o Date-and-time functions
o Data conversion and string-handling functions are
easier to read and understand, simplify coding
* %SUBST
* %REPLACE
* %TRIM
* %EDITC
* %CHAR
* %DEC
* %ADDR
Expressions
o Ability to specify complex mathematical expressions in a single
line of
code
o Logical expressions easier to understand
Examples:
If %EOF ( FILE ); {used for READ operations}
If %EQUAL ( FILE ); {used for SETLL operations}
If %FOUND( FILE ); {used for CHAIN operations}
o Character expressions
Example:
Message = 'File ' + FileName + ' not found';
Arrays/Tables
o Unlimited number of Arrays and Tables
o Enhanced array and table handling
* More elements
* Longer elements
* Multidimensional arrays
Better exception and error handling capabilities
o MONITOR - ENDMON operation codes
o Operation extenders reduce (eliminate) dependence on
indicators for detecting errors, making code easier to
read and maintain
Example:
READ(E) FILE;
If %Error();
// do something
EndIf;
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
------------------------------
--
This is the RPG programming on the IBM i / System i (RPG400-L) digest list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
End of RPG400-L Digest, Vol 10, Issue 282
*****************************************
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.