I need to update a 12 characters field starting from position 6 to 9 with '0000' using interactive SQL.
First I need to check if the 12 character field starting from position 6 to 12 is blank then update this field from start position 6 with 0000.
Before MYFLD = '12345 '
After MYFLD = '123450000 '
Something like this
UPDATE MYLIB/MFFILE SET myFLD = substr(myFLD,6,4) ='0000'
where myFLD = substr(myFLD,6,8) =' '