Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Dataset is open. Not able to free it from ddname

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Dataset is open. Not able to free it from ddname
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: 8657
Location: Back in jolly old England

PostPosted: Tue Jun 23, 2009 6:30 pm    Post subject:
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    Post subject: Reply to: Dataset is open. Not able to free it from ddname
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    Post subject: Reply to: Dataset is open. Not able to free it from ddname
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: 8657
Location: Back in jolly old England

PostPosted: Tue Jun 23, 2009 7:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
This topic is locked: you cannot edit posts or make replies. How could i share my personal dataset... samenxia163 TSO/ISPF 1 Fri Mar 09, 2018 12:18 pm
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us