![]() |
||||||||||||
Go ![]() | New ![]() | Search ![]() | Notify ![]() | Tools ![]() | Reply ![]() | ![]() |
Member |
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 | ||
|
Expert |
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...
| |||||||||||||||||||||||||||
|
Master |
You could try with OS Language(Batch for windows or Shell for Unix). Thanks, Ram | |||
|
Master |
Listen to Waz... 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 | |||
|
Member |
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 | |||
|
Expert |
Whats the format of the file ? Can you give an example ? Waz...
| |||||||||||||||||||||||||||
|
Member |
I hope this is providing the info you need. Here is the .mas. FILENAME=tk_comm_log_prod, SUFFIX=FIX , $ SEGMENT=SEG01, SEGTYPE=S0, $ FIELDNAME=TK_INIT, ALIAS=E01, USAGE=A3, ACTUAL=A3, MISSING=ON, $ FIELDNAME=DATE_ENT, ALIAS=E02, USAGE=YYMD, ACTUAL=DATE, MISSING=ON, $ FIELDNAME=TIME_ENT, ALIAS=E03, USAGE=A5, ACTUAL=A5, MISSING=ON, $ FIELDNAME=COM_CHAN, ALIAS=E04, USAGE=A15, ACTUAL=A15, MISSING=ON, $ FIELDNAME=REASON, ALIAS=E05, USAGE=A30, ACTUAL=A30, MISSING=ON, $ FIELDNAME=EMPL_ID, ALIAS=E06, USAGE=A7, ACTUAL=A7, MISSING=ON, $ FIELDNAME=NOTE, ALIAS=E07, USAGE=A1000, ACTUAL=A1000, MISSING=ON, $ FIELDNAME=TIMESTAMP, ALIAS=E08, USAGE=A19, ACTUAL=A19, MISSING=ON, $ When I created a hold file with a filter in the where clause, it saved the data in a weird format (appears like DB language). Let me know if you need more info. I'm not too good when it comes to the technical terminology. WebFOCUS 7703 | |||
|
Expert |
Does your code have ON TABLE HOLD AS {} only ? If so, and dates and numerics will be binary. If you add FORMAT ALPHA, the values will be readable. Waz...
| |||||||||||||||||||||||||||
|
Powered by Social Strata |
![]() | Please Wait. Your request is being processed... |
|