You are not logged in.
Pages: 1
Hello all,
I'm having trouble with something that should be easy, hoping someone has a solution.
Our post outputs tool messages that look like this: (T217 CEM). I want to parse the "217" and the "CEM" from this string for setting two variables.
I can read through the string character by character but this is very cumbersome. Is there an easier way to do this?
Thank you.
Offline
Hi!
You have GetCommentString which can get the comments into a variable, for example in sin840d.ctl it is configured in "Start Of Block processing" with OT="CommentString".
Once the comment is read, "(T217 CEM)" in your case, you can the function INDEX to find "(" and ")" and " " then use the function SUBSTR with the INDEX's found with INDEX function
Mustapha
Offline
Pages: 1