The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-06-2008
pooga17 pooga17 is offline
Registered User
 

Join Date: Dec 2007
Posts: 9
Unhappy help on ksh and sql..getting error as is too long. maximum size is 240 characters."

Hi,
In my script i am executing sql file and there are some variables in SQL files which are assigned at run time. one of the variable value is having more than 240 characters and at time of execution its getting failed with error as "is too long. maximum size is 240 characters."

variable**************
define maf_f=XXX','CMATMP','GMDF','GMDG','GMDINC','GMDSON','GMSINC','GMSMSF','GMSUPP','GMV3','GMVCFF','GMVC FR','GMVF','GMVFIT','GMVFXHGMVSTA','GMVG','GMVGH','GMVGV','GMVGVM','GMVINC','GMVMBLGMVBONGMVSTA','GM VSOHGMVSONGMVBONGMVSTA','GMVSONGMVBONGMVSTA','GMVSP','GMVSPHGMVSP','GMVTLHGMVTLMGMVBONGMVSTA','GMVTL MGMVBONGMVSTA','GMVXCF','GMVXCT','GMVXR','GMVXRFGMVXRA','INTVCF','INTVOC','SPFREE','S_1811','S_MØDE' ,'S_WAP;
string beginning "XXX','CMAT..."
is too long. maximum size is 240 characters.
*********************

And the value is getting assigned by ksh --- code is --

maf_f1=XXX
for i in `grep maf_f work_cdr.txt | awk '{print $4}' | sort -u`
do
maf_f1=$maf_f1"','"$i
done
****************************

I tried using split command by moving the data in temp file and then using &maf_feature1||&maf_feature2 at time of assigning varaible.

command used for splitting file :-
split -l 10 <file_name> segment

but the problem i am facing there are many variables and the segment file is getting overwritten..

Is there any way by which i can define the size of variable ... or any other method,,,

Please help on same
Thanks in advance,,,,
Pooja
Reply With Quote
Forum Sponsor