IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

syntax needed to allocate member dynamically.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalyanatiit

New User


Joined: 04 Sep 2005
Posts: 8

PostPosted: Fri Feb 10, 2006 7:40 pm
Reply with quote

Hai all,

Is it possible to allocate member dynamically?

with my case, my member name = CMFGHA

I need to write like this:

XXXXX = CMFGHA
"ALLOC DA(SYSDEV.IDVXM.GRP.COPY198("XXXXX")) F(UPDATEDD) OLD"

but its not working for me.

anybody can help in thE above syntax to make out

"ALLOC DA(SYSDEV.IDVXM.GRP.COPY198(CMFGHA)) F(UPDATEDD) OLD"

thanks
Kalyan
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Feb 10, 2006 7:49 pm
Reply with quote

There is nothing wrong with your ALLOC command sytax. Allocating a member of a PDS does not create a member. You need to open it and write something into it.

Follow your ALLOC with something like this:
Code:

XXXXX = CMFGHA                                                     
"ALLOC DA(SYSDEV.IDVXM.GRP.COPY198("XXXXX")) F(UPDATEDD) OLD"     
Queue " "                                                         
Queue ""                                                           
"EXECIO * DISKW UPDATEDD (FINIS"                                                     
Back to top
View user's profile Send private message
kalyanatiit

New User


Joined: 04 Sep 2005
Posts: 8

PostPosted: Fri Feb 10, 2006 7:59 pm
Reply with quote

hai superk,

thanks for immediate reply.

with that i am getting error like this.


Code:
INVALID DATA SET NAME, SYSDEV.IDVXM.GRP.COPY198(C9990WR1                       
MISSING DATA SET NAME OR *+                                                   
INVALID KEYWORD, )                                                             
MISSING NAME OF DATA SET TO BE ALLOCATED                                       
The input or output file UPDATEDD is not allocated. It cannot be opened for I/O
                                                                             
EXECIO error while trying to GET or PUT a record.                             
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Feb 10, 2006 8:40 pm
Reply with quote

Code:

INVALID DATA SET NAME

Seems to say it all. Are you sure that shouldn't be a fully qualified dataset name, such as:
Code:

"ALLOC DA('SYSDEV.IDVXM.GRP.COPY198("XXXXX")') F(UPDATEDD) OLD"
Back to top
View user's profile Send private message
kalyanatiit

New User


Joined: 04 Sep 2005
Posts: 8

PostPosted: Mon Feb 13, 2006 9:04 am
Reply with quote

I am still getting same error.

My exact code will rewrite 1st stament in the member.
Can anybody help in solving error.
if i am giving C1355M09 instead of "XXXXX" this code working fine.

but as per requirements, i need to give variable instead of name.

Code:
     XXXXX = C1355M09                                     
"ALLOC DA('SYSDEV.IDVXM.GRP.COPY198("XXXXX")') F(UPDATEDD) OLD"
"EXECIO 1 DISKRU UPDATEDD 1 (LIFO"                             
PULL LINE                                                     
PUSH '      *THIS LINE IS A COMMENT'                           
"EXECIO 1 DISKW UPDATEDD (FINIS"                               
"FREE F(UPDATEDD)"                                             

thanks alot,
-Kalyan
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Feb 13, 2006 10:41 am
Reply with quote

Make sure that your variable contains no leading or embedded blanks. You can use STRIP and SPACE for that purpose.

O.
Back to top
View user's profile Send private message
kalyanatiit

New User


Joined: 04 Sep 2005
Posts: 8

PostPosted: Mon Feb 13, 2006 4:22 pm
Reply with quote

Oh...Yeah..

thank u very much ofer71.

problem got solved.

thanks alot,
Kalyan.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
Search our Forums:

Back to Top