Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Displaying Error Messages in Panels
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
Author Message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Mon Apr 28, 2008 11:41 am    Post subject: Displaying Error Messages in Panels
Reply with quote

Am designing a screen to get the input from the user, validate it and process further if the input is correct and display an error message if its wrong on the panels

Can anyone tell me how to pop up these error messages in panels?

Can you please let me know the correct use of ZMSG, LMSG, SMSG, Zedsmsg, Zedlmsg. I couldn't get the exact meaning of what are all these and how it is being used (an example it will be of great use).

Any help on these will be really greatful.
Back to top
View user's profile Send private message
References
PostPosted: Mon Apr 28, 2008 11:41 am    Post subject: Re: Displaying Error Messages in Panels Reply with quote

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2291
Location: italy

PostPosted: Mon Apr 28, 2008 12:48 pm    Post subject: Reply to: Displaying Error Messages in Panels
Reply with quote

Code:
zerrsm = "short message text"
zerrlm = "long message text"
Address ISPEXEC  "SETMSG MSG(ISRZ002) "


self explanatory isn' t it
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Tue Apr 29, 2008 10:41 am    Post subject: Reply to: Displaying Error Messages in Panels
Reply with quote

Hi,

Thanks for the reply

I would like to know how can these varibales can be used in actual programming and the real use of it.

For Example:

My panel is to get the input from the user validate it in rexx and trow the message accordingly

Say the panel is like this

Enter your Emp ID : _____________

say the user enters AAAAA

I need to validate in REXX and pop up a message saying

" Enter a valid Emp ID"

how can this be done.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2291
Location: italy

PostPosted: Tue Apr 29, 2008 11:41 am    Post subject: Reply to: Displaying Error Messages in Panels
Reply with quote

why not look at the manuall Yourself...
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispzdg60/9.0?ACTION=MATCHES&REQUEST=setmsg&TYPE=FUZZY&SHELF=ISPZPM61.bks&DT=20070621205851&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
UmeySan

Senior Member


Joined: 22 Aug 2006
Posts: 579
Location: Germany

PostPosted: Tue Apr 29, 2008 1:57 pm    Post subject:
Reply with quote

Hi !

Little example for that:

Panel is dispayed. validation of a Dataset is done in the rexx.
If DSN does not exist, err-msg is set and panel is displayed again.
Dataset ...ISPF.MESSAGES is used for defining user-massages.

J120830.ISPF.MESSAGES(UMMSG03) :

UMMSG035 .ALARM=NO
'Dataset does not exist'

J120830.ISPF.CLIST(TVADL) :

ADDRESS ISPEXEC "ADDPOP"

UMPAN = "TVADL002"
UMCUR = "UDS1"
UMMSG = " "
DSNRC = 9

DO WHILE DSNRC > 0
ADDRESS ISPEXEC "DISPLAY PANEL ("UMPAN")
MSG ("UMMSG")
CURSOR ("UMCUR") "
DISPRC = RC
IF DISPRC > 0 THEN EXIT DISPRC
ADDRESS ISPEXEC "VGET (UDS1) PROFILE "
ADDRESS ISPEXEC "DSINFO DATASET('"UDS1"') "
DSNRC = RC
IF DSNRC > 0 THEN UMMSG = 'UMMSG035'
END

J120830.ISPF.PANELS(TVADL002) :

+ Please provide Dataset-Name
+
+ ...Ds-Name: +\z
+
)INIT
.ZVARS = '(UDS1)'
VGET (UDS1) PROFILE
)PROC
VER(&UDS1,NB,MSG=UMMSG037)
VPUT (UDS1) PROFILE
)END


Hope it helps, regards, UmeySan
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Tue Apr 29, 2008 5:58 pm    Post subject:
Reply with quote

Hi,

Thank you so much for the reply.

I tried an example same like yours and created my own message and concatenated that message library with ISPMLIB

Code:

/*REXX*/                                   
UMPAN = "TY"                                     
UMCUR = "INP"                                     
UMMSG = " "                                       
ADDRESS ISPEXEC "DISPLAY PANEL ("UMPAN")         
MSG ("UMMSG")                                     
CURSOR ("UMCUR")"                                 
 ADDRESS ISPEXEC                                 
 SAY RC                                           
IF INP=100 THEN                                   
  UMMSG = 'MAL002'                               


Code:

)ATTR                             
   + TYPE(TEXT) INTENS(HIGH)       
   \ TYPE(INPUT) INTENS(LOW)       
)BODY EXPAND($$)                   
+   $-$                           
+                                 
+ INPUT: +\Z                       
+                                 
)INIT                             
.ZVARS = '(INP)'                   
)PROC                             
VER(&INP,NB,MSG=MAL002)           
)END                               


Also i gave my input as 100 but then am not getting the error message

Please let me know if am doing something wrong.
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Wed Apr 30, 2008 10:30 am    Post subject:
Reply with quote

Hi,

Thanks everyone for all your help

I tried again and got it corrected the mistake was in the REXX

i didnt have the DO WHILE condition telling the REXX when it should be executed under what condition thats it.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6725
Location: 221 B Baker St

PostPosted: Wed Apr 30, 2008 11:15 am    Post subject: Reply to: Displaying Error Messages in Panels
Reply with quote

Good to hear that it is now working.

Thank you for posting the resolution icon_smile.gif

d
Back to top
View user's profile Send private message
UmeySan

Senior Member


Joined: 22 Aug 2006
Posts: 579
Location: Germany

PostPosted: Wed Apr 30, 2008 3:45 pm    Post subject:
Reply with quote

Hi & namastē malathy_tv !

Nice to hear, that it works.
Nice to see a "UMPAN" variable in a piece of code in chennai / india !

Poi varukiren & Regards,
UmeySan
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Wed Apr 30, 2008 5:09 pm    Post subject:
Reply with quote

Hi Gurus,

I have one more doubt

we are able to call the error message if we have check in the panels passing the message ID in it as follows

VER(&INP,NB,MSG=MAL001)

and then validitating and passing it again through REXX

but what if donot want to verify the input in the panels but validate and throw error message for the invalid input

how can this be achieved.

Thanks in advance
Back to top
View user's profile Send private message
UmeySan

Senior Member


Joined: 22 Aug 2006
Posts: 579
Location: Germany

PostPosted: Wed Apr 30, 2008 5:39 pm    Post subject:
Reply with quote

HI malathy_tv !

You don't really need the "VER(&INP,NB,MSG=MAL002)" in the panel
)PROC section, if you will do all validations in Rexx.

In my little example, as you could see, i used two different messages.
In the Panel, the input was only checked to be not blank, MSG037.

Then in Rexx, the entered DSN was checked against existence.
Here MSG035 was used if DSN not exists.

So this dat beed two separate & different validations.

Poi varukiren & Regards,
UmeySan
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Fri May 02, 2008 10:00 am    Post subject:
Reply with quote

Hi Umeysen,

Nandri ( Thank you )

i got your point what you said ....

i have one more thing i want to create my own error message, is that enough if i create the msglib ( a PDS) and concatenate with the ISPMLIB using the "ALLOC FA(ISPMLIB) DA(PDS.MSGLIB)" or do i have to any thing more as when i try executing this it says

message not found in 'ISPMLIB' library.
Current dialog statement:
DISPLAY PANEL (BFSP) MSG (MAL004)



Part of my REXX is:

DO WHILE STA > 0
ADDRESS ISPEXEC "DISPLAY PANEL ("UMPAN")
MSG ("UMMSG")"
...
P1 = SUBSTR(POL,1,2)
A = VERIFY(P1,XRANGE('A','Z'))
IF (A = 0 & B = 0) THEN STA=0
ELSE UMMSG = 'MAL004'

any idea....
Back to top
View user's profile Send private message
gcicchet

Active User


Joined: 28 Jul 2006
Posts: 295

PostPosted: Fri May 02, 2008 10:25 am    Post subject:
Reply with quote

Hi,
are you sure that the ALLOC command is working ?

Put trace on.


Gerry
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 18
Location: chennai

PostPosted: Fri May 02, 2008 10:33 am    Post subject:
Reply with quote

Hi,

I could see my MSGLIB getting concatenated with the ISPMLIB when i did the ALLOC i checked by doing ISRDDN

but still the error message says its not found... is there any other way that we can create our own messages.

Thanks.
Back to top
View user's profile Send private message
gcicchet

Active User


Joined: 28 Jul 2006
Posts: 295

PostPosted: Fri May 02, 2008 11:06 am    Post subject:
Reply with quote

Hi,
I'm assuming you were able to see the member via ISRDDN ie. MEM MAL004

What does member MAL004 look like ?


Gerry
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2