Operating System - OpenVMS
1752781 Members
6233 Online
108789 Solutions
New Discussion юеВ

undefined symbol error while defining account ownership.

 
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.........