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: 8593
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: 8593
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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