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, PoryesThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.13
Mainframe all output (Report in mainframe)
May 31, 2010, 10:53 AM
Severus.snape
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
May 31, 2010, 05:40 PM
Waz
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.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!
June 01, 2010, 08:08 AM
Poryes
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)
June 01, 2010, 08:17 AM
Maintain Wizard
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
June 01, 2010, 08:21 AM
Tony A
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
June 02, 2010, 08:01 AM
Poryes
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 ENDThis message has been edited. Last edited by: Poryes,
WebFOCUS 7.6.13
Mainframe all output (Report in mainframe)
June 02, 2010, 08:55 AM
Maintain Wizard
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
June 02, 2010, 06:14 PM
Waz
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.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!
June 03, 2010, 08:13 AM
Poryes
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)
June 03, 2010, 05:51 PM
Waz
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.