Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
syntax needed to allocate member dynamically.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
kalyanatiit

New User


Joined: 04 Sep 2005
Posts: 8

PostPosted: Fri Feb 10, 2006 7:40 pm    Post subject: syntax needed to allocate member dynamically.
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
References
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3265
Location: Charlotte,NC USA

PostPosted: Fri Feb 10, 2006 7:49 pm    Post subject: Re: syntax needed to allocate member dynamically.
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    Post subject:
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

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3265
Location: Charlotte,NC USA

PostPosted: Fri Feb 10, 2006 8:40 pm    Post subject: Re: syntax needed to allocate member dynamically.
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    Post subject:
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: 1930
Location: Israel

PostPosted: Mon Feb 13, 2006 10:41 am    Post subject:
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    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1