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

Command to get input in a sequence


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vramya

New User


Joined: 07 Nov 2008
Posts: 13
Location: US

PostPosted: Tue Nov 11, 2008 10:03 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 11, 2008 10:09 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 11, 2008 10:10 pm
Reply with quote

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
View user's profile Send private message
vramya

New User


Joined: 07 Nov 2008
Posts: 13
Location: US

PostPosted: Tue Nov 11, 2008 10:49 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 12, 2008 1:33 am
Reply with quote

You cam also use the new *REXX statement...

O.
Back to top
View user's profile Send private message
vramya

New User


Joined: 07 Nov 2008
Posts: 13
Location: US

PostPosted: Wed Nov 12, 2008 2:17 am
Reply with quote

Sorry. I didnt understnad whats the new rexx command.
Can you pls give some clue abt it.
Thanks.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Nov 12, 2008 3:09 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 12, 2008 3:28 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Nov 12, 2008 3:45 am
Reply with quote

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
View user's profile Send private message
vramya

New User


Joined: 07 Nov 2008
Posts: 13
Location: US

PostPosted: Wed Nov 12, 2008 3:56 am
Reply with quote

Pedro,
Thanks a lot.
I got the expected result.

icon_razz.gif
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top