|
|
| Author |
Message |
Apeksha
New User
Joined: 21 May 2008 Posts: 25 Location: Mumbai
|
|
|
|
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 |
|
 |
References
|
Posted: Wed Jul 09, 2008 12:59 pm Post subject: Re: TSO Delete command not working |
 |
|
|
 |
Apeksha
New User
Joined: 21 May 2008 Posts: 25 Location: Mumbai
|
|
|
|
Oh... sorry but missed on is that
instead of mydsn it was TPDATSET |
|
| Back to top |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 132 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
Apeksha
New User
Joined: 21 May 2008 Posts: 25 Location: Mumbai
|
|
|
|
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 |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 132 Location: Dublin, Ireland
|
|
|
|
Glad to help.
Garry. |
|
| Back to top |
|
 |
|
|