Clarion 3.1 CREATE file probs... 
Author Message
 Clarion 3.1 CREATE file probs...

We are experiencing some problems when creating a file in Clarion 3.1 =
(version 3.101 & 3.102).  We have take out the small chunk of code to =
test it. Here is the file structure and example code we are testing it =
with..........

!=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D! FILE =
STRUCTURE for ranking by cart and gift
!=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
PERSNAME    STRING('F:\DIST\PERSFILE         ')
PERSFILE    =
FILE,NAME(PERSNAME),PRE(PER),CREATE,RECLAIM,DRIVER('CLARION')
BY_CART_KEY  KEY(PER:HANDCODE,PER:CART,PER:GIFT),DUP
RECORD        RECORD
GIFT                   DECIMAL(5,0)
CART                  DECIMAL(3,0)
CUBENO             DECIMAL(3,0)
ORDERNO        GROUP
BATCH               STRING(5)
SEQ                   STRING(4)
SPLIT                 STRING(2)
                        .
NEWORD         GROUP,OVER(ORDERNO)
CCODE              STRING(3)
CDIGIT               STRING(1)
CSEQ                 STRING(7)
                        .
HANDCODE           STRING(1)           !Either Y, Handwritten - E, =
engraved
SPECINS               STRING(1)
IMPRINT                STRING(1)           !Imprint indicator for =
personalization
PULL                     SHORT
IMPDATA1A           STRING(30)
IMPDATA1B           STRING(30)
                    .  .
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
TEST     PROGRAM
     INCLUDE('R:\MFLD\PGM3\PERSFILE.CLI')

  CODE

  CREATE(PERSFILE)
  IF ERROR()
     STOP('Create Error: ' & ERRORCODE())
  .
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Take note of the key, HANDCODE is the first field.  When we run this =
simple program and look at it in scanner and view the contents of the =
key this is the result......

                       FILE,RECLAIM,CREATE
BY_CART_KEY  KEY(PER:IMPDATA1A,PER:CART,PER:GIFT),DUP
RECORD        RECORD,PRE(PER)
** the rest of the fields are shown as the copybook **

The first key field is not what it should be (should be PER:HANDCODE). =
We can't figure out how this field is taking place of the key field that =
is supposed to be there.  YET I RAN THIS SAME PROGRAM IN CLARION 2.110 =
AND WHEN LOOKING IN SCANNER IT IS FINE. =20

This program has been in clarion 3.1 since the start and it did not have =
this problem!  I ran the last two updates for clarion (to 3.101 and to =
3.102). I don't know if it is one of these updates or what.  WE are =
quite perplexed by the whole scenario.  The CREATE statement in 3.1 =
isn't creating the file in respect to the copy book that structures the =
file. That is what we have it narrowed down to.

Also if we run filer on the data file and re-build it, the key is then =
corrected until you run the program again. =20

If anyone has any information to help us out it would be GREATLY =
appreciated !!!
Thanks.....

Clint Carbaugh
Programmer/Analyst
Figi's Inc,  Marshfield, WI
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D



Fri, 25 Jun 1999 03:00:00 GMT  
 Clarion 3.1 CREATE file probs...

Hello!


Date: 6 Jan 1997 03:12:58 -0400

Quote:
> We are experiencing some problems when creating a file in Clarion 3.1
> (version 3.101 & 3.102).  We have take out the small chunk of code to
> test it. Here is the file structure and example code we are testing it >

with..........

Quote:
> !=======================================================================
> ! FILE STRUCTURE for ranking by cart and gift
> !=======================================================================
> PERSNAME    STRING('F:\DIST\PERSFILE         ')
> PERSFILE    FILE,NAME(PERSNAME),PRE(PER),CREATE,RECLAIM,DRIVER('CLARION')
> BY_CART_KEY  KEY(PER:HANDCODE,PER:CART,PER:GIFT),DUP
> RECORD        RECORD
> GIFT           DECIMAL(5,0)
> CART           DECIMAL(3,0)
> CUBENO         DECIMAL(3,0)
> ORDERNO        GROUP
> BATCH            STRING(5)
> SEQ              STRING(4)
> SPLIT            STRING(2)
>                .
> NEWORD         GROUP,OVER(ORDERNO)
> CCODE            STRING(3)
> CDIGIT           STRING(1)
> CSEQ             STRING(7)
>                .
> HANDCODE       STRING(1)       !Either Y, Handwritten - E, engraved
> SPECINS        STRING(1)
> IMPRINT        STRING(1)       !Imprint indicator for personalization
> PULL           SHORT
> IMPDATA1A      STRING(30)
> IMPDATA1B      STRING(30)

            .  .

You need to move OVERlayed GROUP (NEWORD) to the end of the record
layout. It is a bug in the Clarion driver but from my view point it
has been evoked by the hole in the Clarion file header's structure.

Also, never use overlayed field as key components.

Alexey Solovjev




Sat, 26 Jun 1999 03:00:00 GMT  
 Clarion 3.1 CREATE file probs...

Clint,

Quote:
>We are experiencing some problems when creating a file in Clarion 3.1 =
>(version 3.101 & 3.102).  We have take out the small chunk of code to =
>test it. Here is the file structure and example code we are testing it =
>with..........

I don't use Clarion3, but I think I might have spotted something. Try
putting the file prefix into the GROUP,OVER(ORDERNO), such that:

NEWORD         GROUP,OVER(PER:ORDERNO)
CCODE              STRING(3)
CDIGIT               STRING(1)
CSEQ                 STRING(7)
                        .
It's possible that you might have another variable (either file or
memory) with the same name but different size, thereby confusing the
key file structuring.

Just a thought
--
Steve Greenwood
HiCaliber Software



Sun, 27 Jun 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Clarion 3.1 .hlp Files

2. Using the Top Speed file driver in Clarion for DOS 3.1 -Reply

3. Using the Top Speed file driver in Clarion for DOS 3.1

4. Clarion 2.1 LEM under Clarion 3.1 for DOS

5. Create a DDF File from Pervasive SQL since a clarion dictionnary ( DCT File)

6. How Create Browse + Form, alike C 3.1 child screen

7. Clarion for DOS (3.1)Help!

8. Clarion 3.1 Dos Mouse Question

9. Clarion DOS 3.1 and Pentium III, W98

10. Converting Clarion DOS 3.1 to Windows

11. Clarion in Win 3.1 in Linux?

12. Floating Point Error - Clarion For DOS 3.1

 

 
Powered by phpBB® Forum Software