Subject | gsec in a procedure |
---|---|
Author | Carlos Bracho |
Post date | 2003-11-21T18:55:55Z |
hi friends...
I am trying to create a procedure what can create users, here you
have the code:
SET TERM # ;
CREATE PROCEDURE CREATE_USER(USR_NAME VARCHAR(15), NOMB VARCHAR(25),
APELL VARCHAR(25), PWD VARCHAR(15))
AS
BEGIN
SHELL gsec -user sysdba -password xxxx -add cbrachom -fname
Carlos -lname Bracho -pw hola;
END #
SET TERM ; #
And I got this error message:
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 4, char 10
-gsec
I really understand that "gsec" isn't an isq command. But, how can I
run a shell command from a procedure?
I also tried this:
SET TERM # ;
CREATE PROCEDURE CREATE_USER(USR_NAME VARCHAR(15), NOMB VARCHAR(25),
APELL VARCHAR(25), PWD VARCHAR(15))
AS
BEGIN
SHELL 'gsec -user sysdba -password xxxxx -add cbrachom -pw
cbrachom -fname Carlos -lname Bracho';
END #
SET TERM ; #
And this is the error message:
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 4, char 10
-'gsec -user sysdba -password xxxxx -add cbrachom -pw cbrachom -fname
Carlos -lname Bracho'
Same problem, how can I fix it?
Thanks.
P.D: I am not using the parameters yet.
I am trying to create a procedure what can create users, here you
have the code:
SET TERM # ;
CREATE PROCEDURE CREATE_USER(USR_NAME VARCHAR(15), NOMB VARCHAR(25),
APELL VARCHAR(25), PWD VARCHAR(15))
AS
BEGIN
SHELL gsec -user sysdba -password xxxx -add cbrachom -fname
Carlos -lname Bracho -pw hola;
END #
SET TERM ; #
And I got this error message:
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 4, char 10
-gsec
I really understand that "gsec" isn't an isq command. But, how can I
run a shell command from a procedure?
I also tried this:
SET TERM # ;
CREATE PROCEDURE CREATE_USER(USR_NAME VARCHAR(15), NOMB VARCHAR(25),
APELL VARCHAR(25), PWD VARCHAR(15))
AS
BEGIN
SHELL 'gsec -user sysdba -password xxxxx -add cbrachom -pw
cbrachom -fname Carlos -lname Bracho';
END #
SET TERM ; #
And this is the error message:
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 4, char 10
-'gsec -user sysdba -password xxxxx -add cbrachom -pw cbrachom -fname
Carlos -lname Bracho'
Same problem, how can I fix it?
Thanks.
P.D: I am not using the parameters yet.