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: 6968
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: 8593
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
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

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