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
 

 

Command to get input in a sequence

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Command to get input in a sequence
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

Moderator Team Head


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

PostPosted: Tue Nov 11, 2008 10:09 pm    Post subject: Reply to: Command to get input in a sequence
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Nov 11, 2008 10:10 pm    Post subject: Reply to: Command to get input in a sequence
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    Post subject: Reply to: Command to get input in a sequence
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: 2360
Location: Israel

PostPosted: Wed Nov 12, 2008 1:33 am    Post subject:
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    Post subject: Reply to: Command to get input in a sequence
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

Senior Member


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

PostPosted: Wed Nov 12, 2008 3:09 am    Post subject: Reply to: Command to get input in a sequence
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Nov 12, 2008 3:28 am    Post subject: Reply to: Command to get input in a sequence
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

Moderator Team Head


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

PostPosted: Wed Nov 12, 2008 3:45 am    Post subject: Re: Reply to: Command to get input in a sequence
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    Post subject: Reply to: Command to get input in a sequence
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


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