Help for use of cuser
-
la_toupie
Help for use of cuser
Hi all,
I try to do a script to permit to a user to change his calling number. I have done trace SQL and here the result :
1112862608 -> (429) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu='79167' AND Name_Index = 0; ,... )
1112862608 -> (429) sql2 ( ) status 0
1112862608 -> (429) sql2 ( SELECT crystal, coupler, position, renvoi, typdest IN
TO FROM POSTE WHERE numan = '79167'; ,... )
1112862608 -> (429) sql2 ( ) status 0
1112862608 -> (429) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu = '79167' AND Name_Index = 0; ,... )
1112862608 -> (429) sql2 ( ) status 0
1112862608 -> (429) sql2 ( SELECT disp_name INTO FROM POSTE WHERE nulog = 43; ,.
.. )
1112862608 -> (429) sql2 ( ) status 0
1112862609 -> (429) sql2 ( SELECT curid, npi, pn INTO FROM SUBSPN WHERE number = '79167' AND pnid = 1; ,... )
1112862609 -> (429) sql2 ( ) status 0
1112862609 -> (429) sql1 ( |UPDATE SUBSPN SET curid = 1, npi = 0, pn = '3699' WH
ERE number = '79167';| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862609 -> (429) sql1 ( |COMMIT WORK;| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862609 -> (429) sql1 ( |UPDATE SUBSDATE SET updDate = [07042005103000], status = 0, type = 0 WHERE mcdu = '79167';| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862609 -> (429) sql1 ( |COMMIT WORK;| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862610 -> (438) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu='79167' AND Name_Index = 0; ,... )
1112862610 -> (438) sql2 ( ) status 0
1112862611 -> (434) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu='79167' AND Name_Index = 0; ,... )
1112862611 -> (434) sql2 ( ) status 0
1112862611 -> (438) sql1 ( |CLOSE V_KEYBOARDCUR;| , option 0 )
1112862611 -> (438) sql1 ( ) status -11012
I try to do with cuser : UPDATE SUBSPN SET curid = 1, npi = 0, pn = '3699' WH
ERE number = '79167';| , option 0 but it don't works.
I must copy all for my script ? It's strange; for me , only this update is necessary ???
What is the meaning of 'status 0' ?
Thanks for your help
I try to do a script to permit to a user to change his calling number. I have done trace SQL and here the result :
1112862608 -> (429) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu='79167' AND Name_Index = 0; ,... )
1112862608 -> (429) sql2 ( ) status 0
1112862608 -> (429) sql2 ( SELECT crystal, coupler, position, renvoi, typdest IN
TO FROM POSTE WHERE numan = '79167'; ,... )
1112862608 -> (429) sql2 ( ) status 0
1112862608 -> (429) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu = '79167' AND Name_Index = 0; ,... )
1112862608 -> (429) sql2 ( ) status 0
1112862608 -> (429) sql2 ( SELECT disp_name INTO FROM POSTE WHERE nulog = 43; ,.
.. )
1112862608 -> (429) sql2 ( ) status 0
1112862609 -> (429) sql2 ( SELECT curid, npi, pn INTO FROM SUBSPN WHERE number = '79167' AND pnid = 1; ,... )
1112862609 -> (429) sql2 ( ) status 0
1112862609 -> (429) sql1 ( |UPDATE SUBSPN SET curid = 1, npi = 0, pn = '3699' WH
ERE number = '79167';| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862609 -> (429) sql1 ( |COMMIT WORK;| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862609 -> (429) sql1 ( |UPDATE SUBSDATE SET updDate = [07042005103000], status = 0, type = 0 WHERE mcdu = '79167';| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862609 -> (429) sql1 ( |COMMIT WORK;| , option 0 )
1112862609 -> (429) sql1 ( ) status 0
1112862610 -> (438) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu='79167' AND Name_Index = 0; ,... )
1112862610 -> (438) sql2 ( ) status 0
1112862611 -> (434) sql2 ( SELECT S_Name, F_Name, S_Name_Annu, F_Name_Annu, Call_Enable INTO FROM PHONEB WHERE Mcdu='79167' AND Name_Index = 0; ,... )
1112862611 -> (434) sql2 ( ) status 0
1112862611 -> (438) sql1 ( |CLOSE V_KEYBOARDCUR;| , option 0 )
1112862611 -> (438) sql1 ( ) status -11012
I try to do with cuser : UPDATE SUBSPN SET curid = 1, npi = 0, pn = '3699' WH
ERE number = '79167';| , option 0 but it don't works.
I must copy all for my script ? It's strange; for me , only this update is necessary ???
What is the meaning of 'status 0' ?
Thanks for your help
-
la_toupie
In fact, this user wants to make calls on his pilots to test his agents. As he don't know the voice of all its personnel, he wants then that I identify which agent answered. The problem, it's that he shouldn't call in masked if not I it your steps in taxation and he don't want to always use the same number if not he will be located. From where my idea to make a small application which enables him to change its call number. I don't want to give him access to the PABX 
I think the output of the trace in 'mgr' is different from the syntax required by 'cuser'.
The following command will update the value, but only on disk (some work, some don't)
CODE:
cdmao
cuser . m
update subspn set pn='yournumber' where number='yourmcdu'
commit ;
.
or, if in a script;
cd /usr3/mao; echo "update subspn set pn='yournumber' where number='yourmcdu' ; ." |cuser
See if that works
The following command will update the value, but only on disk (some work, some don't)
CODE:
cdmao
cuser . m
update subspn set pn='yournumber' where number='yourmcdu'
commit ;
.
or, if in a script;
cd /usr3/mao; echo "update subspn set pn='yournumber' where number='yourmcdu' ; ." |cuser
See if that works
-
la_toupie
Hi folks
Actually, there is a tool for digging up remanent in memory.
It is promptly called "cuser_mem"
But as Vad told you better not touch it without proper knowledge of DB structure - tables, indexes and their relations.
For this kind of tricks if you really need this done you can use "mgr" command file execution.
If you want change PIN of sbs 3000 to 123456 then create text file containing
name it like you want, e.g. chpin
and run command
Now all you need - to put it in a script, randomize "Private_Calling_Number" get loop for 5 min and every five minutes this guy will have a different pcn!
First, it is safer than "cuser"
Second, it does change DB in memory and on disk!
Actually, there is a tool for digging up remanent in memory.
It is promptly called "cuser_mem"
But as Vad told you better not touch it without proper knowledge of DB structure - tables, indexes and their relations.
For this kind of tricks if you really need this done you can use "mgr" command file execution.
If you want change PIN of sbs 3000 to 123456 then create text file containing
Code: Select all
SET Subscriber "1": "3000"
{
Private_Calling_Number = "123456"
}
and run command
Code: Select all
(1)xa000000> mgr -nodico -X chpin
First, it is safer than "cuser"
Second, it does change DB in memory and on disk!
-
la_toupie
-
la_toupie

