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
 

 

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: 4648
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: 4648
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: 6966
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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