× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Well, we are trying to keep the code as similar to the original as possible
and believe it or not, the majority of the calculation functions work as is.
The biggest hurdle has been the character vs. numeric in the same spot on
what is now a procedure call.  The original code would do something like:

Window read xxx0000n otw #rc = 88;

We have converted the WINDOW keyword to a procedure, and it now reads as:

Window(read:'xxx0000n');
If otw;
  #rc = 88;
Endif;

(otw was a error handling catch otherwise).

But they could also have:

Window scroll field arrayname element index;

That is now:

Window(scroll:field:arrayname:element:%char(index));

The read, scroll, field, element are named constants in the converted.  When
the receiving procedure get the data it looks at the first parameter to
determine what to do with the remainder of the parameters.  Since this sent
in a number in parameter 5, the receiving procedure coverts it back to a
number via %dec to become the array index.  We are doing this conversion
with programs (we call filters) to progressively modify the code to fit the
model of free form ILE RPG.  So minimal change to the actual code is a
requirement for us.....

Hope that explains.


Ross Hartford
Cothern Computer Systems, Inc.
1640 Lelia Drive, Suite 200
Jackson, MS  39216

Phone:     601-718-0803
Fax:       601-969-1184
Support:   888-222-5577

email:     rossh@xxxxxxxxxxx
website:   www.ccslink.com
 
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Tom Liotta
Sent: Thursday, June 10, 2004 4:57 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Prototyping for either character or numeric

rpg400-l-request@xxxxxxxxxxxx wrote:

>   6. RE: Prototyping for either character or numeric (Ross Hartford)
>
>We are converting code from another language to RPG free form.  Some of the
>old language functions could either pass a character or numeric depending
on
>what the first parameter (function) is.  So depending on the first
>parameter, I know what to expect after that.  As Bob mentioned, sadly
>there's no way to perform the same type of function.....

Ross:

I guess I'm not understanding. Why can't you pass back a /copy DS that has
numeric and character subfields all defined beginning at position 1? Then,
always pass the DS.

Personally, I'd go with passing the address of whatever variable you want to
pass in and simply handle it via the prototype. You mentioned not wanting to
get so involved as to do that, but alternatives are bound to be more
complex.

Tom Liotta


-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
Introducing the New Netscape Internet Service. 
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need. 

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
--
This is the RPG programming on the AS400 / iSeries (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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.