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

CPD 2.1 / Memo Fields / Conversion

16 views
Skip to first unread message

C. Bensinger

unread,
Sep 6, 2002, 2:43:23 PM9/6/02
to
I'm aware that the CCVT file for CPD 2.1 doesn't convert the memo
fields. It seems that the accepted work around is to write a small
program to write them out to another file. However, my question is
this. The memo fields in question (there are 3 files, each has a memo
field around 550 chars) are bigger than a string can hold (255 chars).
Anybody have a suggestion as to how to deal with that?

Thanks,

C. Bensinger
cbens...@hotmail.com

John Smith

unread,
Sep 6, 2002, 3:31:51 PM9/6/02
to
CString
"C. Bensinger" <cbens...@hotmail.com> wrote in message
news:e7d5f09b.02090...@posting.google.com...

Jim Cockfield

unread,
Sep 7, 2002, 2:34:42 AM9/7/02
to
What are you trying to convert to?

CCVT in CPD2.1 is used for converting to dBaseII, dBaseIII, DIF, or Basic
formats.

If you are staying with roughly the same file structure (simply adding
fields and/or keys to an existing clarion file), use CFIL.EXE to convert the
files ... it will handle the memo field also.

If you're doing something more complicated than CFILE.EXE can handle, then
you'll need to write a program.

Look at the file structures for the files you need to convert. You will see
a MEMO statement in each file (right under where the keys are declared,
before the record structure starts).

For example:

COMMENTS MEMO(480)

Then, look below the file structure, and you'll see a GROUP declared to
support the memo. For example:

GROUP,OVER(CLL:COMMENTS)
CLL_MEMO_ROW STRING(40),DIM(12) !array referenced by programs
.

Internally, you'll see that the programs access the memo by referencing the
array to display/add/edit the memo field's contents. In the example above,
the application used 6 rows of 40 characters each to make up one 480
character memo that you would see on screen. You'll find something similiar
in your existing 2.1 apps.

To simply convert the file by writing a program, you don't need to worry
about the GROUP structure that the application is referencing to edit the
memo (it's declared outside of the file structure and not needed to move
memo contents from one file to another). You can simply move the contents
from one memo to another (NEW:COMMENTS = OLD:COMMENTS) within your program
loop, provided you use CPD2.1 and the file type remains Clarion 2.1.

I'll send you a sample conversion program via e-mail. If you need more
assistance, send me the old and new file structures, and I'll write a quick
program for you (I'm bored, which is why I'm looking at this news group for
the first time in a long while tonight).

Best Wishes...

Jim Cockfield


"C. Bensinger" <cbens...@hotmail.com> wrote in message
news:e7d5f09b.02090...@posting.google.com...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/02


Jim Cockfield

unread,
Sep 7, 2002, 2:41:32 AM9/7/02
to
Correction -- make that 12 rows of 40 characters each --- it's 2:40AM and
I've been up for a LONG TIME.... Hitting the sack... Best Wishes.

Jim C.

"Jim Cockfield" <jcock...@attbi.com> wrote in message
news:66he9.30003$Jo.1311@rwcrnsc53...

C. Bensinger

unread,
Sep 7, 2002, 5:44:21 PM9/7/02
to
I was initially going to convert it to "basic" so that I'd be able to
pull the data into something like Excel and/or use Crystal against the
resulting csv file. I can access the data via the Report Writer but
for the output we need report writer really isn't going to suffice.

Thanks for your assistance.

C. Bensinger

"Jim Cockfield" <jcock...@attbi.com> wrote in message news:<wche9.30057$Jo.1030@rwcrnsc53>...

C. Bensinger

unread,
Sep 7, 2002, 5:49:14 PM9/7/02
to
To followup here's one of the file layouts in question. The
application in question was written with Clarion 3 -- I'm more
familiar with 2.1 but we currently still have both versions here. I
saw somebody else mention Cstring which I don't believe is available
in 2.1; but perhaps it is in 3 -- I'll have to see if they still have
the manuals for 3.

Again thanks to all for the assistance it's greatly appreciated.


CallNote File,Pre(CNo),Create,Reclaim,Driver('Clarion')
Number_Key Key(CNo:Number,CNo:NoteDate,CNo:NoteTime), NoCase
Comments Memo(532)
Record Record
Number Long
NoteDate Long
NoteTime Long
NoteEnd Long
Tech Long
. .
CNo:Notes String(76),Dim(7),Over(CNo:Comments)


C. Bensinger

0 new messages