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

How to eliminate TSO command message?


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

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sun Apr 01, 2012 9:03 am
Reply with quote

If I code below code into my REXX program,
Code:
"FREE FI(outdd)"   
"FREE FI(indd)"     


and always below message come out, which is not necessary and I do not want it to appear out.
Code:
IKJ56247I FILE OUTDD NOT FREED, IS NOT ALLOCATED     
IKJ56247I FILE INDD NOT FREED, IS NOT ALLOCATED     
***                                                 


How can I achieve this?

thanks.

is there a general way to eliminate some message when TSO command completes?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 01, 2012 9:36 am
Reply with quote

Hello,

If you have not allocated the file, do not free it. . .

It is simply code that can be modified to work as you wish. . .
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sun Apr 01, 2012 10:29 am
Reply with quote

HI, dick,

I think it's a good practice to Free the file before Allocation, right?

so, message cannot eliminated for TSO command?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sun Apr 01, 2012 2:43 pm
Reply with quote

Yes they can, look at MSG in the manuals

Something you should have done before posting here
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Apr 01, 2012 4:02 pm
Reply with quote

Or you could use the REUSE parameter in the ALLOC command.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sun Apr 01, 2012 6:04 pm
Reply with quote

Marso wrote:
Or you could use the REUSE parameter in the ALLOC command.

We are on holiday in China now, please let me test it next Thursday.
thanks for your suggestion first.
Back to top
View user's profile Send private message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Sun Apr 01, 2012 11:27 pm
Reply with quote

Below mentioned will trap the message to array.

Code:
x = outtrap("zzz.")   
"FREE FI(outdd)"     
"FREE FI(indd)"       
x = outtrap("OFF")   
Back to top
View user's profile Send private message
kbrahma

New User


Joined: 08 Oct 2007
Posts: 38
Location: Delhi

PostPosted: Tue Apr 10, 2012 4:42 pm
Reply with quote

I know it's not a good practice to free files when they are not allocated. But I use:-

Code:
MSG('OFF')


to suppress TSO messages.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Apr 10, 2012 5:00 pm
Reply with quote

kbrahma wrote:
I know it's not a good practice to free files when they are not allocated. But I use:-

Code:
MSG('OFF')


to suppress TSO messages.

Well, actually it is a good practice. Maybe you have processed the same or another REXX or CLIST that has allocated the same file name, but has failed before deallocation.
Back to top
View user's profile Send private message
kbrahma

New User


Joined: 08 Oct 2007
Posts: 38
Location: Delhi

PostPosted: Tue Apr 10, 2012 5:21 pm
Reply with quote

expat wrote:
kbrahma wrote:
I know it's not a good practice to free files when they are not allocated. But I use:-

Code:
MSG('OFF')


to suppress TSO messages.

Well, actually it is a good practice. Maybe you have processed the same or another REXX or CLIST that has allocated the same file name, but has failed before deallocation.


But wouldn't that mean being plauged by those pesky TSO messages if the files have been freed in the previous REXX itself?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 10, 2012 5:27 pm
Reply with quote

I agree with kbrahma. Hunt down the pesky things leaving allocations unfreed, and make some sort of penalty box. Value of two pints of beer to be contributed each time you leave something unfreed.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Apr 10, 2012 6:43 pm
Reply with quote

No, because you would have set MSG to OFF
Back to top
View user's profile Send private message
kbrahma

New User


Joined: 08 Oct 2007
Posts: 38
Location: Delhi

PostPosted: Tue Apr 10, 2012 8:21 pm
Reply with quote

I guess it's pa-tae-to, pa-ta-to... Some would like to clean up the files in the end of their program and some would clean it up before starting a new one.

I personally like the former one (as I stated earlier), cause in case you need some other TSO messages (and you can't set MSG to OFF) in your program, the "FILE NOT FREED" will just look ugly in the output! hehe... icon_razz.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Apr 10, 2012 8:44 pm
Reply with quote

So you flick the MSG OFF or ON as required.

I usually clean up my files at both ends of the process
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 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
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
Search our Forums:

Back to Top