I am new to CloverETL and am working with a major software application that has CloverETL embedded in it. I am trying to set up a graph that reads a flat file and transforms the phone number. It comes in as a 10 digit number, but needs to separate the Area Code and the Phone Number into two separate fields. There are three phone numbers and they may not all have data. So I am trying do use an IF statement. The Transform component tells me that the IF is not declared. Is there something I have to do in order to get the IF to work. Here is my code. Any help would be greatly appreciated.
//#TL
// Transforms input record into output record.
function transform() {
If (NOT isnull $0.primPhoneNum)
$0.primAreaCode := (substring($0.primPhoneNum,1,3))
$0.primPhoneNum := (substring($0.primPhoneNum,4,10));
If (NOT isnull $0.secPhoneNum)
$0.secAreaCode := (substring($0.secPhoneNum,1,3))
$0.secPhoneNum := (substring($0.secPhoneNum,4,10));
If (NOT isnull $0.terPhoneNum)
$0.terAreaCode := (substring($0.terPhoneNum,1,3))
$0.terPhoneNum := (substring($0.terPhoneNum,4,10));
}