Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

undefined symbol error while defining account ownership.

 
shiva27
Frequent Advisor

undefined symbol error while defining account ownership.

Hi All Good morning,

For account profile management we've different team, he is trying to change the ownership of account as per management requirement.
Case1:When he tried to change ownership as
uaf>modify use1/owner="robert"

Case2:
uaf>modify use1/owner="+robert"
When he tried to change ownership same but including + sign, getting undefined sysmbol error

I'm managing this server and i'm able to do this both way successfully.My account having system privileges but security team user having only "NETMBX,SECURITY,SYSPRV and TMPMBX privileges.
Can you pl. sugget wht could be issue.
43 REPLIES 43
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

make correction Please:

In case 1: security team user able to changed the owenership.

In case 2:they are getting error UNDEFINED symbol.
John Gillings
Honored Contributor

Re: undefined symbol error while defining account ownership.

shiva,
Could you please post the exact command(s) you're issuing and the exact error?

According to HELP:

MODIFY

/OWNER

/OWNER=owner-name

Specifies the name of the owner of the account. You can use this
name for billing purposes or similar applications. The owner name
is 1 to 31 characters. No default owner name exists.


I don't see any limitations on the character set.
A crucible of informative mistakes
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

UAF>mod user2 /owner="+rg9472robert"
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \RG9472robert\
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \RG9472robert\
%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency
Karl Rohwedder
Honored Contributor

Re: undefined symbol error while defining account ownership.

Since there is an if-then-else error I assume, this is part of DCL procedure. You should show us the real proc.
It is no problem to set the owner to 'strange' characters, e.g.:

UAF> mod rohwedder/owner=")(/+*~'Ã Ã _:;+"
%UAF-I-MDFYMSG, user record(s) updated

regards kalle
Steven Schweda
Honored Contributor

Re: undefined symbol error while defining account ownership.

> Could you please post the exact command(s)
> you're issuing and the exact error?

> UAF>mod user2 /owner="+rg9472robert"

The "UAF>" prompt does not tell us how you
got the "UAF>" prompt.

> %DCL-W-UNDSYM, undefined symbol - check validity and spelling

Apparently you're running some (defective)
command procedure, but my psychic powers are
too weak to tell me much more than that.

Note that if you were running the (real)
AUTHORIZE utility, you wouldn't get a DCL
complaint. For example:

ALP $ mcr authorize
UAF> mod user2 /owner="+rg9472robert"
%UAF-W-BADSPC, no user matches specification
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

I gone thru script found "UAF>" prompt getting by menu : Below is part of script,

---------------------------------------
$ if p1 .eqs. "A" then SYS_OPTION :== RUN_AUTHORIZATION ! Authorization


$RUN_AUTHORIZATION:
$ on warning then continue
$ ask "UAF>" action
$ action = f$edit("''action'","UPCASE")
$ IF (F$EDIT(action,"UPCASE,COLLAPSE") .eqs. "EXIT") .or. (F$EDIT(action,"UPCASE,COLLAPSE") .eqs. "EX") THEN GOTO select_sys_option
$!
$ IF (F$LOCATE( "/PA", "''action'") .ne. F$length("''action'")) .or. (F$LOCATE( "/G", "''action'") .ne. F$length("''action'"))
$ then
$ Say "*** Modifying PASSWORD is not permitted"
$ goto RUN_AUTHORIZATION
$ endif
$!
$ UAF 'action'
$ goto RUN_AUTHORIZATION

----------------------------------------

Above procedure will execute while security team wants to do some changes in UAF user parameter as per my understanding.
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

i executed same with set verify option,

-------------------------------------------
$RUN_AUTHORIZATION:
$ on warning then continue
$ ask "UAF>" action
UAF>modify user2/owner="+robert"
$ action = f$edit("modify user2/owner="+robert"","UPCASE")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\robert\
---------------------------------

I thing if we set "action" string correctly then it will fix this issue.

$ask "UAF>" action
$ action = f$edit("''action'","UPCASE")

Pl.suggest how can i set action symbol correctly
Hakan Zanderau ( Anders
Trusted Contributor

Re: undefined symbol error while defining account ownership.

You have missed an "

$ action = f$edit("modify user2/owner="+robert"","UPCASE")

should be /owner=""+robert""

Hakan
Don't make it worse by guessing.........
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

case1: without + sign
$action = f$edit("modify user2/owner="robert"","UPCASE")
$sh sym action
ACTION = "MODIFY USER2/OWNER=ROBERT"

case2:with +sign
$action = f$edit("modify user2/owner="+robert"","UPCASE")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\ROBERT\

Hakan Zanderau ( Anders
Trusted Contributor

Re: undefined symbol error while defining account ownership.

Try following

action = f$edit("modify user2/owner="+robert,"UPCASE")

or

action = f$edit("modify user2/owner=""''robert'""","UPCASE")

Hakan
Don't make it worse by guessing.........
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

$action=f$edit("modify user2/owner="+robert,"UPCASE")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\ROBERT\

$action = f$edit("modify user2/owner=""''robert'""","UPCASE")

$sh sym action
ACTION = "MODIFY USER2/OWNER="""
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

$action = f$edit("modify user2/owner=""''+robert'""","UPCASE")
$sh sym
_Symbol: action
ACTION = "MODIFY USER2/OWNER="+robert'""


Looks good, let me change in script and execute.
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

Haken,

How can i implement this cmd-
action = f$edit("modify user2/owner=""''+robert'""","UPCASE")

in below cmd procedure. I'm too cheking. :)
------------------------------------------
$RUN_AUTHORIZATION:
$ on warning then continue
$ ask "UAF>" action
$ action = f$edit("''action'","UPCASE")
$ IF (F$EDIT(action,"UPCASE,COLLAPSE") .eqs. "EXIT") .or. (F$EDIT(action,"UPCASE,COLLAPSE") .eqs. "EX") THEN GOTO select_sys_option
$!
$ IF (F$LOCATE( "/PA", "''action'") .ne. F$length("''action'")) .or. (F$LOCATE( "/G", "''action'") .ne. F$length("''action'"))
$ then
$ Say "*** Modifying PASSWORD is not permitted"
$ goto RUN_AUTHORIZATION
$ endif
$!
$ UAF 'action'
$ goto RUN_AUTHORIZATION
-----------------------------------------
Hakan Zanderau ( Anders
Trusted Contributor

Re: undefined symbol error while defining account ownership.

Shiva,

I just fixed the error in the faulty command.

I have NO idea what you are trying to do.....

What is "robert" ?
There is no definition of "robert" in your piece of code.

You are not telling us the whole story......

I'm sorry......

Hakan
Don't make it worse by guessing.........
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

steven any suggestion ,
Is it is possible to define this way in above script.
Jan van den Ende
Honored Contributor

Re: undefined symbol error while defining account ownership.

shiva,

as proven by

>>>
$action=f$edit("modify user2/owner="+robert,"UPCASE")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\ROBERT\
<<<

the error is NOT in he AUTHORIZE, but in the string manipulation
$action=f$edit("modify user2/owner="+robert,"UPCASE")

The + sign is trying to add the VALUE of the symbol ROBERT to the quoted string "modify user2/owner". And that fails because there is no symbol ROBERT.

Obviously you are trying to add the quoted value "ROBERT" to your quoted string.
To add quotes inside a quoted string you have to double the quotes. That would give:

$action=f$edit("modify user2/owner= + " "robert"","UPCASE")

(note: I added spaces between the 2 double quotes for readability in the forum display.
They are NOT to be there in your procedure!!)

I hope this explains a bit better what Hakan already wrote.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
shiva27
Frequent Advisor

Re: undefined symbol error while defining account ownership.

Haken,

i'm going to defined the account ownership with "+" sign with help of above script, without + sign script is running fine since long time but now as per management requirement they wants to add "+" sing in all acount profile ownership column.

ex.
current owner : robert_dev
Needs to be change to owner: +robert_dev

Manully i'm able to change successfully.

Joseph Huber_1
Honored Contributor

Re: undefined symbol error while defining account ownership.

The part

$ ask "UAF>" action
$ action = f$edit("''action'","UPCASE")
$ IF (F$EDIT(action,"UPCASE,COLLAPSE") .eqs. "EXIT") .or. ...

is o.k. only if the "user" is giving enough double quotes to survive the ''action' symbol substitution.
But this substitution is IMHO unnecessary, why not leave it out ?
The main problem follows in the line
$ UAF 'action'
Here again all depends on the user entering ENOUGH double quotes, and the "ask" command(-procedure?) is preserving them.
So You probably require the the user to enter something like
/owner="""+robert"""
So that the substitution results in
$ UAF ... /owner="+ROBERT"
http://www.mpp.mpg.de/~huber
Hakan Zanderau ( Anders
Trusted Contributor

Re: undefined symbol error while defining account ownership.

An example on how to implement

$ owner = "robert_dev"
$ new_owner = "+"+owner
$ show sym new_owner
NEW_OWNER = "+robert_dev"

Hakan
Don't make it worse by guessing.........
Joseph Huber_1
Honored Contributor

Re: undefined symbol error while defining account ownership.

Well, I don't understand why the procedure is asking the user to enter the whole UAF command-string instead of just the owner string unquoted. Then the procedure should simply construct the command itself like
$ ask "owner?" owner
$ if f$extract(0,1,owner).nes."+" then owner="+"+owner
$ UAF modify 'user'/owner="''owner'"

And finally, to just update all accounts to adhere to the new "+" rule, I would get the freeware GETUAI utility in a procedure

$loop:
$! reading the username from a file
$ GETUAI 'username' /owner=owner
$ if f$extract(0,1,owner).nes."+" then owner="+"+owner
$ UAF modify 'username'/owner="''owner'"
$ goto loop


http://www.mpp.mpg.de/~huber
Steven Schweda
Honored Contributor

Re: undefined symbol error while defining account ownership.

Could we start with something easy? Has
anyone yet explained what "ask" really is?

alp $ help ask

Sorry, no documentation on ASK
[...]
Joseph Huber_1
Honored Contributor

Re: undefined symbol error while defining account ownership.

Yes of course, and therefore I was asking
>> "ask" command(-procedure?) is preserving them.

Whatever it is, behind it probably is is either an inquire or a read, or another procedure doing it.
And depending on that, it requires a different number of double quotes for the quoted user input string.
Since we don't know what 'ask" is effectively doing, the OP has to test his procedure with different number of quote pairs to find the right incantation.
And is is already clear why it was working (just by chance) until special characters like "+" was in the symbol: the unquoted string was still legal in the UAF command.

And I repeat: it is quite ugly to write a procedure which requires from the user to know how to quote his input !
http://www.mpp.mpg.de/~huber
Steven Schweda
Honored Contributor

Re: undefined symbol error while defining account ownership.

> [...] either an inquire or a read [...]

And, of course, INQUIRE in a context with
enough privilege to use AUTHORIZE is a big
invitation to trouble.

http://h71000.www7.hp.com/doc/732final/aa-q2hlg-te/aa-q2hlg-te.pdf
Joseph Huber_1
Honored Contributor

Re: undefined symbol error while defining account ownership.

Anyway, the small piece shown, it seems to be a procedure, which accepts from the user any argument added to a AUTHORIZE MODIFY command, except /password and /generate, but it allows e.g. /flag=disuser.
Weird to say the least...
http://www.mpp.mpg.de/~huber