View previous topic :: View next topic
|
Author |
Message |
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I suppose that for rexx syntax errors, there will only be one condition that results in RC=8.
But for host command errors, there are any number of them that will set a RC=8. The errortext() function has no way to determine the context of the return code; it was not intended to do so.
Rather than errortext(), I recommend that you use sourceline(), like this:
Code: |
error:
SAY 'RC='rc 'at line' sigl ':' sourceline(sigl)
return |
|
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
I used the sourceline(sigl) idea as suggested by Pedro and I could see this now, so the problem was using errortext() where it was not meant to be used.
Code: |
>V> "46"
>L> "4"
>F> " 46"
>O> "** novalue trapped at line 46"
>L> " **"
>O> "** novalue trapped at line 46 **"
** novalue trapped at line 46 ** |
As for enrico, we have put all our VGETs in INIT paragraph and our display panels are in specific paragraphs. Does it have to be just before display panel without any RC 8 check? I got this design from a popular REXX in our system and that seems to be working fine for everybody.
If so I can put the VGET just before the 'corresponding' display panel statements and not check RC 8 of VGET but rather of the display panel itself? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
somebody in Your organization should also consider that
for PANEL fields there is no need for the VGET,
the values are available by design of the ISPF REXX interface |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
Ok I removed the VGETs totally and it worked fine and also did give the correct results, thanks........
While reading the manual, I could not get what advantage we get from putting things in different pools, which is the purpose of VGET. Or its use more complicated than what we generally think of - getting variables from panel (which now to me does not look to be the use). If you can provide a practical example where its use is required. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
a VPUT to the profile will keep the values across <logoff/logon>
apart that case and when required by <interfaced> appls and ISPF itself
I never had the need to use vget and vput |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
thanks.....at least now most of the times we do not have to worry about VGET and VPUT. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Our esteemed colleague Jim Moore authored an excellent 3 part article on the topic of ISPF variable pools. See
The links provided don't seem to like being linked to from here, so...
Google for schlabb 741 01025.pdf, 01026.pdf and 01027.pdf. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
I couldn't get to these documents via those links - they redirect to some bozo website. However, googling 'Schlabb' very quickly led me to the correct place. |
|
Back to top |
|
|
|