Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Unable to allocate Message Library in Rexx

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

New User


Joined: 20 Sep 2007
Posts: 93
Location: India

PostPosted: Fri Jun 21, 2019 5:50 pm    Post subject: Unable to allocate Message Library in Rexx
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

Senior Member


Joined: 14 Mar 2007
Posts: 10614
Location: italy

PostPosted: Fri Jun 21, 2019 6:00 pm    Post subject: Reply to: Unable to allocate Message Library in Rexx
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: 2202
Location: Hampshire, UK

PostPosted: Fri Jun 21, 2019 6:06 pm    Post subject: Reply to: Unable to allocate Message Library in Rexx
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: 93
Location: India

PostPosted: Fri Jun 21, 2019 7:01 pm    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 296
Location: Denmark

PostPosted: Fri Jun 21, 2019 7:34 pm    Post subject:
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: 93
Location: India

PostPosted: Fri Jun 21, 2019 7:44 pm    Post subject:
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: 725
Location: Pennsylvania

PostPosted: Fri Jun 21, 2019 7:58 pm    Post subject:
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: 725
Location: Pennsylvania

PostPosted: Fri Jun 21, 2019 8:09 pm    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 296
Location: Denmark

PostPosted: Fri Jun 21, 2019 11:13 pm    Post subject:
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: 683
Location: Whitby, ON, Canada

PostPosted: Sat Jun 22, 2019 6:05 am    Post subject: Re: Reply to: Unable to allocate Message Library in Rexx
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 User


Joined: 01 Sep 2015
Posts: 296
Location: Denmark

PostPosted: Sat Jun 22, 2019 4:04 pm    Post subject:
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: 93
Location: India

PostPosted: Mon Jun 24, 2019 12:08 pm    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 296
Location: Denmark

PostPosted: Mon Jun 24, 2019 2:27 pm    Post subject:
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: 93
Location: India

PostPosted: Mon Jun 24, 2019 3:54 pm    Post subject:
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.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX exec (opercmd) failing quietly o... Mike.Fulton All Other Mainframe Topics 2 Sat Aug 03, 2019 4:45 am
No new posts Unable to delete dataset - VSAM datas... netcrawler JCL & VSAM 20 Fri Jul 26, 2019 2:06 pm
No new posts Unable to offline device/Drive netcrawler All Other Mainframe Topics 1 Mon Jul 08, 2019 1:20 pm
No new posts Access file which has DSNTYPE=LIBRARY maxsubrat JCL & VSAM 11 Fri Jun 21, 2019 4:09 pm
No new posts Different result between normal rexx ... UmeySan CLIST & REXX 2 Tue May 07, 2019 6:18 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us