Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Deleting Rows from an .ftm
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Deleting Rows from an .ftm
 Login/Join
 
Member
posted
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
 
Posts: 18 | Registered: May 22, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
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.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
You could try with OS Language(Batch for windows or Shell for Unix).


Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Reply With QuoteReport This Post
Master
posted Hide Post
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
 
Posts: 669 | Location: Veghel, The Netherlands | Registered: February 16, 2010Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 18 | Registered: May 22, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
Whats the format of the file ?

Can you give an example ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 18 | Registered: May 22, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
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...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Deleting Rows from an .ftm

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.