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

Rexx- SYSDSN - MSG(OFF) issue


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pkg23

New User


Joined: 06 Dec 2007
Posts: 7
Location: India

PostPosted: Wed Aug 06, 2008 12:07 pm
Reply with quote

I trying verify if the dataset is Archive or not using below rexx.
For this i am issing SYSDSN as below and to avoid the messages i am also setting MSG("OFF") but when i run the Rexx it gives me the messages like "DMS2987 CA DISK HAS ARCHIVED
DMS2971 DO YOU WANT TO RESTORE THE DATA SET? (Y/N) "

/*rexx*/
DATASET = "userid.test.input"
MSGSTAT = MSG("OFF")
IF SYSDSN(DATASET) = "DATASET NOT FOUND" THEN DO
SAY "DATASET NOT FOUND"
END
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 06, 2008 1:08 pm
Reply with quote

someone else will be able to provide the exact line, but to turn messages off in a REXX script I remember something like:

ADDRESS TSO CONTROL MSGNO ...................................


but, this may be something that can not be turned off - don't know.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 06, 2008 1:48 pm
Reply with quote

Looks as though it may be because the dataset that you are trying to interrogate is 'Archived'. It is a message issued by the ILM software and not REXX.

To avoid this, I usually use LISTDSI instead of SYSDSN because it has a NORECALL parameter.
Code:

/*REXX*/                           
SAY "HLQ PLEASE"                   
PARSE PULL HLQ                     
                                   
  A = "'"STRIP(HLQ)"'"             
  Q = LISTDSI(A NORECALL)           
  SAY "RC = "Q ",REASON = "SYSREASON


LISTDSI is well documented, but unfortunately I just for the life of me can not remember where icon_redface.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Aug 06, 2008 1:54 pm
Reply with quote

Hi,

if you are trying to see if the dataset is migrated or not, I would use the LISTDSI command like LISTDSI 'filename' DIRECTORY NORECALL,

and use the SYSREASON variable to determine the dataset availability.

SYSDN will recall the dataset.


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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Aug 06, 2008 1:56 pm
Reply with quote

Hi Expat,

I can't type quick enough. icon_lol.gif


Gerry
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Aug 06, 2008 1:58 pm
Reply with quote

Expat and PKG23,

Please check the manual TSO/E CLISTs (SA22-7781-04)

publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ikjb800/listdsi.htm

It has all the details about LISTDSI

Thanks,
Prem
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 06, 2008 2:40 pm
Reply with quote

gcicchet wrote:
Hi Expat,
I can't type quick enough. icon_lol.gif
Gerry

I won't ask why that is icon_lol.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Aug 06, 2008 2:41 pm
Reply with quote

I was born at an early age icon_wink.gif


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

New User


Joined: 06 Dec 2007
Posts: 7
Location: India

PostPosted: Wed Aug 06, 2008 2:45 pm
Reply with quote

Great the RECALL option worked. But when i run the rexx, it waits till i press "ENTER". Any idea how we can avoid this.

X = LISTDSI(DATASET DIRECTORY NORECALL)
SAY SYSREASON

Thanks
Prashant
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Wed Aug 06, 2008 11:01 pm
Reply with quote

Quote:
Please check the manual TSO/E CLISTs (SA22-7781-04)

Actually, I think you want to read about LISTDSI in the TSO/E Rexx Reference manual.

Quote:
it waits till i press "ENTER". Any idea how we can avoid this.

When you use the SAY instruction, the system waits for the user to read and dismiss your text. If the system did not wait for the user, it would be so fast the user would not have time to read it.

Seems like you are doing this in ISPF, try something like this:
Code:
zerrsm = "not found"                   
zerrlm =  DATASET "was not found"
zerrhm = '*'                               
zerralrm = 'YES'                           
Address ISPEXEC "SETMSG MSG(ISRZ002)"   
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top