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

Regarding VER() command in panels


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harry143

New User


Joined: 05 Nov 2007
Posts: 21
Location: hyd

PostPosted: Wed Jul 30, 2008 4:42 pm
Reply with quote

Hi,

I have to verify whether the dataset entered in a panel is valid one or not. I have used the below command in the processing section of panel but it didnt work out.

)PROC
VER (&OLDDS,NB,DSNAME)

When any dataset is entered, how to find out whether the dataset is catalogued or not. Such that I can display an error message in the panel itself at the time of entry.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jul 30, 2008 4:48 pm
Reply with quote

there is not such a thing as a rexx panel
panels are build using ISPF defined syntax ==> ISPF panels
and panels are managed using programs ( pl/i, assembler, obol, ...)
or interpreted languages like REXX or CLSTs

the verifications being done thru ISPF tokens are just formal ones,

VER(&FIELD,NB,DSNAME)

simply means...
verify that the field is non blank
verify that the syntax is that one of a DSN,
for the DSN
length LE 44
for the qualifiers
length LE 8
starts with a letter
does not contain invalid chars

all the processing must then be done by the invoking application
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Jul 30, 2008 5:14 pm
Reply with quote

Or the newer *REXX statement that you can include in your panel starting from z/OS 1.7.

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Jul 30, 2008 5:18 pm
Reply with quote

You can use the VER statement to check that the name entered is a valid dataset name:
Code:
)PROC
VER (&var,NB,DSNAME)
There are a few flavors: DSNAME, DSNAMEF, DSNAMEFM, DSNAMEPQ, and DSNAMEQ. Check the documentation.

To check if the file exists,you can use embedded REXX:
Code:
)PROC
ver(&var,NB,DSNAME)                 
*REXX(*)                         
 if SYSDSN(data) <> 'OK' then do
        zrxmsg = ''
        zrxrc  = 8
        return
 end
*ENDREXX
)END
in var zrxmsg place your own message number
Back to top
View user's profile Send private message
sudhakar84

New User


Joined: 20 Jun 2008
Posts: 25
Location: chennai

PostPosted: Wed Jul 30, 2008 5:18 pm
Reply with quote

In Panel the command VER() is used to pass the values to the called program. With that u have to check the dataset in the program using the command SYSDSN(WORKFILE_NAME).
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Jul 30, 2008 5:22 pm
Reply with quote

oops, should have been "SYSDSN(var)", not "SYSDSN(data)", of course
[/code]
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Jul 30, 2008 5:26 pm
Reply with quote

Quote:
In Panel the command VER() is used to pass the values to the called program

This is not true.

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top