Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Removing current data from Focus table

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Removing current data from Focus table
 Login/Join
 
Gold member
posted
Hello All-

There is a requirement to remove the personal information (Per1, Per2, Per3 and Per4) contained in the table.

The above four fields can be space filled to remove the current data that is in the fields.

Please can anyone suggest me the best way to perform the task.

Thanks in advance...

Best Regards,
Poryes

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Platinum Member
posted Hide Post
Hi,

You can try MODIFY for this...
something like this...

MODIFY FILE FName
FIXFORM FROM HOLD
MATCH KEYFLD
ON NOMATCH REJECT
ON MATCH UPDATE FLD1 FLD2..
DATA ON HOLD
END

the hold file should contain the flds in the table ...only replace the 4 flds you want to modify with computes which have blanks...

hope this helps

thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Expert
posted Hide Post
If the table is a single segment table, then TABLE all but the Per columns out, DEFINE empty ones, and then you can recreate the FOCUS DB and load it.

You could also NEXT through the table one record at a time and compute the fields to blank and update them.

Sashanka's method or this one will work, all depends on the data, number of records, etc.

As mentioned in this forum before, there are many ways to skin a FOCUS DB.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thanks Sashanka/Waz.

Yes, Its a single segment table.

Could you please elaborate more in detail.
Thanks in advance...


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Master
posted Hide Post
The MAINTAIN product was created to Update, Include and Delete data. In this case you could do:

MAINTAIN FILE filename
For all next KeyField into Stk
Compute i/i2=1;
Repeat Stk.FocCount
Compute Stk(i).Per1 = ' ';
Compute Stk(i).Per2 = ' ';
Compute Stk(i).Per3 = ' ';
Compute Stk(i).Per4 = ' ';
Compute i=i+1;
Endrepeat
For all Update Per1 Per2 Per3 Per4 from stk
END

That would do it.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Expert
posted Hide Post
quote:
The MAINTAIN product was created to Update, Include and Delete data.

True Mark, but folks should be aware that this requires a licence?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Mark,

I'm receiving the below error while using the MAINTAIN.

(FOC03601) ERROR AT OR NEAR LINE 5 IN PROCEDURE TESTFEX FOCEXEC *
(FOC03610) Per1 is not a field in (or member of) type _STK.

Below is the code I used.

MAINTAIN FILE Testfile
FOR ALL NEXT per1 per2 per3 per4 INTO STK
COMPUTE I/I2 =1;
REPEAT STK.FOCCOUNT
COMPUTE STK(I).Per1= ' ';
COMPUTE STK(I).Per2= ' ';
COMPUTE STK(I).Per3= ' ';
COMPUTE STK(I).Per4= ' ';
Compute i=i+1;
ENDREPEAT
END

This message has been edited. Last edited by: Poryes,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Master
posted Hide Post
Is Per1 the name of the field in our Master? Make sure the field names in the code exactly match the field names in the Master. Make sure the field names in the Master are in upper case. If you are still getting an error, post the Master File Description.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Expert
posted Hide Post
as Francis says, if you have a licence for Maintain, then go for it.

Otherwise, I would suggest using MODIFY.

e.g.
MODIFY FILE {Master}
NEXT {Key(s)}
ON NEXT COMPUTE {Field}=' ';
ON NEXT UPDATE {Field}
ON NONEXT REJECT
DATA
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thank you Mark/Waz.

Mark, I corrected the MF descrption and working fine with out issue.

Waz, Thanks for the alternate method.

I'm started learning how to approach the problems in different methods.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
Glad to help.

But trying not to sound repetitive, make sure you are licenced for Maintain. You wouldn't want IBI to do a site review and find your using something your not supposed to.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Removing current data from Focus table

Copyright © 1996-2020 Information Builders