Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Validate dataset in ISPF panel

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Pradeep Thangapandy

New User


Joined: 22 Feb 2008
Posts: 12
Location: United Kingdom

PostPosted: Tue Mar 24, 2009 12:09 pm    Post subject: Validate dataset in ISPF panel
Reply with quote

Is there any way we can vaildate dataset to check if it is catloged with in ISPF panels (Not inside Rexx).
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Mar 24, 2009 12:34 pm    Post subject:
Reply with quote

Not with pure ISPF Panel language.

You can, however, write panel exit and call it with PANEXIT, or use the *REXX statement from within the panel.

O.
Back to top
View user's profile Send private message
Pradeep Thangapandy

New User


Joined: 22 Feb 2008
Posts: 12
Location: United Kingdom

PostPosted: Tue Mar 24, 2009 2:55 pm    Post subject:
Reply with quote

Thank you very much. It is working. The script which i have used.

Code:

)PROC
VER(&FILE1,NB,DSNAME)                                       
 *REXX(FILE1)                                           
   IF SYSDSN("'"STRIP(FILE1)"'") <> 'OK' THEN FILE25 = ''
   RETURN                                                 
 *ENDREXX                                                 
IF (&FILE1 = '')                                       
  .MSG=METT390                                                                                 


When I input the file name as "45" validation failed in "VER(&FILE1,NB,DSNAME)" statement and i got the message "Invalid DSN - qualifier". I expected the control should end there(and Rexx script should not be executed). However the Rexx script got executed and i got an error message "INVALID DATA SET NAME, '45'" from SYSDSN rexx script('45' is not a valid dsname).

Is there any way i could skip the rexx statements if invalid DSNAME is keyed in. So that i can avoid the error message from SYSDSN.[/quote]
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Mar 24, 2009 3:03 pm    Post subject:
Reply with quote

This is because you use the *REXX statement unconditionally. You can change the VER statement to IF(VER...) statement. See the fine manual for examples.

Another option is to use the .MSG control variable. This variable is automatically set when a VER statement fails. You then can do something like:
Code:
VER(&FILE1,NB,DSNAME)
VERRC = .MSG
IF VERRC = &Z
  *REXX...


O.
Back to top
View user's profile Send private message
Pradeep Thangapandy

New User


Joined: 22 Feb 2008
Posts: 12
Location: United Kingdom

PostPosted: Wed Mar 25, 2009 4:13 pm    Post subject: Reply to: Validate dataset in ISPF panel
Reply with quote

Many thanks. It is working.

Code:

)PROC
VER(&FILE1,NB,DSNAME)   
IF (VER(&FILE1,NB,DSNAME))                                     
 *REXX(FILE1)                                           
   IF SYSDSN("'"STRIP(FILE1)"'") <> 'OK' THEN FILE1 = ''
   RETURN                                                 
 *ENDREXX                                                 
IF (&FILE1 = '')                                       
  .MSG=METT390   
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Trace in CLIST PANEL cvnlynn CLIST & REXX 1 Thu Jun 22, 2017 11:06 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts SCLM -- not installed -- panel ISRNOSLM dmitchell1105 IBM Tools 3 Fri Jun 09, 2017 10:41 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us