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

Dataset is open. Not able to free it from ddname


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

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Tue Jun 23, 2009 6:20 pm
Reply with quote

I have tried to get the fileaid a.f.8 output of a copybook thru rexx in foreground. i have got output but @ the end when i tried to free the dataset it throws an error

maxcc = 12
FILE DD01 NOT FREED, DATA SET IS OPEN

Below is the code:
/* Rexx */
Address TSO
"ALLOC FI(SYSLIST) DA('MYTEST.FILEAID.OP') OLD REU"
Say RC
"ALLOC FI(DD01) DA('MYTEST.COPYLIB') SHR REU"
Say RC
"ALLOC FI(SYSIN) DA('MYTEST.SYSIN') SHR REU"
Say RC
"ALLOC FI(SYSPRINT) DA('MYTEST.SYSPRNT') SHR REU"
Say RC
Address Ispexec "LIBDEF ISPTLIB DATASET ID('FILEAID.LOAD')"
Say RC
Address Ispexec "SELECT PGM(FILEAID)"
Say RC
Address TSO
"FREE FI(SYSLIST)"
Say RC
"FREE FI(DD01)"
Say RC
"FREE FI(SYSIN)"
Say RC
"FREE FI(SYSPRINT)"
Say RC
Exit

This error comes only when i include Address Ispexec "SELECT PGM(FILEAID)" this statement icon_sad.gif

Plz help

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

Global Moderator


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

PostPosted: Tue Jun 23, 2009 6:30 pm
Reply with quote

What are the contents of the SYSIN DD
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Tue Jun 23, 2009 6:33 pm
Reply with quote

Sysin data:

$$DD01 RLPRINT MEMBER=(COPYCV1)
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Tue Jun 23, 2009 6:55 pm
Reply with quote

I got it icon_smile.gif

Reason:
All functions require at least one input dataset. Although File-AID/Batch can access 100
datasets in TSO mode, you must explicitly allocate and free any dataset other than DD01
or DD01O. The dataset identifier ($$DDxx) is required only when any dataset other than
DD01 is accessed.

I have used DD20 now its working fine.

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

Global Moderator


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

PostPosted: Tue Jun 23, 2009 7:00 pm
Reply with quote

Thank you for posting the solution, it may prove helpfull to others icon_wink.gif
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Calling an Open C library function in... CICS 1
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top