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 ' <ed: removed extra blanks>
After MYFLD = '123450000 '
Something like this UPDATE MYLIB/MFFILE SET myFLD = substr(myFLD,6,4) ='0000'
where myFLD = substr(myFLD,6,8) =' '
This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact