Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
TSO Delete command not working

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
Apeksha

New User


Joined: 21 May 2008
Posts: 25
Location: Mumbai

PostPosted: Wed Jul 09, 2008 12:59 pm    Post subject: TSO Delete command not working
Reply with quote

Hi,

I am trying to delete a dataset (flat file) while running a REXX code, but it is giving some error. The dataset is allocated before one procedure gets called and after a procedure, the dataset is deleted. The code is as follows:-

Mydsn = "'LTC4APK.#REXX.TEMP'"

.

.

.

ADDRESS TSO

"ALLOC FI(LSTCAT) NEW RECFM(V,B,A) LRECL(125) BLKSIZE(4004)",

"BLOCK(4004) SPACE(10,10) CYLINDERS DA("||TPDATSET||")"

CALL WRITELINE

Address TSO "DELETE TPDATSET"


Error faced is: -



TPDATASET 'LTC4APK.#REXX.TEMP'

CATALOG ERROR+

** VSAM CATALOG RETURN CODE IS 102 - REASON CODE IS IGG0CLFM-7

** ENTRY LTC4APK.#REXX.TEMP NOT DELETED

LASTCC=8


Note: - I dont want to use a temporary dataset as i am performing some operations in the procedure WRITELINE which is getting called.

Any help would be appreciated.
Back to top
View user's profile Send private message
References
PostPosted: Wed Jul 09, 2008 12:59 pm    Post subject: Re: TSO Delete command not working Reply with quote

Apeksha

New User


Joined: 21 May 2008
Posts: 25
Location: Mumbai

PostPosted: Wed Jul 09, 2008 1:00 pm    Post subject:
Reply with quote

Oh... sorry but missed on is that
instead of mydsn it was TPDATSET
Back to top
View user's profile Send private message
Garry Carroll

Active User


Joined: 08 May 2006
Posts: 132
Location: Dublin, Ireland

PostPosted: Wed Jul 09, 2008 1:49 pm    Post subject:
Reply with quote

The dataset is still ALLOCATED to your TSO session. Try replacing the ADDRESS TSO "DELETE.." with
Code:
 ADDRESS TSO "FREE FI(LSTCAT) DELETE"

or issue
Code:
 ADDRESS TSO "FREE FI(LSTCAT)"
 ADDRESS TSO "DELETE '" TPDATSET "'"


Regards,
Garry
Back to top
View user's profile Send private message
Apeksha

New User


Joined: 21 May 2008
Posts: 25
Location: Mumbai

PostPosted: Wed Jul 09, 2008 4:19 pm    Post subject:
Reply with quote

Hi,

the command was not working because the dataset was open and not closed. So i closed the dataset and then delete command worked correctly. even FREE also worked.

Thanks for help Garry
Back to top
View user's profile Send private message
Garry Carroll

Active User


Joined: 08 May 2006
Posts: 132
Location: Dublin, Ireland

PostPosted: Wed Jul 09, 2008 4:35 pm    Post subject:
Reply with quote

Glad to help.

Garry.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1