View previous topic :: View next topic
|
Author |
Message |
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Hello,
For my below REXX code :-
Code: |
/* REXX */
/* TRACE Off */
TRACE All
/* Populate the users email address */
REPLY = '@nab.com.au'
outtrapTEMP = outtrap('z.')
command_line = 'WHOIS '||USERID()
tso_cmd = '"'||command_line||'"'
interpret tso_cmd
rcs = rc
outtrapTEMP = outtrap('OFF')
if rcs ¬= 0 | word(Z.1,1) ¬= 'USER' then do
REPLY =
end
else do
REPLYhead =
x = 2
do while wordindex(Z.2,x) < 30
REPLYhead = REPLYhead||word(Z.2,x)||'.'
x = x + 1
end
REPLYhead = substr(REPLYhead,1,LENGTH(REPLYhead)-1)
EMAIL = REPLYhead||REPLY
/* say REPLY */
ISPEXEC VPUT (EMAIL) SHARED
end |
I am facing this below error :-
Code: |
ISPS108
Invalid length
Parameter 'RAJAT.BAGGA@trb.com.au' exceeds the allowable length.
Current dialog statement:
VPUT RAJAT.BAGGA@trb.com.au PROFILE |
Please assist , how do i fix this
Thank you,
Rajat |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What did the manual say about the message code issued ISPS108 |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
If the message is not clear, then the manual won't help...
Just put quotes around the command... |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Marso wrote: |
If the message is not clear, then the manual won't help...
Just put quotes around the command... |
Hello Marso,
It's not giving me the desired result.
With Quotes(double/single) i am not getting the value of REPLY in the field EMAIL :-
Code: |
5 *-* /**/
6 *-* REPLY = '@nab.com.au'
7 *-* outtrapTEMP = outtrap('z.')
8 *-* command_line = 'WHOIS '||USERID()
9 *-* tso_cmd = '"'||command_line||'"'
10 *-* interpret tso_cmd
*-* "WHOIS X009979"
>>> "WHOIS X009979"
11 *-* rcs = rc
12 *-* outtrapTEMP = outtrap('OFF')
13 *-* if rcs ¬= 0 | word(Z.1,1) ¬= 'USER'
16 *-* else
*-* do
17 *-* REPLYhead =
18 *-* x = 2
19 *-* do while wordindex(Z.2,x) < 30
20 *-* REPLYhead = REPLYhead||word(Z.2,x)||'.'
21 *-* x = x + 1
22 *-* end
19 *-* do while wordindex(Z.2,x) < 30
20 *-* REPLYhead = REPLYhead||word(Z.2,x)||'.'
21 *-* x = x + 1
22 *-* end
19 *-* do while wordindex(Z.2,x) < 30
23 *-* REPLYhead = substr(REPLYhead,1,LENGTH(REPLYhead)-1)
24 *-* EMAIL = REPLYhead||REPLY
25 *-* /**/
26 *-* 'ISPEXEC VPUT (EMAIL) SHARED'
>>> "ISPEXEC VPUT (EMAIL) SHARED"
27 *-* end
*** |
Without Quotes :-
Code: |
5 *-* /**/
6 *-* REPLY = '@nab.com.au'
7 *-* outtrapTEMP = outtrap('z.')
8 *-* command_line = 'WHOIS '||USERID()
9 *-* tso_cmd = '"'||command_line||'"'
0 *-* interpret tso_cmd
*-* "WHOIS X009979"
>>> "WHOIS X009979"
1 *-* rcs = rc
2 *-* outtrapTEMP = outtrap('OFF')
3 *-* if rcs ¬= 0 | word(Z.1,1) ¬= 'USER'
6 *-* else
*-* do
7 *-* REPLYhead =
8 *-* x = 2
9 *-* do while wordindex(Z.2,x) < 30
0 *-* REPLYhead = REPLYhead||word(Z.2,x)||'.'
1 *-* x = x + 1
2 *-* end
9 *-* do while wordindex(Z.2,x) < 30
0 *-* REPLYhead = REPLYhead||word(Z.2,x)||'.'
1 *-* x = x + 1
2 *-* end
9 *-* do while wordindex(Z.2,x) < 30
3 *-* REPLYhead = substr(REPLYhead,1,LENGTH(REPLYhead)-1)
4 *-* EMAIL = REPLYhead||REPLY
5 *-* /**/
6 *-* ISPEXEC VPUT (EMAIL) SHARED
>>> "ISPEXEC VPUT RAJAT.BAGGA@trb.com.au SHARED"
ISPS108
Invalid length
Parameter 'RAJAT.BAGGA@trb.com.au' exceeds the allowable length.
Current dialog statement:
VPUT RAJAT.BAGGA@trb.com.au SHARED |
Thank You,
Rajat |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
But with quotes your error went away. Now you have a different problem for which, if you cannot find the error, you can open a new topic either in the Rexx section or the section that deals with FTP. Both should probably be searched before you post to see if a similar problem has been posted or different Rexx code posted that might resolve your problem. |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Hello Nic,
Well i think by putting the command in qoutes like "ISPEXEC VPUT (EMAIL) SHARED" actaully didn't executed the command but it just displayed it , i am actaully not sure if this is the correct way of coding it as the value of EMAIL was not coming along in this case.
I am just starting off with REXX , i may not be correct, please let me know if i am not understanding it correctly.
Thank You,
Rajat |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
And yes, I request the moderator to please move my post to REXX section, as it is a REXX issue and is not related to ISPF.
Sorry of inconvenience.
Thank You,
Rajat |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Suggest that you run with TRACE I |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Code: |
'ISPEXEC VPUT (EMAIL) SHARED' |
whew! another contender for beginners forum.
the command should be written as:
Code: |
ISPEXEC 'VPUT (EMAIL) SHARED' |
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Code: |
outtrapTEMP = outtrap('z.')
command_line = 'WHOIS '||USERID()
tso_cmd = '"'||command_line||'"'
interpret tso_cmd
rcs = rc
outtrapTEMP = outtrap('OFF') |
You are doing it unnecessarily complicated...
Code: |
Call outtrap('z.')
Address TSO "WHOIS "USERID()
rcs = rc
Call outtrap('OFF') |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
You should study the syntax of VPUT. Does it require the name of the variable or does it require the value of the variable? See the ISPF Services manual. |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
dbzTHEdinosauer wrote: |
Code: |
'ISPEXEC VPUT (EMAIL) SHARED' |
whew! another contender for beginners forum.
the command should be written as:
Code: |
ISPEXEC 'VPUT (EMAIL) SHARED' |
|
I tried that one before and i didnt recieved the email ID in EMAIL variable :-
Code: |
/* REXX */
/* TRACE Off */
TRACE All
/* Populate the users email address */
REPLY = '@nab.com.au'
outtrapTEMP = outtrap('z.')
command_line = 'WHOIS '||USERID()
tso_cmd = '"'||command_line||'"'
interpret tso_cmd
rcs = rc
outtrapTEMP = outtrap('OFF')
if rcs ¬= 0 | word(Z.1,1) ¬= 'USER' then do
REPLY =
end
else do
REPLYhead =
x = 2
do while wordindex(Z.2,x) < 21
REPLYhead = REPLYhead||word(Z.2,x)||'.'
x = x + 1
end
REPLYhead = substr(REPLYhead,1,LENGTH(REPLYhead)-1)
EMAIL = REPLYhead||REPLY
ISPEXEC 'VPUT (EMAIL) SHARED'
end |
Output :-
Code: |
5 *-* /**/
6 *-* REPLY = '@nab.com.au'
7 *-* outtrapTEMP = outtrap('z.')
8 *-* command_line = 'WHOIS '||USERID()
9 *-* tso_cmd = '"'||command_line||'"'
10 *-* interpret tso_cmd
*-* "WHOIS X009979"
>>> "WHOIS X009979"
11 *-* rcs = rc
12 *-* outtrapTEMP = outtrap('OFF')
13 *-* if rcs ¬= 0 | word(Z.1,1) ¬= 'USER'
16 *-* else
*-* do
17 *-* REPLYhead =
18 *-* x = 2
19 *-* do while wordindex(Z.2,x) < 21
20 *-* REPLYhead = REPLYhead||word(Z.2,x)||'.'
21 *-* x = x + 1
22 *-* end
19 *-* do while wordindex(Z.2,x) < 21
20 *-* REPLYhead = REPLYhead||word(Z.2,x)||'.'
21 *-* x = x + 1
22 *-* end
19 *-* do while wordindex(Z.2,x) < 21
23 *-* REPLYhead = substr(REPLYhead,1,LENGTH(REPLYhead)-1)
24 *-* EMAIL = REPLYhead||REPLY
25 *-* ISPEXEC 'VPUT (EMAIL) SHARED'
>>> "ISPEXEC VPUT (EMAIL) SHARED"
26 *-* end
*** |
Please let me know if i am missing anything over here also please share a manual with me.
Thank you,
Rajat |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Quote: |
please share a manual with me. |
Why don't you go looking for the manuals yourself? There are links around the forum, a link right at the top of the screen (the very first line in grey/light blue) and on www. Why should we do what you can do? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you check on the wild guess that it is the "@" which is messing you up? Change it to some letter, see if you get the same error message.
You've not answered a number of questions you have been asked. |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Nic Clouston wrote: |
Quote: |
please share a manual with me. |
Why don't you go looking for the manuals yourself? There are links around the forum, a link right at the top of the screen (the very first line in grey/light blue) and on www. Why should we do what you can do? |
No worries i will find it myself, thanks for you help. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I copied the code as posted, used the ISPF Edit Model for a REXX VPUT to properly format the command:
"ISPEXEC VPUT (EMAIL) ASIS"
and I ran it without any problems. A subsequent exec with a VGET:
"ISPFEXEC VGET (EMAIL) ASIS"
shows the content as it was originally produced, so I can't replicate this problem. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
There are also the questions:
why do you need VPUT at all ?
Who will use this value ? other programs used during the TSO session ? the same rexx program ? a job skeleton ? |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Hello,
In my case it was a clist calling a REXX to get the email address of the person who invokes the specified request which requires an email to be send to his ID.
Basically I wanted to code a commonly used REXX which can be invoked to retrieve the email address of a person who trigger an execution which requires some info to be emailed to his ID.
Thank you,
Rajat |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Is this now working for you or is there still some question or problem? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
You should study the syntax of VPUT. Does it require the name of the variable or does it require the value of the variable? |
Its not clear if you learned the lesson. VPUT needs the name of the variable. You should not see the value of the variable when you trace shows the VPUT. |
|
Back to top |
|
|
|