I am trying to delete a number of records from an .ftm I’ve created based on a value in an individual field. My .mas is a FIX so there is no key associated with. I’ve tried SQL to delete these rows: SQL DELETE FROM [file] WHERE [field] = ‘_’ ; END I’ve heard about the MODIFY function to do this, but I don’t understand it and can’t get it to work, however I’d prefer to use SQL since that is how row are being entered with INSERT. Any suggestions would be appreciated.This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 7703
July 29, 2014, 05:34 PM
Waz
flat files cannot have records removed via SQL or MODIFY.
The best way would be to TABLE the file and filter the records into a new file.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
July 30, 2014, 03:58 AM
Ram Prasad E
You could try with OS Language(Batch for windows or Shell for Unix).
TABLE FILE whatever_ftm
PRINT fields
WHERE field NE '_'
ON TABLE HOLD AS whatever_ftm
END
Only I would put the records directly back in the same ftm.
G'luck
_____________________ WF: 8.0.0.9 > going 8.2.0.5
August 05, 2014, 12:01 PM
J.Biza
I was able to modify the file using TABLE file, but the data that still existed in the file was was changed because the data in the file was not formatted correctly. Do I need a ON TABLE HOLD AS whatever_ftm FORMAT some_format to keep the same formatting for the file?
WebFOCUS 7703
August 05, 2014, 05:58 PM
Waz
Whats the format of the file ?
Can you give an example ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
August 06, 2014, 09:13 AM
J.Biza
I hope this is providing the info you need. Here is the .mas.