IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unable to allocate Message Library in Rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Fri Jun 21, 2019 5:50 pm
Reply with quote

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
Code:
TSO ISRDDN
command.

Still I am getting the error.

Requesting your guidance in resolution.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Jun 21, 2019 6:00 pm
Reply with quote

the ISPF manuals will tell all You might want to know about the naming rules for messages
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Fri Jun 21, 2019 6:06 pm
Reply with quote

BTW, nothing is EVER 'thrown' on a mainframe. Errors are issued, encountered, displayed, occur etc but NEVER thrown.
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Fri Jun 21, 2019 7:01 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Fri Jun 21, 2019 7:34 pm
Reply with quote

Your message member name MSGNO00 is wrong for MSG(MYMSG001), it should be something like MYMSG0.
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Fri Jun 21, 2019 7:44 pm
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Jun 21, 2019 7:58 pm
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Jun 21, 2019 8:09 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Fri Jun 21, 2019 11:13 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sat Jun 22, 2019 6:05 am
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Sat Jun 22, 2019 4:04 pm
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Mon Jun 24, 2019 12:08 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Mon Jun 24, 2019 2:27 pm
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Mon Jun 24, 2019 3:54 pm
Reply with quote

Thanks Willy.

This works too.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts omegamon for cics -UNSUPPORTED ENVIRO... CICS 2
Search our Forums:

Back to Top