View previous topic :: View next topic
|
Author |
Message |
harry143
New User
Joined: 05 Nov 2007 Posts: 21 Location: hyd
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Or the newer *REXX statement that you can include in your panel starting from z/OS 1.7.
O. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
sudhakar84
New User
Joined: 20 Jun 2008 Posts: 25 Location: chennai
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
oops, should have been "SYSDSN(var)", not "SYSDSN(data)", of course
[/code] |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Quote: |
In Panel the command VER() is used to pass the values to the called program |
This is not true.
O. |
|
Back to top |
|
|
|