Go Back
5 Votes

fconvert - allow a clear option


Coming Soon

Right now, when using fconvert to unload and load files, you need to add a step to use ISLOAD to clear the file.  It would be great if fconvert supported clearing an isam file or a "load with clear" option.  Often, fconvert is used for quick maintenance of data where you want to re-load without creating a brand new file.  If load with clear is not possible, then I would like to see an output option that would use the existing file's ipar info to create the new file.

 

6 Comments | Posted by Gary Hoffmann to Synergy DBMS on 12/17/2018 1:24 PM
Jack Ford
I support this suggestion highly!   Often there is a desire to clear an ISAM file and reload from sequential data; the old ISLOAD utility worked great for a simple, quick fix.  However, on a remote desktop (terminal server)  that utility wants to interact with a console or some unknown I/O channel and becomes an orphaned process when invoked in that environment.   Adding a clear to fconvert would be SO handy.

2/14/2019 5:22 PM   0  
Deborah Dube
Hi,
The second option already exists in fconvert, the command below creates a new empty isam file from the ipar file definition and loads the new file with data in the .txt file.

fconvert -sv -it e:\src\UOM.txt -oif e:\c10\tg\CGS\UOM.DAT -d E:\c10\tg\CGS\UOM.PAR
 

2/22/2019 2:19 AM   0  
Gary Hoffmann
Hi Deb - this is true, if the par file already exists, otherwise you have to create the par file with yet another command.  Having a "clear" option doesn't require that step, nor would being able to have fconvert use the existing ISAM file to auto-create the par file.  RIght now, no matter what, there is an extra step - either clearing the file with ISLOAD or having to IPAR the file.  My hope is that at some point, fconvert will have these things built in. 

My initial desire of a clear option is because in the field, often, I have to fconvert a file into a text file, edit one little piece of it and reload the file.  Oops - can't reload the file without either IPARing and sending to a new file or ISLOAD->clear the file first.

While it's not a huge deal for me, I do know that every time I have to go through this, I use some "colorful" language as this would be so easy to add to fconvert - it's a simple call to isclr (or it's equivalent C routine) before loading the file.

 

2/22/2019 12:45 PM   0  
Phillip Bratt
Adding an isutl -c option to clear which should cover the requirement needed here.

4/10/2019 3:19 PM   1  
Gary Hoffmann
Possibly - if it's a separate command that needs to run, it doesn't really solve it, it just changes which command you have to run separately.  It's a far cry better than having to use isload to clear the file as it's a command-line oriented command, but it will still be another command in the middle if fconvert can't do it by itself as part of the -o/-a command.

For example, fconvert -it some_text_file.txt -aic some_isam_file.ism (where -aic is add, isam, clear before adding)
 

4/12/2019 9:53 AM   0  
Jack Ford
I didn't pay attention to Phillip that it was going into isutl instead of fconvert, but I'll take it.  I would prefer fconvert, since the clear is related to the data loading and related operations, instead of isutl - which is more maintenance oriented, but that's not a show stopper at all for me.

My approach isn't so much that it has to be in a single command/operation as a jointly executing option (which would be icing on the cake - I agree with Gary), but I want to be able to clear the ISAM file without having to go through ISLOAD.  In any event, this is welcome progress. 
 

4/12/2019 10:01 PM   0  
Please log in to comment on this idea.