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 

Can we use arithmetic operators in ISPF panels

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


Joined: 13 Jun 2005
Posts: 3
Topics: 2

PostPosted: Fri Jun 24, 2005 8:58 am    Post subject: Can we use arithmetic operators in ISPF panels Reply with quote

Can I add or subtract values in ISPF panels in the )PROC section.
Eg can I execute something like the below.
Code:

&ZCSRV = .CURSOR
&BEGROW = 8
IF (&ZCSRV > 7 AND &ZCSRV < 13)
   &XNUM=&ZCSRV - &BEGROW
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Jun 27, 2005 3:55 am    Post subject: Reply with quote

I don't think you can perform arithmetic in the )PROC section.

You may be able to use the TRANS function to help, something like:

Code:

&ZCSRV = .CURSOR
&BEGROW = 8
IF (&ZCSRV > 7 AND &ZCSRV < 13)
   &XNUM = TRANS(&ZCSRV 8,0 9,1 10,2 11,3 12,4)


BUT

.CURSOR contains a field name, not a row number.

If this is a table display panel, you could use .CSRROW instead. Just check if it contains leading zeroes (I can't remember).

Cheers,
Merv
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Sat Jul 02, 2005 12:49 am    Post subject: Reply with quote

Another method is PANEXIT.

O.
________
Yamaha XS750


Last edited by ofer71 on Sat Feb 05, 2011 11:21 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
arnold57
Beginner


Joined: 01 Oct 2004
Posts: 30
Topics: 0

PostPosted: Tue Jul 05, 2005 4:00 pm    Post subject: Reply with quote

With z/OS 1.6 you can include REXX code in a panel to do this.
Back to top
View user's profile Send private message
semigeezer
Supermod


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

PostPosted: Tue Jul 05, 2005 5:15 pm    Post subject: Reply with quote

Sort of... the Rexx code has all the same restrictions as a panel exit. In fact, it really is a Rexx panel exit with the source of the exit within the panel.
Back to top
View user's profile Send private message Visit poster's website
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