|
The simplest way to do this in Cobol would be to build an array the size of your longest string - move the value into the array then process the array varying the subscript from the maximum down by one and move the variables into another array whenever a non blank value is found. If I had a little more time today, I would throw together an example - if you do not get a better suggestion and would like to see an example of what I mean let me know. John Arnold (301) 354-2939 jarnold@xxxxxxxxxxxxx -----Original Message----- From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of cobol400-l-request@xxxxxxxxxxxx Sent: Thursday, August 17, 2006 1:00 PM To: cobol400-l@xxxxxxxxxxxx Subject: COBOL400-L Digest, Vol 4, Issue 79 Send COBOL400-L mailing list submissions to cobol400-l@xxxxxxxxxxxx To subscribe or unsubscribe via the World Wide Web, visit http://lists.midrange.com/mailman/listinfo/cobol400-l or, via email, send a message with subject or body 'help' to cobol400-l-request@xxxxxxxxxxxx You can reach the person managing the list at cobol400-l-owner@xxxxxxxxxxxx When replying, please edit your Subject line so it is more specific than "Re: Contents of COBOL400-L digest..." Today's Topics: 1. String Reverse (Alagiri rethinavelu) 2. Re: String Reverse (wlau@xxxxxxxxxxx) 3. Re: String Reverse (Alagiri rethinavelu) ---------------------------------------------------------------------- message: 1 date: Wed, 16 Aug 2006 13:39:02 -0400 from: "Alagiri rethinavelu" <alagiri.rethinavelu@xxxxxxxxx> subject: [COBOL400-L] String Reverse Hi Guys, Is there any ILE functions in COBOL to reverse a string or anyone can please let me know how to reverse a string in a COBOL program. For example if the String value ="APPLE" , then I want the result as "ELPPA". Thanks in advance, Alex. ------------------------------ message: 2 date: Wed, 16 Aug 2006 14:19:22 -0400 (EDT) from: wlau@xxxxxxxxxxx subject: Re: [COBOL400-L] String Reverse How about ILE intrinsic function REVERSE?
Hi Guys, Is there any ILE functions in COBOL to reverse a string or anyone can please let me know how to reverse a string in a COBOL program. For example if
the
String value ="APPLE" , then I want the result as "ELPPA". Thanks in advance, Alex. -- This is the COBOL Programming on the iSeries/AS400 (COBOL400-L)
mailing
list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/cobol400-l or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.
------------------------------ message: 3 date: Wed, 16 Aug 2006 16:57:50 -0400 from: "Alagiri rethinavelu" <alagiri.rethinavelu@xxxxxxxxx> subject: Re: [COBOL400-L] String Reverse That works good. Thanks. On 8/16/06, wlau@xxxxxxxxxxx <wlau@xxxxxxxxxxx> wrote:
How about ILE intrinsic function REVERSE?Hi Guys, Is there any ILE functions in COBOL to reverse a string or anyone
can
please let me know how to reverse a string in a COBOL program. For example
if
theString value ="APPLE" , then I want the result as "ELPPA". Thanks in advance, Alex. -- This is the COBOL Programming on the iSeries/AS400 (COBOL400-L)
mailing
list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/cobol400-l or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.-- This is the COBOL Programming on the iSeries/AS400 (COBOL400-L)
mailing
list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/cobol400-l or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.
------------------------------
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.