string to long error 
Author Message
 string to long error

I am using a query to write text to a file in fixed field format.  I pad
and cat. all the columns together w/ "+" when I run the query I get an
error that the string is to long.  If I don't cat. all the columns together
I get intra column spacing.

Is there a way to specify inta-column spacingn as 0?

Any other Ideas?

I am attempting to use set relation,scan... and low level file operations
and am not having much luck.  SQL is much more straight forward.

Joe

SELECT ;                        && Trailer Record length 300
        '$$'+;                  && Record ID
        padl(count(*),6,'0')+ ; && Total Number of 'AC' & 'AD' Records
        padl(count(*),6,'0')+ ; && Total Number of 'AC' Records
        padl('0',6,'0')+ ;              && Total Number of 'AD' Records
        padl(' ',280,' ') ;             && Filler
FROM ;
        visit a, ;
        cntrlsht b, ;
        renlist c ;
WHERE ;
        a.air_id = 'QS' ;
        and a.cntrlsht_id = b.cntrlsht_id ;
        and b.shop_id = c.shop ;
        and
between(b.wk_end,ctod(thisform.text1.value),ctod(thisform.text2.value)) ;
        and a.freq_id is not null ;
GROUP BY;
        air_id;        
INTO FILE &Copytemp



Tue, 25 Dec 2001 03:00:00 GMT  
 string to long error
Joe,

Have you tried using SQL to create the appropriate structure and then using
COPY TO ... TYPE SDF to create the desired output file?

Regards,
  Dan



Quote:

> I am using a query to write text to a file in fixed field format.  I pad
> and cat. all the columns together w/ "+" when I run the query I get an
> error that the string is to long.  If I don't cat. all the columns
together
> I get intra column spacing.

> Is there a way to specify inta-column spacingn as 0?

> Any other Ideas?

> I am attempting to use set relation,scan... and low level file operations
> and am not having much luck.  SQL is much more straight forward.

> Joe

> SELECT ; && Trailer Record length 300
> '$$'+; && Record ID
>   padl(count(*),6,'0')+ ; && Total Number of 'AC' & 'AD' Records
>   padl(count(*),6,'0')+ ; && Total Number of 'AC' Records
>   padl('0',6,'0')+ ; && Total Number of 'AD' Records
>   padl(' ',280,' ') ; && Filler
> FROM ;
> visit a, ;
> cntrlsht b, ;
> renlist c ;
> WHERE ;
> a.air_id = 'QS' ;
> and a.cntrlsht_id = b.cntrlsht_id ;
> and b.shop_id = c.shop ;
> and
> between(b.wk_end,ctod(thisform.text1.value),ctod(thisform.text2.value)) ;
> and a.freq_id is not null ;
> GROUP BY;
> air_id;
> INTO FILE &Copytemp



Wed, 26 Dec 2001 03:00:00 GMT  
 string to long error
Joe,

You shouldn't need to perform any concatenation when using the COPY TO
command with the TYPE SDF clause. Also, there shouldn't be an issue with
intra-column spacing. Once you have the desired data in a table or a cursor,
just issue the COPY TO command with the TYPE SDF clause.

Please see the online help for a description of the COPY TO command along
with several examples.

Regards,
  Dan

Quote:
----- Original Message -----


Sent: Monday, July 12, 1999 9:45 AM
Subject: Re: string to long error

> Yes, that is actually exactly how I am doing it.  I have written about 20
> exports this way and they work.  This one is 300char/line and the length
> seems to be the problem if you cat the columns together.   If I don't cat
> the columns together the field lengths are thrown off if I cat them I get
> the string to long error.
> In Oracle throgh SQLPlus you can specify that the intra-column spacing
> should be zero spaces.  I was looking for that feature in VFP.
> At this point, I am working on performing the export using the VPF
language
> and low level file functions.

> Joe




- Show quoted text -

Quote:
> Joe,

> Have you tried using SQL to create the appropriate structure and then
using
> COPY TO ... TYPE SDF to create the desired output file?

> Regards,
>   Dan



> > I am using a query to write text to a file in fixed field format.  I pad
> > and cat. all the columns together w/ "+" when I run the query I get an
> > error that the string is to long.  If I don't cat. all the columns
> together
> > I get intra column spacing.

> > Is there a way to specify inta-column spacingn as 0?

> > Any other Ideas?

> > I am attempting to use set relation,scan... and low level file
operations
> > and am not having much luck.  SQL is much more straight forward.

> > Joe

> > SELECT ; && Trailer Record length 300
> > '$$'+; && Record ID
> >   padl(count(*),6,'0')+ ; && Total Number of 'AC' & 'AD' Records
> >   padl(count(*),6,'0')+ ; && Total Number of 'AC' Records
> >   padl('0',6,'0')+ ; && Total Number of 'AD' Records
> >   padl(' ',280,' ') ; && Filler
> > FROM ;
> > visit a, ;
> > cntrlsht b, ;
> > renlist c ;
> > WHERE ;
> > a.air_id = 'QS' ;
> > and a.cntrlsht_id = b.cntrlsht_id ;
> > and b.shop_id = c.shop ;
> > and
> > between(b.wk_end,ctod(thisform.text1.value),ctod(thisform.text2.value))
;
> > and a.freq_id is not null ;
> > GROUP BY;
> > air_id;
> > INTO FILE &Copytemp



Fri, 28 Dec 2001 03:00:00 GMT  
 string to long error
Yes, that is actually exactly how I am doing it.  I have written about 20
exports this way and they work.  This one is 300char/line and the length
seems to be the problem if you cat the columns together.   If I don't cat
the columns together the field lengths are thrown off if I cat them I get
the string to long error.
In Oracle throgh SQLPlus you can specify that the intra-column spacing
should be zero spaces.  I was looking for that feature in VFP.
At this point, I am working on performing the export using the VPF language
and low level file functions.

Joe



Quote:
> Joe,

> Have you tried using SQL to create the appropriate structure and then
using
> COPY TO ... TYPE SDF to create the desired output file?

> Regards,
>   Dan



> > I am using a query to write text to a file in fixed field format.  I
pad
> > and cat. all the columns together w/ "+" when I run the query I get an
> > error that the string is to long.  If I don't cat. all the columns
> together
> > I get intra column spacing.

> > Is there a way to specify inta-column spacingn as 0?

> > Any other Ideas?

> > I am attempting to use set relation,scan... and low level file
operations
> > and am not having much luck.  SQL is much more straight forward.

> > Joe



Sat, 29 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Long, long character string

2. STRTRAN() to fix ASCII: Error 1903: String is too long to fit

3. Error 1903 - String Is Too Long To Fit

4. Help: String to Long to fit!

5. String too long in PICTURE "@M"

6. ?? long strings?

7. Beware the String Too Long To Fit

8. Long string problems

9. String for Pass Through command too long

10. Help Anyone (who has experience processing Long Ascii Strings)

11. Long macro command string

12. how long can a string be ?

 

 
Powered by phpBB® Forum Software