View previous topic :: View next topic
|
Author |
Message |
kalyanatiit
New User
Joined: 04 Sep 2005 Posts: 8
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
kalyanatiit
New User
Joined: 04 Sep 2005 Posts: 8
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
kalyanatiit
New User
Joined: 04 Sep 2005 Posts: 8
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Make sure that your variable contains no leading or embedded blanks. You can use STRIP and SPACE for that purpose.
O. |
|
Back to top |
|
|
kalyanatiit
New User
Joined: 04 Sep 2005 Posts: 8
|
|
|
|
Oh...Yeah..
thank u very much ofer71.
problem got solved.
thanks alot,
Kalyan. |
|
Back to top |
|
|
|