View previous topic :: View next topic
|
Author |
Message |
ajithajt
New User
Joined: 21 Mar 2016 Posts: 10
|
|
|
|
Hello,
I am trying to perform a rexx panel validation. My panel will receive two inputs. Input 1 and Input 2. Input 1 is of length six. If the second letter of input 1 is number then input 2 should have value as setupA. I mean to say like if user enters input2 as setupB, then panel should show it as wrong setup type and if the second letter is alphabet then input2 should be setupB( user should enter it as setupB, if not panel should display error message.) Could someone please advice if there is a way in rexx to achieve this.
Thanks. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Did you do search before ? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
There is no such thing as a Rexx panel - it is an ISPF panel.
Have you read the dialogue manager reference? In particular read about VERification and Rexx edit routines. Of course, you may be able to get by simply by refencing the built-in models.
Why ask the user to enter a second item that could be wrong - simply have that item generated by your code depending on the value entered by the user? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Check here on VER |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
SUBSTR OR LEFT to know the value at second position and then check the value entered for second field and then decide the error . |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
The ISPF .TRUNC and .TRAIL functions should allow you to isolate the 2nd char of the field to use in a VER statement. But if you are on a newer z/OS level, I'd defenitely use a builtin REXX - see the )REXX statement. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
Why ask the user to enter a second item that could be wrong - simply have that item generated by your code depending on the value entered by the user? |
I agree with Nic's suggestion. |
|
Back to top |
|
|
|