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

Pass variable value from CLIST to ISPF Panel


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

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Fri Jan 09, 2009 6:15 pm
Reply with quote

Hi All,

I am trying to pass a variable value from CLIST to ISPF Panel, but not able to do so.

At start of CLIST, i am accessing a PDS, retrieve records from there, increment counter till end of file, then executing an ISPF panel.
The ISPF Panel then should show number of records in the PDS.

The code is as below.

CLIST
Code:

ERROR +                                                     
DO                                                           
   ALLOCATE FILE(ROBTSTR) DA('CAMDEV1.ROBT.SRCH.STR') SHR REU
   OPENFILE ROBTSTR INPUT                                   
   SET COUNTER = 0                                           
   SET RCODE = 0                                             
   DO UNTIL &RCODE = 400                                     
      GETFILE ROBTSTR                                       
      SET RCODE = &LASTCC                                   
      SET COUNTER = &COUNTER+1                               
   END                                                       
   CLOSFILE ROBTSTR                                         
END                                                         
SET &RC = &COUNTER                                           
ISPEXEC VPUT (RC) PROFILE                                   
                                                             
ISPEXEC DISPLAY PANEL(SRCHTOOL)                             


Here RC is the count that has to be shown on the ISPF Screen.
Every time i execute the CLIST, the value of variable is spaces, and also i get following error,

GETFILE ROBTSTR
NORMAL END OF FILE OCCURRED ON GETFILE (E400)
THIS STATEMENT HAS ALSO CAUSED A RECURSIVE CLIST ERROR

Please help me out.

Thanks a lot in advance.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Jan 09, 2009 7:19 pm
Reply with quote

Hi !

Did you use VGET in the )INIT Section of your Panel?

Try test it with TSO 7.2.
In some System 7.2 causes something like a refresh, so that variables become available.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Jan 09, 2009 7:29 pm
Reply with quote

Hi !

Also you could get the numer of records a bit easier in Rexx.

ADDRESS(TSO)
I20DSN = 'IE20000.PASSIV.ZSPOOL(LIST120)'

"ALLOCATE FI(DDI20) DSN('"I20DSN"') SHR REUSE"
"EXECIO * DISKR DDI20 (STEM INNV20. FINIS"

...Variable INNV20.0 now contains numbers of records.

"FREE FI(DDI20)"
EXIT
Back to top
View user's profile Send private message
sourabh jain

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Fri Jan 09, 2009 7:30 pm
Reply with quote

Yes i have included VGET in )INIT Section.

This is the place in Panel where i have to display the counter.
Code:

+                                                                 
+ ROBT: CAMLIVE.ROBT.SEARCH.RESULTS  Current Queue Total: !RC+     
+ BTOR: CAMLIVE.BTOR.SEARCH.RESULTS  Current Queue Total: !OC+     
+                                                                 


This is the )INIT section where VGET is coded.
Code:

)INIT   
.
.
.
VGET (RC) PROFILE


Still i am not able to get the variable value. icon_sad.gif
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Jan 09, 2009 7:40 pm
Reply with quote

Hi !

In remembrance of your Clist Errors, you also mentioned, please correkt them first.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jan 09, 2009 7:45 pm
Reply with quote

Isn't RC a reserved variable name ?
Back to top
View user's profile Send private message
sourabh jain

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Fri Jan 09, 2009 7:53 pm
Reply with quote

expat wrote:
Isn't RC a reserved variable name ?


Hi!

Changed the variable name to RCOUNT.
Still does not work.
Back to top
View user's profile Send private message
sourabh jain

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Fri Jan 09, 2009 7:58 pm
Reply with quote

UmeySan wrote:
Hi !

In remembrance of your Clist Errors, you also mentioned, please correkt them first.


HI!

It is giving SYNTAX ERROR while executing the CLIST for the statements provided by you. Is the syntax correct?

Thanks for the reply!
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jan 09, 2009 10:20 pm
Reply with quote

I am rusty in CLIST. I think all new development should be in rexx.

Code:
SET &RC = &COUNTER

Should the first ampersand be there? Your other SET instructions do not have it.
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

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
Search our Forums:

Back to Top