I am calling a sqlplus script from a shell script. I get an error on the size of the string I am passing as a parameter. Can someone help me on how I can solve this.
Error is:
string beginning "UNH+000000..." is too long. maximum size is 239 characters.
Line that gives error:
UNH+00000000011626+XCXCXC:96A:UN:NH4402'BGM+XZ8+2'DTM+137:20030424:102'LIN+1'RFF+XC3:ASDD2003-04-24-09.50.24.765263'RFF+AEK:03042409500005'RFF+CR:LRBC8662'SEQ++1'GIS+2'FTX+ACB+++CREDIT BANK ID MISSING - TRANSFER REJECTED. EDIT ERROR.'UNT+11+00000000011626'
This line does not give error:
UNH+00000000011625+XCXCXC:96A:UN:NH4402'BGM+XZ8+1'DTM+137:20030424:102'LIN+1'RFF+XC3:ASDD2003-04-24-09.50.24.765263'RFF+AEK:03042409500007'RFF+CR:LRBG1219'SEQ++1'GIS+2'FTX+ACB+++MOD CHECK ON RDFI-ID FAILED'UNT+11+00000000011625'
Shell Script that calls sqlplus:
#!/bin/sh
awk -f zen.awk zen.txt | while read theLine
do
line1=`echo $theLine | sed "s/'/|/g"`
line2=`echo $line1 | sed "s/[ ]/||/g"`
echo "line is -> [$line2]"
sqlplus -s a/a @load1.sql $line2
done
Error is:
string beginning "UNH+000000..." is too long. maximum size is 239 characters.
Line that gives error:
UNH+00000000011626+XCXCXC:96A:UN:NH4402'BGM+XZ8+2'DTM+137:20030424:102'LIN+1'RFF+XC3:ASDD2003-04-24-09.50.24.765263'RFF+AEK:03042409500005'RFF+CR:LRBC8662'SEQ++1'GIS+2'FTX+ACB+++CREDIT BANK ID MISSING - TRANSFER REJECTED. EDIT ERROR.'UNT+11+00000000011626'
This line does not give error:
UNH+00000000011625+XCXCXC:96A:UN:NH4402'BGM+XZ8+1'DTM+137:20030424:102'LIN+1'RFF+XC3:ASDD2003-04-24-09.50.24.765263'RFF+AEK:03042409500007'RFF+CR:LRBG1219'SEQ++1'GIS+2'FTX+ACB+++MOD CHECK ON RDFI-ID FAILED'UNT+11+00000000011625'
Shell Script that calls sqlplus:
#!/bin/sh
awk -f zen.awk zen.txt | while read theLine
do
line1=`echo $theLine | sed "s/'/|/g"`
line2=`echo $line1 | sed "s/[ ]/||/g"`
echo "line is -> [$line2]"
sqlplus -s a/a @load1.sql $line2
done