![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm a total programming infant and need some help to administer a D3 Windows database. I'd like to take a particular field in 2000 records (a get-list) in our customer file and delete the data in that particular field. We don't have a test server so before I do something irreversible I wonder if somebody could look at this program and comment. There may be an easier was to do this but this is what I came up with. I have compiled it so it least the syntax works. Thanks for your help. :ED MODS CM-FIELD-FIX top 001 * DELETE DATA IN SINGLE FIELD IN CM 002 OPEN 'CUSTOMER*GC' TO CM ELSE STOP 003 EXECUTE 'GET-LIST J' 004 EOF=0 005 LOOP 006 READNEXT ID ELSE EOF = 1 007 UNTIL EOF DO 008 READ CM.REC FROM CM,ID THEN 009 * CM.REC<49> = '' 010 * WRITE CM.REC ON CM,ID 011 END 012 REPEAT |
#3
| |||
| |||
|
|
I'd change line 8 to be : 008 READU CM.REC FROM CM,ID THEN |
|
If you want to test, just make a copy of the file, change program accordingly & give it a rip |
|
003 EXECUTE 'GET-LIST J' |
#4
| |||
| |||
|
|
On Jul 17, 10:39 pm, Joe Renaud<j... (AT) goadco (DOT) com> wrote: 008 READ CM.REC FROM CM,ID THEN 009 CM.REC<49> = '' 010 WRITE CM.REC ON CM,ID 011 END Could avoid a program entirely with an editor prestore, |
#5
| |||
| |||
|
|
Could avoid a program entirely with an editor prestore, but this should work fine :-) |
#6
| |||
| |||
|
|
"Ross Ferris" wrote |
|
Vendors could include a *'stuffit' *utility for this sort of job, or we could whip up an industry standard 'stuffit' and start leaving it behind on each server we consult on... |
|
MODIFY TEST.FILE ZIP = '12345' |
#7
| |||
| |||
|
|
"Ross Ferris" wrote Could avoid a program entirely with an editor prestore, but this should work fine :-) I really hate how much time we spend writing throw-away code. Vendors could include a 'stuffit' utility for this sort of job, or we could whip up an industry standard 'stuffit' and start leaving it behind on each server we consult on... It's not rocket science, and just a trivial coding exercise. |
![]() |
| Thread Tools | |
| Display Modes | |
| |