help on ksh and sql..getting error as is too long. maximum size is 240 characters."


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users help on ksh and sql..getting error as is too long. maximum size is 240 characters."
# 1  
Old 02-06-2008
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."

Code:
variable**************
define maf_f=XXX','CMATMP','GMDF','GMDG','GMDINC','GMDSON','GMSINC','GMSMSF','GMSUPP','GMV3','GMVCFF','GMVCFR','GMVF','GMVFIT','GMVFXHGMVSTA','GMVG','GMVGH','GMVGV','GMVGVM','GMVINC','GMVMBLGMVBONGMVSTA','GMVSOHGMVSONGMVBONGMVSTA','GMVSONGMVBONGMVSTA','GMVSP','GMVSPHGMVSP','GMVTLHGMVTLMGMVBONGMVSTA','GMVTLMGMVBONGMVSTA','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
# 2  
Old 02-06-2008
In general, the answer is no. You need to redesign your script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

How to avoid "Too many arguments" error, when passing a long String literal as input to a command?

Hi, I am using awk here. Inside an awk script, I have a variable which contains a very long XML data in string format (500kb). I want to pass this data (as argument) to curl command using system function. But getting Too many arguments error due to length of string data(payloadBlock). I... (4 Replies)
Discussion started by: cool.aquarian
4 Replies

3. UNIX for Advanced & Expert Users

Trace "free(): invalid next size (normal)" error on arm-linux board

Hi guys, i'm running a program on samsumg 6410 arm cpu board. it caused an "free(): invalid next size (normal)" fail. i try to use gdb for remote debugging: 1, start gdb server on board: gdbserver 192.168.1.20:1234 ./HostAP Process ./HostAP created; pid = 499 Listening on port... (8 Replies)
Discussion started by: ss1969
8 Replies

4. Shell Programming and Scripting

"Argument list too long" error

Hi everyone, I have a problem with my shell script. As a quick overview I need to change a template file 6561 times and copy the file into a new catalogue. Thanks to your forum I have managed to write a script to do so: #!/bin/sh template=$1 for values in {45,165,285}\ {45,165,285}\... (6 Replies)
Discussion started by: mario8eren
6 Replies

5. Shell Programming and Scripting

ksh-script "arithmetic syntax error" comparing strings

Hi all, I´ve already searched the forum but can´t find what i am doing wrong. I am trying to compare two variables using ksh under red hat. The error I get is: -ksh: .: MDA=`md5sum /tmp/ftp_dir_after_transfer | cut -d' ' -f1 ` MDB=`md5sum /tmp/ftp_dir_before_transfer | cut -d' ' -f1 `... (3 Replies)
Discussion started by: old_mike
3 Replies

6. Shell Programming and Scripting

"parse" SQL in bash or ksh

Hi! I've a text file programme1.out : CONNECT TO ORACLE (&CONXORA); CREATE TABLE TABLE1 AS SELECT ID_PERS FROM CONNECTION TO ORACLE ( SELECT DISTINCT PERS.ID_PERS FROM TAB_GRP GRP , TAB_PERS PERS WHERE DATE_DEB_GRP <=... (0 Replies)
Discussion started by: stagebi
0 Replies

7. Shell Programming and Scripting

In ksh shell command - Print "-ABC" is giving error

Hi Guys, while executing the following command : print "-ABC" is giving following error : ksh: print: bad option(s) I cannot use echo for some other reasons, so any other option ? (2 Replies)
Discussion started by: sagarjani
2 Replies

8. UNIX for Dummies Questions & Answers

SQL Error "The cursor or statement is not available"

Trying to load a record into my test database and am getting an error: "The cursor or statement is not available". I've attached the file I'm trying to load and the file containing the sql I'm trying to run. Trying to copy a record from my production database to my test database, but the... (0 Replies)
Discussion started by: Monte Heeren
0 Replies

9. UNIX for Dummies Questions & Answers

Maximum input file size in "Diff" Command

Hello, Can anyone let me know what is the maximum file size that can be given as input for the "Diff" Command in Unix? I have a file size as large as 28MB and which can also increase. Will I face any issues with such a file size. If yes, What is the other alternative. Thanks in advance for... (1 Reply)
Discussion started by: Neeraja
1 Replies

10. AIX

How to REMOVE USER that display error --> "Name is too long"

I wish to remove a user from the system... but an error occurr... I try to remove via SMITTY and try to remove via command line with rmuser -p (name of user) and does not works.... The system display that the "Name is too long" There another way to remove a user... or... (1 Reply)
Discussion started by: mgonzal
1 Replies
Login or Register to Ask a Question