Posted: Tue Apr 03, 2007 10:30 am Post subject: Can we replace a set of characters in a file using sort
hi,
I have a file of length 200 bytes; we have packed data at 90-100 cols.
Is there anyway to space-out the characters (from 1-89, 101-200, leave the packed data which is at 90-100 bytes) which are not in set of pre-defined chars (like !"%$''" etc..,) ?
I tried with a program, cost is really high !! can anyone suggest an alternative ?? _________________ -kr
I meant a little different., "I'll be replacing only if not in set of pre-defined chars (like !"%$''" etc..,), if its in there, write the original character.." more or less like ALTSEQ..but negation.. _________________ -kr
Kolusu, currently this is the way i'm following, but included almost 170 hex val's to be converted to spaces.
since, in this case, the data is retrieved from a other than mainframe platform, so good chances that there can be characters other than the one's which you listed above.
I thought finding the way, which will replace all the chars to spaces (except the one's which are on the list)..
Pls. let me know if you find some.
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Tue Apr 03, 2007 12:11 pm Post subject:
how large is this file? This is pretty easy to do in Rexx with a small translate() trick to create the translate table. The basics of the trick are shown from another exec:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum