|
>Date: Tue, 07 Mar 2000 15:21:04 EST >From: "bill totz" <robsurge@hotmail.com> > ... >The name field is a 40 byte field formatted "LAST SUR/FIRST MID/" > >I basically just want 4 fields back containing the first middle last and >surname(if present). > ... Divide and conquer. Write a subprocedure that takes a string and a delimiter and outputs 2 strings. Have it return true if it found exactly one or two parts, false otherwise. Once you have that procedure, you can call it like this: C eval ok = splitString (namefield : '/' : part1 : part2) C if ok C eval ok = splitString (part1 + ' ' : ' ' : last : sur) C if ok C eval ok = splitString (part2 + ' ' : ' ' : first : middle) C endif C endif C if not ok C ... indicate the name needs special handling by humans C endif Barbara Morris +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.