koden Posted September 20, 2007 Report Share Posted September 20, 2007 I copy some text from a mainframe 3270 window. If i put it into a notepad, I can remove spaces as was it all typed. But if i put the same into t21 and then run TRIM T21 it does not remove spaces. Why that? Is the trim not for remove spaces?? Quote Link to comment Share on other sites More sharing options...
floyd Posted September 20, 2007 Report Share Posted September 20, 2007 The trim functions remove spaces from the ends and/or beginnings of strings, not anywhere in the middle. Quote Link to comment Share on other sites More sharing options...
koden Posted September 20, 2007 Author Report Share Posted September 20, 2007 Okay..thats why. Thanks.. maybe I should ask different. I have copyed this to clipboard: ---------------------------------------------------------------------- dghdsghdhjdhjd dsjhdhjdjhdhjdjh sjhdshjdhjdhjdhjdjk Objects XXX sdhjsdfjkdskjfhjd ashdgash sadjkashdjksdkajsld ----------------------------------------------------------------------- What I need is to FIND and get XXX into a variabel. XXX is a number from 1-999. Objects is a word that always exist in the copy text. How to do that?? Quote Link to comment Share on other sites More sharing options...
Cory Posted September 21, 2007 Report Share Posted September 21, 2007 I use the Set Integer to position of text in variable. Then add an offset to that number and the use the Copy Part of Text. So in your example I would get the position of “Objects” in the var, N1, then add 8 to get to the first X. Then Copy part of text T1 to T2 from position N1 and take 3 characters. Quote Link to comment Share on other sites More sharing options...
koden Posted September 21, 2007 Author Report Share Posted September 21, 2007 Works... Thanks :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.