I am using the following script. I am basically trying to enter data to my database using a storeprocedure.
PFB MY script.
Code:
#!/bin/csh -f
foreach FF (`cat ADDUSERS`)
isql -VENKIDB -U gloss -P glosss << _endl
set nocount on
go
use VENKI_PROD
go
print "Adding the user to GSTB Institutional for User : $FF"
go
sp_addlogin '$FF', '1$FF'
go
_end1
end
The script basically takes values from another file which is passing the values one by one as a parameter.
However when I try execute the above script it fails at second line with the below error.
_endl: << terminator not found
I tried various options and could get it corrected. Can someone help in finding out , what exactly I am missing.
Thanks in advance for your help.
Last edited by Franklin52; 06-16-2011 at 04:53 AM..
Reason: Please use code tags
Is this not compatible with cshell? If not it would be great if you let me know on what exactly is the reason.
---------- Post updated at 01:25 PM ---------- Previous update was at 01:17 PM ----------
I actually have another script which has the same snipped for connecting. It also connects through csh shell only. Also I dont get any error for the same.
however when I have just copied the connection line from the other script , I get this error when trying to execute the same in the new one. I am not sure on the type of the error.
let me know if you need the other script for your reference.
It's hard to tell for sure but it looks like one is end-one and the other is end-lower-case-ell. Make sure they really match.
Quote:
Originally Posted by venkidhadha
I am using the following script. I am basically trying to enter data to my database using a storeprocedure.
PFB MY script.
Code:
#!/bin/csh -f
foreach FF (`cat ADDUSERS`)
isql -VENKIDB -U gloss -P glosss << _endl
set nocount on
go
use VENKI_PROD
go
print "Adding the user to GSTB Institutional for User : $FF"
go
sp_addlogin '$FF', '1$FF'
go
_end1
end
The script basically takes values from another file which is passing the values one by one as a parameter.
However when I try execute the above script it fails at second line with the below error.
_endl: << terminator not found
I tried various options and could get it corrected. Can someone help in finding out , what exactly I am missing.
Hello All,
I have csv file like this
1,"suzi","305
Barehills","Vancover",34256
2,"molly","456
beverleyhills","Minisotta",234876
I want to put a customized record terminator on every alternate lines of this file.
The file is a input to database and the record terminator is by default... (3 Replies)
Hi,
I am trying to install Terminator (terminal emulator) on SunOS 5.10.
But on their page I do not see download for this one:
code . google . com / p / jessies / downloads / list
software . jessies . org / terminator / #downloads
Did anyone manage to to this, and if it is, can please give... (3 Replies)
Hi Guys,
This is Narasa i am new to this forum.I am very proud to join this forum.
I have a question on Line termination for fixed length file.
We got a file from mainframe having fixed length of 587 but when i extract the zip file with notepad it looks like continuous line with out any... (3 Replies)
Can someone help , how to add a terminator at the end of each line through shell command.
ex:
input file:
abc
xyz2
outputfile (terminator is !)
abc!
xyz2! (1 Reply)
I have a requirement, where based on a particular character on a single line, the data has to be written to new lines...
Ex: abccd$xyzll$bacc$kkklkjl$albc
My output should be
abccd$
xyzll$
bacc$
kkklkjl$
albc
Can someone help on this. (1 Reply)