MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error on VGET command when issued from PLI

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
anu_kannu
Beginner


Joined: 16 May 2007
Posts: 10
Topics: 5

PostPosted: Thu Sep 20, 2007 7:18 am    Post subject: Error on VGET command when issued from PLI Reply with quote

A VGET command is issued in a PLI-DB2. The program is a part of online module, called from REXX. The variable is VPUT into the PROFILE pool in the CLIST that invokes the application.

The REXX which calls the PLI also runs another PLI pgm (similar in logic). But the second program has no issues with VGET for the same variable.

The commnd issued was

CALL ISPLINK('VGET ', CCTY, ' PROFILE');

CCTY is the variable name. The programs try to retrieve this value from the profile pool.

Error message received was:
ISPV021

Invalid GET request
Variable name ' 0' is not a valid REXX variable name.



Can someone help?
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Sep 20, 2007 7:30 am    Post subject: Reply with quote

Did you VDEFINE CCTY first?
Back to top
View user's profile Send private message
anu_kannu
Beginner


Joined: 16 May 2007
Posts: 10
Topics: 5

PostPosted: Thu Sep 20, 2007 8:29 am    Post subject: Reply with quote

yes.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Sep 20, 2007 10:25 am    Post subject: Reply with quote

I suspect that you are simply calling the PL/I program either as a command, with the TSO CALL statement or using something like Address LINKMVS. These will not work if you are going to use ISPF services within the program because ISPF still thinks it is running in a Rexx environment and so it tries to call Rexx (actually TSO) services to get the variable values.

You need to invoke your program using the ISPEXEC SELECT PGM() or CMD() service. This will establish a new 'select level' in which variable services are assumed to be directly handled by ISPF as opposed to TSO.
Back to top
View user's profile Send private message Visit poster's website
anu_kannu
Beginner


Joined: 16 May 2007
Posts: 10
Topics: 5

PostPosted: Thu Sep 20, 2007 11:58 pm    Post subject: Reply with quote

The program is called like this:

"DSN SYS(DB2 Subsystem)"
DROPBUF
QUEUE "RUN PROGRAM(PGMNAME) PLAN(PGMNAME) ",
"LIB ('Load library name') ",
QUEUE "END"

The point is the pgm was working fine 2 months back. Its giving this error all of a sudden. And only this program is giving error while the other one with the similar logic is working fine. Both these pgms are called in the same REXX and in the same way.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Sep 21, 2007 2:44 am    Post subject: Reply with quote

I don't know anything about DB2 but something is different, related to my last post. One program is running with ISPF thinking it is in Rexx mode and the other is not. Maybe something about nesting within Rexx and the handling of the buffer. Is stack management (queue, makebuf, drobpuf, etc) and rexx program call structure the same in both?
Back to top
View user's profile Send private message Visit poster's website
arnold57
Beginner


Joined: 01 Oct 2004
Posts: 30
Topics: 0

PostPosted: Tue Oct 02, 2007 6:54 pm    Post subject: Reply with quote

If CCTY is the variable name, then you need to put it in quotes with a blank to terminate it:

Code:
CALL ISPLINK('VGET ','CCTY ', 'PROFILE ');
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group