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
 
How to allocate file using rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
praveenmaga

New User


Joined: 27 Jun 2009
Posts: 6
Location: Bangalore

PostPosted: Tue Nov 10, 2009 2:19 am    Post subject: How to allocate file using rexx
Reply with quote

When I try to run my rexx thru online, the following message is populated.
"PBCL.LISTID.LIST1' file is already allocated. Please help me what i am doing syntex error.
INVALID DATA SET NAME, "PBCL.LIDID.LIST1"
MISSING DATA SET NAME OR *+
MISSING NAME OF DATA SET TO BE ALLOCATED
***
*********************************************
My rexx code:
/*******REXX**********/
'ALLOCATE DDN(HI) DSN("PBCL.LIDID.LIST1") SHR'
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Nov 10, 2009 2:21 am    Post subject: Reply to: How to allocate file using rexx
Reply with quote

You have the quotation marks backwards. It should be:

/*******REXX**********/
"ALLOCATE DDN(HI) DSN('PBCL.LIDID.LIST1') SHR"
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Nov 10, 2009 2:22 am    Post subject: Reply to: How to allocate file using rexx
Reply with quote

... and you should get yourself into the habit of always using REUSE

/*******REXX**********/
"ALLOCATE DDN(HI) DSN('PBCL.LIDID.LIST1') SHR REUSE"
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Tue Nov 10, 2009 2:36 am    Post subject:
Reply with quote

and be sure to FREE dsn in your REXX script.

If your REXX script bombs before your script executes the FREE dsn statement,
you can do a command line TSO FREEE 'dsn' before you test your REXX script again.
Back to top
View user's profile Send private message
praveenmaga

New User


Joined: 27 Jun 2009
Posts: 6
Location: Bangalore

PostPosted: Tue Nov 10, 2009 2:59 am    Post subject:
Reply with quote

thnx..its working fine now.
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 Nov 10, 2009 12:47 pm    Post subject:
Reply with quote

Easy enough to duplicate one line that frees all of the files used in a REXX, one copy at the start, one at the end.
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
This topic is locked: you cannot edit posts or make replies. GDG gen check using REXX raghuraman123 CLIST & REXX 6 Wed Apr 18, 2018 9:18 pm
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

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