View previous topic :: View next topic
|
Author |
Message |
prasanth_bs
New User
Joined: 08 Aug 2005 Posts: 9
|
|
|
|
My input file is of the following order
Code:
Code: |
0001|abc |1234
0002|abncd |1235
0003|abdn |4567
|
My output Files needs to be like
Code:
Code: |
0001|abc|1234
0002|abncd|1235
0003|abdn|4567
|
ie, I want to trim all the spaces in the column2.
Can I do using Rexx ultility.
** SuperK ** I edited the post to include the CODE tags as an example of why they are extremely valuable ** |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
use STRIP builtin in column 2 (or SPACE builtin to the whole... it depends on what you want). |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
prasanth_bs, you do realize that your before and after examples look exactly the same, both here and in your other posts? You need to use the CODE BBCode tags around your data so that all the spacing and formatting is preserved. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
IMHO they don't look the same
0003|abdn |4567
0003|abdn|4567
anyway it's a good advice to use tags. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
SPACE will suppress all spaces in all columns:
Code: |
LINEOUT = SPACE(LINEIN,0) |
If you want to limit the change to column 2 only, do:
Code: |
PARSE VAR LINEIN COL1 '|' COL2 '|' COL3
LINEOUT = COL1'|'SPACE(COL2,0)'|'COL3 |
|
|
Back to top |
|
|
|