Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Dec 21, 2010 6:09 pm Post subject:
relaxing,
Your Second select statement does not make any sense, you are selecting the records validating the contents at pos 1 for 14 bytes and pos 128 for 18 bytes. But when writing out you are picking the contents from pos 15 for 14 bytes. Is that what you really want?
And You can simplify your code with the following. I am just showing you the first select statement. Always test for positive conditions instead of negative conditions. You only want to pick records other than records which have H, U, E and X , so use them in OMIT condition. Since you are interested in picking just the contents from pos 15 and padding the rest with spaces , we actually trim down the input to just 14 bytes and sort it.
Kolusu, thanks for pointing out..I was concentration on the first and did not look at the second - but I noticed once I had fixed the first issue. Sorry for the confusion..
And thanks for the additional comments. I will introduce OMIT as you suggested.
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