Focal Point
[CLOSED] Insert Multiple Records into Existing Focus File

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1807024406

May 25, 2011, 02:43 PM
GJE
[CLOSED] Insert Multiple Records into Existing Focus File
I need to insert multiple records into an existing focus file. Does anyone have some simple code that can do that? Your help is greatly appreciated.

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


WebFOCUS 7.7.03
MS SQL Server
Windows, Excel
May 25, 2011, 03:02 PM
Don Garland
This might work

FILEDEF FILENAME DISK apppath/filename.ftm ( APPEND
May 25, 2011, 03:20 PM
Dan Satchell
If it is a FOCUS file, as opposed to a HOLD file, you will need to use MODIFY to insert records:

MODIFY FILE ...
 FREEFORM key1_name key2_name key3_name field1_name field2_name field3_name etc.
 MATCH key1_name key2_name key3_name etc.
  ON MATCH REJECT
  ON NOMATCH INCLUDE
 DATA
key1_value,key2_value,key3_value,field1_value,field2_value,field3_value,$
key1_value,key2_value,key3_value,field1_value,field2_value,field3_value,$
key1_value,key2_value,key3_value,field1_value,field2_value,field3_value,$
END



WebFOCUS 7.7.05
May 26, 2011, 01:30 PM
Maintain Wizard
If you want to use a Form to enter multiple rows, check out Maintain.
May 26, 2011, 08:13 PM
Waz
quote:
check out Maintain


If you have Developer Studio or a licence.


Dan's suggestion is the simplest way to go.


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!

May 31, 2011, 04:36 PM
GJE
Thanks for your help. I had to switch to a hotter task and have not been able to get back to this procedure. You can consider this topic closed. I will get back to this and will then try to use your suggestions.


WebFOCUS 7.7.03
MS SQL Server
Windows, Excel