View previous topic :: View next topic
|
Author |
Message |
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Hi,
I am designing a panel in which input file should be given by user. I need to check
whether he has entered a valid DSN name and also it should be catloged
I can check whether it is a valid DSN name as
VER(&INPUT,NB,DSNAME)
But I also want to check it is catloged. If it is not, I should throw a message saying that 'The input file entered is not catloged'.
How can I achieve this?
Thanks,
Lokesh |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I guess that I'd try a panel REXX routine:
)PROC
VER(&INPUT,NB,DSNAME)
*REXX(INPUT)
x = SYSDSN("'"input"'")
...
some logic here
...
EXIT 0
*ENDREXX |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
I tried this But its not working. MSG1 is not identified after REXX code
Code: |
*REXX
IF SYSDSN(''INPUT'') <> 'OK' THEN
MSG1 = 'INPUT NOT CATLOGED'
*ENDREXX
IF (&MSG1 ¬= ' ')
.MSG = MSG1
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Searchng Google "*REXX" "panel exit" sysdsn shows what looks like a complete example |
|
Back to top |
|
|
|