I believe its because you cannot update part of a field
Try
 UPDATE MYLIB/MFFILE  SET myFLD = substr(myFLD,1,5)|| '0000    '
 where substr(myFLD,6,8) ='    '
The character || is concatenation. NOTE there are 4 blanks after the 4 0's
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxxxxx
P:(631) 244-2000 ext. 5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
                                                                       
             "Shaheen Ahmed"                                           
             <Syed.Ahmed@usamo                                         
             bility.com>                                                To
             Sent by:                  "Midrange Systems Technical     
             midrange-l-bounce         Discussion"                     
             s@xxxxxxxxxxxx            <midrange-l@xxxxxxxxxxxx>       
                                                                        cc
                                                                       
             06/26/2008 01:28                                      Subject
             PM                        RE: Need help with SQL SET      
                                       statement                       
                                                                       
             Please respond to                                         
             Midrange Systems                                          
                 Technical                                             
                Discussion                                             
             <midrange-l@midra                                         
                 nge.com>                                              
                                                                       
                                                                       
Roger,
 UPDATE MYLIB/MFFILE  SET substr(myFLD,6,4) ='0000'
 where substr(myFLD,6,8) ='    '
This is not working. Got error message "Token ( was not valid. Valid
tokens: =. "
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Reger, Bill
Sent: Thursday, June 26, 2008 12:10 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Need help with SQL SET statement
 UPDATE MYLIB/MFFILE  SET substr(myFLD,6,4) ='0000'
 where substr(myFLD,6,8) ='    '
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at 
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at 
http://archive.midrange.com/midrange-l.
 
As an Amazon Associate we earn from qualifying purchases.