HP3000-L Archives

October 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dave Waroff <[log in to unmask]>
Reply To:
Dave Waroff <[log in to unmask]>
Date:
Fri, 18 Oct 2002 17:43:35 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
That's what I'd do. Look from the end back for space and use
reference modification to move the parts into a single field.

> -----Original Message-----
> From: Rao, Raghu [mailto:[log in to unmask]]
> Sent: Friday, October 18, 2002 4:12 PM
> To: [log in to unmask]
> Subject: COBOL : Removing trailing spaces ?
>
>
> Hi all,
>
> I am having 2 fields WS-FIRSTNAME and WS-LASTNAME. The data
> in them contains
> "JOE              " and "SMITH               "
>
> How do I get my final output to be "JOE SMITH" ?
>
> Any suggestions through INSPECT or EXAMINE or REPLACE SPACES
> BY NULLS, etc ?
> ? ? I don't want to use any loop to search each and every
> field position for
> spaces or anything like that..
>
> The data in these 2 fields is left justified but can contain
> any names and
> may not always look like the example provided above. It can
> also contain
> special names like "JOE SR.          " or JOE III           "
>
> Thanks
> Raghu.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2