Searching and replacing texts creatively in IBM Business Process Manager V7.5 and WebSphere Lombardi Edition V7.2
MarkFilley 27000392R8 Visits (8880)
There are times when Ninja like skills are needed for text search and replace. One example is the instance deletion script. For WebSphere Lombardi Edition V7.2 and IBM Business Process Manager (BPM) V7.5, stored procedures are the options. For BPM 8.0.1 and later, you will want to use the BPMP
Have your list of instances in a text file in Notepad++. Here, all the instances are in a line.
By turning on the hidden characters with the paragraph symbol (). We can see the hidden characters are CRLF. This translates to \r\n in the text searching.
Use the search and replace function to find the line breaks \r\n and replace them with a non-number character like $ Click on the Extended button below. Then Replace All.
Now all the numbers are on the same line with a special delimiter. Now replace this with part of the SQL statement. We will want to leave the `$` so we the last replacement can be the line breaks again. Search for the $ and replace with `);$call LSW_
Now that we have the right syntax, we need to remove the $ and replace it with line breaks.
The end result looks like this. Now only the first and last entries need manual additions. The list of commands can now be given to the DBA to review and run.
This is a quick and easy way to convert a list of numbers for a SQL stored procedure call. The same type of pattern can be done if the text file had commas.