View previous topic :: View next topic
|
Author |
Message |
vramya
New User
Joined: 07 Nov 2008 Posts: 13 Location: US
|
|
|
|
Hi,
In a display Panel, if there are 10 input variables to get from the user and
the user has to input them in a sequence only,
say,
if the variables are V1 thro V10.
Without getting V2, the user should not be allowed to give the input to V3.
Is there any command to achieve this.
(Like the PICT, RANGE command do we have any special command for
getting the input continuously)
Thanks. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Not that I know of. I think you'd have to handle it programatically by toggling the attributes of the fields based on the current values of the variables. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10874 Location: italy
|
|
|
|
if You can wait a bit I might be able to give You the exact code,
but here is the logic
VAR1, VAR2, VAR3, ...., VARz be the fields You want to check
the pseudocode
Code: |
IF VARn is not blank
VER VARm NB where m = n-1
|
repeat for all the variables |
|
Back to top |
|
|
vramya
New User
Joined: 07 Nov 2008 Posts: 13 Location: US
|
|
|
|
Can we use If conditions for NB where the panel description is present?
I also tried another simple way to display a message if the user tries to
give the input not in a sequence like the below:
say, if we have var 1 thro 5
Select
when var1 \== ' ' & var2 = ' ' & var3 = ' '
& var4 = ' ' & var5 = spaces then
process1
when var1 \== ' ' & var2 \== ' ' & var3 = ' '
& var4 = ' ' & var5 = spaces then
process2
when var1 \== ' ' & var2 \== ' ' & var3 \== ' '
& var4 = ' ' & var5 = spaces then
process3
when var1 \== ' ' & var2 \== ' ' & var3 \== ' '
& var4 \== ' ' & var5 = spaces then
process4
when var1 \== ' ' & var2 \== ' ' & var3 \== ' '
& var4 \== ' ' & var5 \== spaces then
process5
otherwise say ' give sequence in order'
The above code is not getting executed and its giving a message that
Then is expected in Line 1.
Is there any restriction in the number of conditions we can use in a single when statement?
But if we already have a command like Range and PICT, its always good to use that instead of handling it in the program like above.
Thanks.
Thanks. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You cam also use the new *REXX statement...
O. |
|
Back to top |
|
|
vramya
New User
Joined: 07 Nov 2008 Posts: 13 Location: US
|
|
|
|
Sorry. I didnt understnad whats the new rexx command.
Can you pls give some clue abt it.
Thanks. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I think the code you want is something like this:
Code: |
IF (&VAR2 NE &Z)
VER(&VAR1,NONBLANK)
IF (&VAR3 NE &Z)
VER(&VAR2,NONBLANK)
IF (&VAR4 NE &Z)
VER(&VAR3,NONBLANK)
/* repeat */
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10874 Location: italy
|
|
|
|
yep! exactly what I meant also,
but I was too lazy at that moment to IPL
and look at the panels I have for the right syntax |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
vramya wrote: |
Sorry. I didnt understnad whats the new rexx command.
Can you pls give some clue abt it.
Thanks. |
7.2.7 The *REXX statement from the z/OS V1R9.0 ISPF Dialog Developer's Guide and Reference. |
|
Back to top |
|
|
vramya
New User
Joined: 07 Nov 2008 Posts: 13 Location: US
|
|
|
|
Pedro,
Thanks a lot.
I got the expected result.
|
|
Back to top |
|
|
|