The UNIX and Linux Forums  

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


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to make a script run for a maximum of "x" number of hours only ScriptDummy Shell Programming and Scripting 7 10-23-2007 06:51 AM
Maximum input file size in "Diff" Command Neeraja UNIX for Dummies Questions & Answers 1 01-17-2007 06:09 AM
Line with maximum no . of characters mohapatra Shell Programming and Scripting 4 10-11-2006 10:31 PM
How to REMOVE USER that display error --> "Name is too long" mgonzal AIX 1 06-27-2005 01:47 PM
What is the Maximum number of characters that i can store in a variable? pcshan UNIX for Advanced & Expert Users 9 08-11-2004 02:25 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-06-2008
Registered User
 

Join Date: Dec 2007
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
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
  #2 (permalink)  
Old 02-06-2008
Moderator
 

Join Date: Dec 2003
Location: /ksh93
Posts: 756
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
In general, the answer is no. You need to redesign your script.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101