Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us