View previous topic :: View next topic |
Author |
Message |
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Mon Jul 28, 2008 8:30 am Post subject: Linking messages to panels |
|
|
Hi,
I am trying to build a tool where I need to get tablesname and qualifier and get the database name and tablespacename which are required for other processing
When I enter a invalid qualifier or table name.
I want to set a message saying this is invalid.
Can anyone give some guidance on that.
Thanks in advance.
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
expat Intermediate
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Mon Jul 28, 2008 9:31 am Post subject: |
|
|
Here's the link to ISPF services
Chapters 6 & 7 have info on messages.
Will try and dig up some other info on messages that I might have in my archive files.
Although I usually set an area of two or three lines on the panel with variable names and set the variables to the required message text within the REXX execution and redisplay the panel with the messages now set.
example Code: |
DSI = LISTDSI("'"STRIP(DSNAME)"'")
IF SYSDSORG <> 'PS' & SYSDSORG <> 'PO' THEN DO
ERRMSG1 = "DATASET SPECIFIED IS NOT PS OR PO FORMAT"
ERRMSG2 = "VERIFY THE CORRECT DATASET NAME WAS ENTERED"
RETURN(4)
END
|
_________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Jul 28, 2008 3:38 pm Post subject: |
|
|
I presume you want to set the ISPF short and long messages in which case...
Code: |
If (some_bad_condition)
Then Do
zedsmsg = "LIBRARY ERROR" /* short message */
zedlmsg = source.count "ERROR" /* long message */
"ISPEXEC SETMSG MSG(ISRZ001)"
End
|
_________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon Jul 28, 2008 5:50 pm Post subject: |
|
|
Not sure why my post didn't go a few hrs ago, but ...
See the SetMSG service if you are doing the verify in your code.
See the VER statement and .MSG variable if you are doing it in panel logic _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Tue Jul 29, 2008 6:15 am Post subject: |
|
|
But how to set a similar kind of message for a table?
Should I set a message with the return code?
Please correct me if I am wrong
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Jul 29, 2008 3:19 pm Post subject: |
|
|
It is irrelevant whether it is a table name, a dog's name, a cat's age or whatever that you are checking. Yo do not even need to check anything. Just set ZEDSMSG and ZEDLMSG and the ZEDSMSG will be displayed when the next panel displays and ZEDLMSG when you first hit PF1 after that.
E.g.
code to determine if table name is valid
If invalid set message variables
redisplay panel to get correct values
etc etc _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Mon Aug 04, 2008 2:27 am Post subject: |
|
|
Hi Nic,expat,semigeezer
It was really helpful and I set a message based on a condition it worked.
Thanks
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
|
|