× 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.



Both are readable.

But onl;y if you had used the same sample code written in the two versions
of RPG, then you may have a point.
But a READ and WRITE to a SFL comparing with an API call using pointers is
an apple and a pear, ie not comparable.

(And to be honest: the logic of the ILE sample goes beyond my
understanding. If I read correctly the value of InOutLengthToString on the
return = 0)

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR ***********

On 24-6-2011 at 14:11 Alan Campin wrote:

You would want this!

C CLACC# CHAIN RCLOSS
81
C IF *IN81 =
*OFF
C EVAL WSAMT =
CLTLAM
C
ELSE
C EVAL WSAMT =
*ZEROS
C
ENDIF


C WRITE SELSF
WRITE SFL REC


C
ENDIF


C IF RRN =
10
C
LEAVE
C
ENDIF

vs this? Sorry that makes no sense.

If InOutLengthToString < InLengthFromString * 2;
ERRH_Throw('CPF9898' :
cCPFMessageFileName :
'To string must be at least twice as long as From string!');
EndIf;

ptriConv = g_OpenList(InHandle);

LengthFromString = InLengthFromString;
LengthToString = InOutLengthToString;
Result = iConvApi(iConv :
InPointerFromString:
LengthFromString :
InPointerToString :
LengthToString );
If Result = -1;
ERRH_Throw('CPF9898' :
cCPFMessageFileName :
'Conversion failed! See job log for reason!');
EndIf;

InOutLengthToString = InOutLengthToString - LengthToString;

Return;


On Fri, Jun 24, 2011 at 1:33 PM, James Lampert
<jamesl@xxxxxxxxxxxxxxxxx>wrote:

Alan Campin wrote:
No, I was just talking about ILE. My assumption would be if I were to
create
a modern package I would put one team on GUI in front end(Java, .net,
python, etc) and RPG in the backend but trying to find a programmer
who
would write modern RPG would be almost impossible. What possible value
would
there be in recreating the mess you have currently? Virtually
unmaintainable
code.

I don't see what their problem is. I always try to use the right tool
for the right job (I simply haven't found very many for which "/free" is
even remotely "The Right Tool"). I use modules. I use service programs.
I use mixed language. I call web services. And if The Cycle is "The
Right Tool," I use it (it's great for pre-populating a new field in a
file, based on some other file; it's also great for interactive
programs, with LR tied to F3.

I'd say there are probably as many RPG programmers who are afraid to
take a ride on The Cycle as there are who are afraid to use ILE
features. And that's sad.

--
JHHL



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.