Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pass variable value from CLIST to ISPF Panel

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Pass variable value from CLIST to ISPF Panel
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: 755
Location: Germany

PostPosted: Fri Jan 09, 2009 7:19 pm    Post subject:
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: 755
Location: Germany

PostPosted: Fri Jan 09, 2009 7:29 pm    Post subject:
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    Post subject: Reply to: Pass variable value from CLIST to ISPF Panel
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: 755
Location: Germany

PostPosted: Fri Jan 09, 2009 7:40 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jan 09, 2009 7:45 pm    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Jan 09, 2009 10:20 pm    Post subject: Reply to: Pass variable value from CLIST to ISPF Panel
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us