IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VGET error in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Oct 30, 2012 9:53 pm
Reply with quote

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
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Tue Oct 30, 2012 11:40 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 31, 2012 12:04 am
Reply with quote

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
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Wed Oct 31, 2012 2:18 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 31, 2012 2:34 am
Reply with quote

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
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Wed Oct 31, 2012 3:14 am
Reply with quote

thanks.....at least now most of the times we do not have to worry about VGET and VPUT.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Oct 31, 2012 5:49 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Oct 31, 2012 11:51 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top