Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISPEXEC vput and ISPEXEC vget

Status
Not open for further replies.

aarthyarun

Technical User
Sep 25, 2006
12
IN
Hi,

I want to know what is vput and vget statements and how to use it in a REXX program.

When i tried using the following lines in my REXX program, i was thrown with an error dialog.

name = "test"
"ispexec vput (name)".

so i want to know what does these commands means and how to use it.
 

Foreground or background? If foreground, were you in ISPF? If background, do you have DD statements fro all required ISPF assets, and did you ISPSTART the application?


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
It is in foreground only. Now I got what is meant by vget and vput.

Below I am giving a REXX program which is calling a macro, but I am not getting the expected output. Can anyone tell me whether the below statements are right.

My problem is, the variable i am sending using vput is not retrieved in the macro, it is passed to the macro as an empty variable.

PROC - 1
/* REXX */
PROC = "AARTHY"
MY_DS = "M758FH.PDS.CNTL(TEST)"
ADDRESS ISPEXEC;"CONTROL ERRORS RETURN"
"ISPEXEC VPUT('" PROC "') PROFILE"
SAY "PROC AFTER VPUT IN PROC1" PROC
"ISPEXEC VIEW DATASET('"MY_DS"') MACRO("PROC2")"
"ISPEXEC VGET('" PROC "') PROFILE"
"ISPEXEC SETMSG MSG(ISRZ000)"
SAY "PROC AFTER VGET IN PROC1" PROC

PROC - 2 I.E., MACRO

/* REXX */
ADDRESS ISPEXEC;"CONTROL ERRORS RETURN"
"ISPEXEC VGET('" PROC "') PROFILE"
SAY "PROC AFTER VGET IN PROC2" PROC
ADDRESS ISREDIT MACRO
"ISREDIT X ALL"
"ISREDIT F ALL" ("WELCOME")
IF RC = 0 THEN
SAY 'CHECKING'
PROC = "CHANGING"
SAY "PROC IN PROC2 AFTER CHANGING" PROC
"ISPEXEC VPUT('" PROC"') PROFILE"
SAY "PROC IN PROC2 AFTER VPUT" PROC
"ISREDIT END"

OUTPUT OBTAINED

PROC AFTER VPUT IN PROC1 AARTHY
PROC AFTER VGET IN PROC2 PROC - this should be AARTHY ONLY
CHECKING
PROC IN PROC2 AFTER CHANGING CHANGING
PROC IN PROC2 AFTER VPUT CHANGING
PROC AFTER VGET IN PROC1 AARTHY - this should be CHANGING


 
(step 1 -- you need to put 'code /code' tags around your code so that it's easier to read.)

It's wrong to say
Code:
ADDRESS ISPEXEC
"ISPEXEC VPUT('" PROC "') PROFILE"
...
"ISPEXEC VGET('" PROC "') PROFILE"
etc
That second 'ISPEXEC' is a CLIST form because CLIST doesn't have 'address', but that's not your problem.

'PROC' inside the parentheses is a --variable name-- but you have it quoted... in several places. You can see this in my post (inside CODE tags) because I used CODE tags to make visible all the narrow-width characters that get squeezed out when you don't use the CODE tags.



Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top