View previous topic :: View next topic |
Author |
Message |
magesh_rathnam Beginner
Joined: 29 May 2004 Posts: 5 Topics: 4 Location: Chennai
|
Posted: Tue Oct 19, 2004 11:09 pm Post subject: CLIST-REXX help needed.... |
|
|
Hi all,
We have a variable called ZSCREEN in CLIST which will give the current screen number. I want to know its equivalent in REXX.
Through VGET and VPUT we can pass information between REXX or between CLIST. But I'm not able to pass information from a called CLIST to calling REXX by using this. The commands used are:
"VPUT (&VAL) PROFILE" - in the called CLIST
"VGET (VAL) PROFILE" - in the calling REXX
Pls point me out where does the mistake lie (Is that because that REXX and CLIST have different profiles and hence could not be used like this). Or what should be used to pass information from CLIST to REXX?
Thanks in advance!!!
Regards,
Magesh |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Oct 20, 2004 12:17 am Post subject: |
|
|
magesh_rathnam,
Use the following command to get the current & max no. of screens (IN REXX)
Code: |
"ISPEXEC VGET (ZSCRCUR, ZSCRMAX)"
|
ZSCRCUR - Current Screen No.
ZSCRMAX - Max. no. of screens available.
Btw, I don't have an idea about CLIST. But as you said, REXX & CLIST may have different profiles. In that case, u could invoke ur REXX & CLIST with an NEWAPPL parameter as shown below. (Not sure of whether it would work. But try and let me know).
Code: |
Calling Rexx: (Rexx macro name assumed as RXMAC)
"ISPEXEC VGET ZAPPLID PROFILE SHARED"
CMD = '%RXMAC '||ARGUMENTS
IF ZAPPLID <> 'ISR' THEN
DO
"ISPEXEC SELECT CMD("CMD") NEWAPPL(ISR)"
EXIT 0
END
......(your rexx code goes here)
Called CLIST: (Name assumed as CLMAC)
CMD = '%CLMAC '||ARGUMENTS
"ISPEXEC VGET ZAPPLID PROFILE SHARED"
IF ZAPPLID <> 'ISR' THEN
DO
"ISPEXEC SELECT CMD("CMD") NEWAPPL(ISR)"
EXIT 0
END
......(your clist code goes here)
|
In this case the ISR profile becomes common b/w ur REXX & CLIST.
Hope this helps,
Phantom |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Oct 20, 2004 12:37 am Post subject: |
|
|
You guys need to read up on ISPF, particulary variables and profiles. Profiles have nothing to do with CLIST or REXX. (actually this particular problem has more to do with the CLIST syntax error of including the & in the VGET call - you want the variable name, not its value). |
|
Back to top |
|
|
magesh_rathnam Beginner
Joined: 29 May 2004 Posts: 5 Topics: 4 Location: Chennai
|
Posted: Wed Oct 20, 2004 9:16 am Post subject: |
|
|
hi Phantom,
thanks for ur reply. but it is not working. ZSCRCUR gives the current maximum number of screens and not the current number of screens which I wanted. and even using shared profile I`m not able to transfer data.
semigeezer,
I tried vput with and without & but no use. I want the contents of the variable and not the variable itslef to be passed to the calling REXX program
Regards,
Magesh. |
|
Back to top |
|
|
Maton_Man Beginner
Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Wed Oct 20, 2004 9:16 pm Post subject: |
|
|
I concur with Semigeezer, you have a lot to learn about ISPF and Rexx/CLIST syntax!
Briefly - ZSCREEN is an ISPF variable that is accessible irrespective of the language you use to interrogate it. You should look for it in the shared pool not the profile pool. You will find information about this variable in the ISPF manuals, notably and most usefully in the ISPF Reference Summary 5.4 Terminal and Function Keys.
To retrieve the value of zscreen in Rexx:-
/* Rexx */
address ispexec
"VGET (ZSCREEN) SHARED"
I won't bother giving you the CLIST syntax because there really is no excuse to code CLIST anymore. _________________ My opinions are exactly that. |
|
Back to top |
|
|
Maton_Man Beginner
Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Wed Oct 20, 2004 9:20 pm Post subject: |
|
|
I will reiterate one point which I have explained implicitly rather than explicitly and that is that you do not need to pass the value between CLIST and Rexx because it is accessible to any program in any language via the shared pool. _________________ My opinions are exactly that. |
|
Back to top |
|
|
|
|