Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

learning clipper 5.3 - flexfile

420 views
Skip to first unread message

Alex Noseworthy

unread,
Feb 25, 2015, 2:09:55 PM2/25/15
to
Hey Folks,

I'm in the midst of a project and need to write a clipper program to access a legacy dbase system that we believe uses flexfiles. I've been corresponding with Brian over at grafxsoft and trying to get at least a basic program to compile properly. I am using Clipper 5.3 and FlexFileII. I've install clipper 5.3 and FlexFile II on to a Virtual Windows XP (32bit) system and am able to compile and run a basic 'hello world' program.

My issue comes in when I try to load and link the flexfile libraries. The code I'm using is as follows:

#include "FLEXFILE.ch"
#include "FLEXRDD.ch"

FUNCTION main
RDDSETDEFAULT("FLEXFILE")
V_SETCMP(CMP_LZ)
? "hello world!"
return( NIL )

this compiles properly but when using blinker I get the following

BLINKER : 1115 : TEST.OBJ(TEST) : 'FLEXFILE' : unresolved external
BLINKER : 1115 : TEST.OBJ(TEST) : 'V_SETCMD' : unresolved external

I have my environment variables setup as follows:

C:\PROG>echo %INCLUDE%
C:\CLIP53\INCLUDE;C:\FLEXFILE\INCLUDE

C:\PROG>echo %LIB%
C:\CLIP53\LIB;C:\FLEXFILE\LIB

C:\PROG>echo %PATH%
c:\CLIP53\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;

C:\PROG>echo %OBJ%
C:\CLIP53\OBJ;C:\FLEXFILE\OBJ


Any thoughts as to what might be going on?

Thanks for the help!
Alex

frank van nuffel

unread,
Feb 25, 2015, 2:16:15 PM2/25/15
to
Hi,

You need FF III for use with CA-Clipper 5.3(b) - or try to get the native
CA-Clipper 5.3(b) FF support without using standalone FF III product

Without FF III there is no support for compression though (stated in
CA-Clipper 5.3b patch readme)

I have all libs that are necessary, if you can explain what you need, i can
assemble a code skeleton

Frank

"Alex Noseworthy" <asheli...@gmail.com> schreef in bericht
news:77b4cece-4f69-41b7...@googlegroups.com...

dlzc

unread,
Feb 25, 2015, 2:18:31 PM2/25/15
to
Dear Alex Noseworthy:

On Wednesday, February 25, 2015 at 12:09:55 PM UTC-7, Alex Noseworthy wrote:
...
> My issue comes in when I try to load and link the
> flexfile libraries. The code I'm using is as follows:
>
> #include "FLEXFILE.ch"
> #include "FLEXRDD.ch"

request FLEXFILE && you have to tell the linker to include the RDD driver.

>
> FUNCTION main
> RDDSETDEFAULT("FLEXFILE")

... note that the linker does not parse strings at compile time, which is why you need the "request" above.
http://www.itlnet.net/programming/program/Reference/c53g01c/ng10da82.html

> V_SETCMP(CMP_LZ)
> ? "hello world!"
> return( NIL )
>
> this compiles properly but when using blinker I
> get the following

David A. Smith

Alex Noseworthy

unread,
Feb 26, 2015, 8:36:45 AM2/26/15
to
On Wednesday, February 25, 2015 at 3:46:15 PM UTC-3:30, frank van nuffel wrote:

> You need FF III for use with CA-Clipper 5.3(b) - or try to get the native
> CA-Clipper 5.3(b) FF support without using standalone FF III product
>
> Without FF III there is no support for compression though (stated in
> CA-Clipper 5.3b patch readme)

Hey Frank,

Thanks for the response. So what you're saying is that I'll need flexFile III not II in order to set a compression algorithm for reading the memo files?

What I'm trying to accomplish is read a legacy dbase with a memofield. I've been speaking with the folks at grafxsoft and we think we have it narrowed down to a compressed flexfile memofield. I need to read this database and output the contents to a file. Simple right :)

I'm an experienced programmer but clipper is brand new to me so any help is greatly appreciated.


frank van nuffel

unread,
Feb 26, 2015, 9:12:13 AM2/26/15
to
Hi Alex,

"Alex Noseworthy" <asheli...@gmail.com> schreef in bericht
news:4e6e0661-050b-445a...@googlegroups.com...
On Wednesday, February 25, 2015 at 3:46:15 PM UTC-3:30, frank van nuffel
wrote:

> You need FF III for use with CA-Clipper 5.3(b) - or try to get the native
> CA-Clipper 5.3(b) FF support without using standalone FF III product
>
> Without FF III there is no support for compression though (stated in
> CA-Clipper 5.3b patch readme)

Hey Frank,

> Thanks for the response. So what you're saying is that I'll need flexFile
> III not II in order to set a compression algorithm for reading the memo
> files?

When the .dbv file (or .fpt) shows "FlexFile3" among the first 64 bytes (or
so), then the data memo is in FF III format; in that case CA-Clipper 5.3(b)
can still read it (with the standard DBFCDX rdd), but if the data contained
is compressed, you will still need the standalone FF III upgrade, available
@grafxsoft (for reduced price, given you have a valid FF II license)

5.3 crashes when combining the II rdd (i tested it yesterday)

Another option is possible, using CA-Clipper 5.2 and FF II, but all depends
whether your .dbv is in II or III format; if it's in III format, with 5.2
you'll need FF III standalone again (it has a compatibility .lib for use
with 5.2)

BUT, if the .dbv is in II format (there isn't a FlexFile reference int the
first bytes), then with CA-Clipper 5.2 and FF II (which i understand you are
using), you can do everything, including compression reads and writes

In the latter scenario (CA-Clipper 5.2), your sample will compile and link,
no need to add REQUEST FLEXFILE in your source, as David suggested, for
#include "FLEXRDD.CH" takes care of that; but the only thing missing is

before or after RDDSETDEFAULT( ""FLEXFILE" )

V_SUPERRDD( "DBFCDX" ) // or "DBFNTX"

> What I'm trying to accomplish is read a legacy dbase with a memofield.
> I've been speaking with the folks at grafxsoft and we think we have it
> narrowed down to a compressed flexfile memofield. I need to read this
> database and output the contents to a file. Simple right :)

Your sample's next step is to traverse the .dbv exporting all memos to files
f.i. (there are other methods, later)

See if you can determine the FF version (could be II but this is not FoxPro
compatible, while III is) - we'll take it from there

Best regards,

Frank


frank van nuffel

unread,
Feb 26, 2015, 9:37:47 AM2/26/15
to
Better still, if you have the withgoing .dbf file, lookup the header of the
.dbf for the file type

http://msdn.microsoft.com/en-us/library/aa975386%28v=vs.71%29.aspx

There are other lists describing the file type hex numbers in the first two
positions .oO i googled for "dbf header"

Coming from a dBase app, the "FlexFile3" signature won't be in the
.dbv/.dbt/.fpt header (not enlisted won't reveal much, but it pbly is a
FoxPro compatible memo file; then again, FF III is required assuming
compression)

Frank

"frank van nuffel" schreef in bericht news:mcn9jq$ncf$1...@speranza.aioe.org...

Alex Noseworthy

unread,
Feb 26, 2015, 11:29:00 AM2/26/15
to
Based on that table the DBF is

0x83 FoxBASE+/dBASE III PLUS, with memo

viewing the DBT in a hex editor I can see that its using VoDBFNTX

I've also found the original make and link file which contains some more useful info...

Compiled via:

clipper $* -m -n -DCLIP52

Linked with

\b31\blinker @genplink

using libraries:
\clp52\lib\flex52, \clp52\lib\encrypt, \b31\lib\blxclp52, \clp52\lib\nanfor, \clp52\lib\extend, \clp52\lib\clipper, \clp52\lib\terminal, \clp52\lib\dbfntx

frank van nuffel

unread,
Feb 26, 2015, 11:39:48 AM2/26/15
to
There you have found your answer, Sherlock :-)

CA-Clipper 5.2(e) with FlexFile II (latest was 2.02 afaik)

But the encrypt.lib? Perhaps http://www.the-oasis.net has it .oO i don't
recall having encountered it (don't know what it is in the first place)

If you're stuck with CA-Clipper 5.3, and no compression was used (rather
encryption?), you might try:

REQUEST DBFMEMO, DBFNTX
MEMOSETSUPER( "DBFNTX" )
RDDSETDEFAULT( "DBFMEMO" )
USE ...
// and insert simple
varName := FIELD->MEMOFIELDNAME
// assignments (covered by the internal RDD)
// varName may need decryption (but you'll pbly need a password)

for linking, just enlist
LIB DBFMEMO, DBFNTX

You won't even need FF II (nor III) for that; standard 5.3 has a subset of
FF III built-in

See how this goes

Frank

"Alex Noseworthy" <asheli...@gmail.com> schreef in bericht
news:9b0a2f63-5b01-423c...@googlegroups.com...

Klas Engwall

unread,
Feb 26, 2015, 4:22:13 PM2/26/15
to
Hi Frank /Alex

> But the encrypt.lib? Perhaps http://www.the-oasis.net has it .oO i don't
> recall having encountered it (don't know what it is in the first place)

There is a list of "Clipper Tools and Their Producers" at
http://www.emsps.com/lists/clputilp.htm

That page has as an incredibly long list of old libs for Clipper,
including two called "Encrypt", one from Synergy Corp and one from Clay
Carley.

Whether that info is of any use in 2015 is a different question ...
Synergy is a pretty common company name. Searches for "Synergy" and
"Clay Carley" in the newsgroup archives returns nothing of interest. A
third search, for "encryption lib", gives a few results but none that
seem to reference lib files with that specific name.

Regards,
Klas

--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---

Alex Noseworthy

unread,
Mar 20, 2015, 1:12:50 PM3/20/15
to
Thanks all for the help I did manage to get this working, once the software versions were figured out it was pretty straight forward. I'm not sure I can post the source due to client restrictions but please feel free to contact me if you have questions.

Thanks again.
Alex

frank van nuffel

unread,
Mar 20, 2015, 2:00:52 PM3/20/15
to
Great!

Thanks for letting us know

Have a nice weekend

"Alex Noseworthy" <asheli...@gmail.com> schreef in bericht
news:07ad5142-b1d1-4265...@googlegroups.com...

vinay...@gmail.com

unread,
Mar 2, 2018, 1:47:42 AM3/2/18
to
Hi Alex, Need your help. Stuck in a similar problem. We have a requirement to migrate data from Dbase into SQL. The application that writes data is in clipper and has flexfile (dbv) file reference. We are using .Net native driver to read the dbt file but the corresponding memo fields fail to load. It loads as a empty string. Can you help me on this?

dlzc

unread,
Mar 2, 2018, 9:43:55 AM3/2/18
to
Dear vinay...:

On Thursday, March 1, 2018 at 11:47:42 PM UTC-7, vinay...@gmail.com wrote:
...
> Hi Alex, Need your help. Stuck in a similar problem.
> We have a requirement to migrate data from Dbase into
> SQL. The application that writes data is in clipper
> and has flexfile (dbv) file reference. We are using
> .Net native driver to read the dbt file but the
> corresponding memo fields fail to load. It loads as a
> empty string. Can you help me on this?

Why don't you ask on xHarbour or Harbour newsgroups? Not a lot of eyes still review this newsgroup.

http://www.tek-tips.com/viewthread.cfm?qid=254857
... easiest thing in the world to create a new Clipper app, open your flexfile DBV, and copy to a different, convertible file format that SQL CAN recognize. Just need to REQUEST the two RDDs before executable code.

David A. Smith

Alex Noseworthy

unread,
Mar 4, 2018, 5:52:52 AM3/4/18
to
I was able to resolve my issue with reading the flexFiles memo fields, but it was almost 3 years ago now and its not something I work with everyday. This was my first time working with clipper and it was also probably my last. Oh, the last gotcha (gotme) I had with the memo field was that it was also compressed and had to be decompressed before I was able to get the data out. Not sure if that helps but thats about all I can do for you with out digging into the issue myself.. You can post a reply and i'll see if I can dust off the cobwebs but I am far from a Clipper guro and like Dlzc said you might have better luck in another group.

Alex
0 new messages