View previous topic :: View next topic
|
Author |
Message |
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
Hi,
I have created one REXX panel. There are 4 input fields which will be provided by the user.
Now, I want to put some check that Field1 and Filed2 should not be equal. And if they are equal then it should not go to the next panel and thow some kind of error message.
Can anyone put some light on how it can be acheived? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or perhaps the use of Panel REXX |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Along with what Enrico has susggested - if you post what you've tried, possibly, there can be more close answers to what you've asked for. |
|
Back to top |
|
|
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
I did the following
Code: |
IF (&Field1=&Field2) .CURSOR = Field1 |
I want
Code: |
IF (&Field1=&Field2) |
It should display
Code: |
Field1 and Filed2 should not be equal |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You are getting there,
Code: |
IF (&FIELD1 = &FIELD2)
VER (&FIELD2,some condition never met,MSG=message-id)
|
And if in the ISPMLIB member you code the short message as NULL, the cursor will automatically position itself on the field being verified and display the long message. |
|
Back to top |
|
|
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
I put as
Code: |
IF (&FIELD1 = &FIELD2)
VER (&FIELD2,&FIELD1=12345,MSG=hi)
|
but it is giving error
Code: |
Invalid VERIFY type given (second parameter must be a literal). |
|
|
Back to top |
|
|
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
I put
Code: |
IF (&FIELD1 = &FIELD2)
VER (&FIELD2,a=b,MSG=hi)
|
as well. but didn't worki out |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Priya-chan, I suggest that you read the fine manual, and learn how to code a VER statement. |
|
Back to top |
|
|
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
It is giving the below error.
Code: |
message not found in 'ISPMLIB' library. |
have no clue what to do now. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Priyanka Pyne wrote: |
It is giving the below error.
Code: |
message not found in 'ISPMLIB' library. |
have no clue what to do now. |
It is recorded that, after the Spartans' defeat at Argusinae, the Athenians intercepted a message from their second-in-command to the Gerousia (council of elders) reading, "Admiral dead; ships lost; men starving; no idea what to do".
If you had asked even such elementary questions as "What's an ISPMLIB library?" and "How do I put a message in it?", there might have been hope. As it is, Priya-chan, you can but pray for another Lysander to save you. |
|
Back to top |
|
|
|