View previous topic :: View next topic |
Author |
Message |
mallu Beginner
Joined: 13 Jun 2005 Posts: 3 Topics: 2
|
Posted: Fri Jun 24, 2005 8:58 am Post subject: Can we use arithmetic operators in ISPF panels |
|
|
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 |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Mon Jun 27, 2005 3:55 am Post subject: |
|
|
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 |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Sat Jul 02, 2005 12:49 am Post subject: |
|
|
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 |
|
|
arnold57 Beginner
Joined: 01 Oct 2004 Posts: 30 Topics: 0
|
Posted: Tue Jul 05, 2005 4:00 pm Post subject: |
|
|
With z/OS 1.6 you can include REXX code in a panel to do this. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jul 05, 2005 5:15 pm Post subject: |
|
|
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 |
|
|
|
|