Friday, December 19, 2008

Find and Replace (FINDREP)

It does the same thing as its name suggests. It find the given piece of string and replaces it with another string given by you.

As a simple example, you could use the following INREC statement to replace all instances of 'Goodbye' in your input records with 'Bye', shift the bytes after the replaced constants to the left, and pad on the right with blanks.

INREC FINDREP=(IN=C'Goodbye',OUT=C'Bye')

If you had 60 byte input records like this:
*"Goodbye John"*"Goodbye William"*"Goodbye Goodboy"*
"Goodbye Michael""Good Dog""Goodbye Goodbye"

You would get 60-byte output records like this:
*"Bye John"*"Bye William"*"Bye Goodboy"*
"Bye Michael""Good Dog""Bye Bye"

For detailed reference on FINDREP and other new ICETOOL functions, Click Here.

Please do provide your comment or reactions.

1 comment:

  1. Bet365 - JCM Hub
    Bet365.com is one of the most popular bookmakers 인천광역 출장안마 in 사천 출장안마 the world. They have been around for 논산 출장마사지 over 20 years and provide an exceptional betting service 제주 출장마사지 and 김포 출장안마

    ReplyDelete