Need script for new login creation in sybase ase
There are many, many ways you could handle adding a list of logins/users to Sybase ASE, all of which include a mix of (Unix/Linux) shell scripting and T-SQL coding.

One simple example:

set passs=`cat /cis1/prod/dba/input/. ----`

cat addthese.txt | while read newlogin
do
isql -Usa -SPDSQTS1 &lt;&lt;EO_SQL &gt; /tmp/error.out 2&gt;&amp;1
$passs
use master
go
if suser_id("${newlogin}") is NULL
    exec sp_addlogin ${newlogin},Sybase123
go
----------------------
-- repeat following block for each db of interest (eg, qts_db, engcomdb)
use &lt;db&gt;
go
if user_id("${newlogin}") is NULL
    exec sp_adduser ${newlogin}, ${newlogin}, eng
go
---------------------
-- rest of your coding
go
EO_SQL

... check for errors in /tmp/error.out ...

done


You could place all of the above into a shell script, make sure addthese.txt is correct/up-to-date, and then run the shell script.



Variations on the above could include:


putting the T-SQL code in a stored proc and then calling the stored proc for each new login
placing the above T-SQL code in a template.sql file with NEWLOGIN used as place holder, a shell script would then run sed 's/NEWLOGIN/${newlogin}/g' template.sql &gt; runme.sql followed by isql -i runme.sql &gt; error.out 2&gt;&amp;1


There are many variations based on which shell you're using and your coding style/preferences.