View previous topic :: View next topic
|
Author |
Message |
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi,
I am trying to throw an User Message in a Panel, but is thrown an error as "Message not found in 'ISPMLIB' Library".
While investigating the error, I tried invoking the Panel with a Message & I was thrown the same error.
The sample code I have used is:
Code: |
ADDRESS ISPEXEC
"LIBDEF ISPMLIB DATASET ID('PDS NAME')"
"LIBDEF ISPPLIB DATASET ID('PDS NAME')"
"DISPLAY PANEL(VALIDPNL) MSG(MYMSG001)"
"CONTROL ERRORS RETURN" |
The Message PDS contains a single member MSGNO00 with the below data:
Code: |
MYMSG001 'TRYING SIMPLE MESSAG' .TYPE=ACTION .ALARM=YES
'TRYING MY SIMPLE MESSAGE' |
I tried concatenating the Message Library & can verify successful concatenation using
command.
Still I am getting the error.
Requesting your guidance in resolution.
Thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
the ISPF manuals will tell all You might want to know about the naming rules for messages |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
BTW, nothing is EVER 'thrown' on a mainframe. Errors are issued, encountered, displayed, occur etc but NEVER thrown. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi Enrico,
I checked the manuals & find the naming rules match with what I have given.
The manual states the Message ID as:
Code: |
msgid
Required. Each message is referred to by a message identifier (ID). A message ID can be four to eight characters long. It is defined as follows:
Prefix: one to five alphabetic characters (A-Z, #, $, or @)
Number: three numeric characters (0-9)
Suffix (optional): one alphabetic character.
If the prefix is five characters long, the suffix must be omitted so that the total length does not exceed eight characters. Use the message ID suffix if more than 10 messages are to be included in one member. |
Hello Nic,
I get your point. Thank you.
Please help me resolve the errors encountered.
Thanks |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
Your message member name MSGNO00 is wrong for MSG(MYMSG001), it should be something like MYMSG0. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi Willy,
I renamed the Message member name to MYMSG0. Still I am encountering the same error - "Message not found in 'ISPMLIB' Library"
Thanks |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Try renaming the message itself to MSGNO001 instead of MYMSG001.
I believe ISPF searches pds members as a qualifier of the message itself.
This is the reverse of what Willy said, but accomplishes the same result. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
I renamed the Message member name to MYMSG0. Still I am encountering the same error - "Message not found in 'ISPMLIB' Library |
"
It should be MYMSGO (not zero).
The member name is a qualifier of the message it self. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
Ok, heres what works..
member MYMSG00 contains the text:
MYMSG001 'TRYING SIMPLE MESSAG' .TYPE=ACTION .ALARM=YES
'TRYING MY SIMPLE MESSAGE'
Then address ispexec "setmsg msg(MYMSG001)" shows the messages.
You really should re-read the manual for the details. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Nic Clouston wrote: |
BTW, nothing is EVER 'thrown' on a mainframe. Errors are issued, encountered, displayed, occur etc but NEVER thrown. |
But if a mainframe were to “throw” anything it would do so faster and more reliably than other platforms. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
Personally I just use the built-in message member ISRZ00 like this:
Code: |
parse value 'short-msg;long-message' with zedsmsg';'zedlmsg
address ispexec "vput (zedsmsg zedlmsg)"
address ispexec "setmsg msg(isrz000)" |
The message id wil be ISRZ000, but I can live with that. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Thanks Wily,
I changed the member name to MYMSG00 & it worked.
I wanted the Panel to not return to REXX routine until a basic valuation is met - Both Static & Dynamic variable should not be spaces. Hence I needed the .MSG to be populated within Panel itself. Since I could not use ADDRESS ISPEXEC in )PROC within Panel, so I had to populate .MSG variable.
PFB the Panel code I used.
Code: |
)ATTR
% TYPE(INPUT) PAD(_)
+ TYPE(TEXT) INTENS(LOW)
- TYPE(TEXT) INTENS(HIGH)
@ TYPE(OUTPUT)
)BODY EXPAND(||)
+ @ZDATE @ZTIME |-| + SELECT INITIAL VALUE & DETAILS -|-|
+.....................................................................
+COMMAND ===>%ZCMD +
+
+ +
+SELECT AT LEAST ONE VALUE OF THE 2 OPTIONS BELOW+
+%Z+ STATIC OPTION +
+%Z+ DYNAMIC OPTION +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
)INIT
.ZVARS = '(STATIC,DYNAMIC)'
.CURSOR = STATIC
)PROC
VER (&STATIC,LIST,S,SPACE,MSG=MYMSG002)
VER (&DYNAMIC,LIST,S,SPACE,MSG=MYMSG002)
*REXX(*,FLAG)
FLAG = 'N'
IF (STATIC = ' ') THEN DO
IF (DYNAMIC = ' ') THEN DO
FLAG = 'Y'
END
ELSE
RETURN
END
*ENDREXX
IF (&FLAG = 'Y')
.MSG = MYMSG001
)END |
Please feel free to suggest improvements.
Thank you all for your assistance. It is much appreciated. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
As you are already using a *REXX section then you can do something like this:
Code: |
)Proc
&testvar = &input1
&zedlmsg = &Z
*rexx (testvar,zedlmsg)
if pos('.',testvar)=0 then,
zedlmsg = 'Input does not seem to be a dataset'
*endrexx
ver (&zedlmsg,list,' ',msg=isrz000) |
|
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Thanks Willy.
This works too. |
|
Back to top |
|
|
|