View previous topic :: View next topic |
Author |
Message |
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Aug 28, 2006 12:17 am Post subject: How to created member using rexx? |
|
|
Hi,
I am new to rexx. Wanted to know if its possible to create a member (name passed by a variable) in a PDS.
I want to read a flat file, a part of which will have the member name that is to be created.
How can i do it? Any idea?
Thanks
Abhishek |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 28, 2006 12:21 am Post subject: |
|
|
First, there are no REXX statements for creation of member, but you can use either TSO commands or ISPF servics.
Using TSO - all you have to do is just allocate the PDS(MEMBER) to a file, and just EXECIO DISKW into it.
With ISPF services - you can use LMMADD.
O.
________
glass bongs
Last edited by ofer71 on Sat Feb 05, 2011 11:43 am; edited 1 time in total |
|
Back to top |
|
|
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Aug 28, 2006 2:15 am Post subject: |
|
|
So the TSO commands have to be used in the REXX if i m not wrong? I know the EXECIO DISKW command but creation of member is the problem.
ALLOC DA statement creates a PDS and i have used that. Can the same be used o create a member (giving the member name in bracket)? |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 28, 2006 2:24 am Post subject: |
|
|
If the PDS already exist, you need to ALLOC the PDS and the member.
If you want to create new PDS and new member, you will have to ALLOC the PDS first (with NEW), then FREE it and them ALLOC again the PDS(MEMBER).
O.
________
RC series
Last edited by ofer71 on Sat Feb 05, 2011 11:43 am; edited 1 time in total |
|
Back to top |
|
|
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Aug 28, 2006 3:04 am Post subject: |
|
|
oh fine....thanks a lot.i will try this way. |
|
Back to top |
|
|
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Aug 28, 2006 4:53 am Post subject: |
|
|
HI ofer,
I did the same. I allocated the PDS(MEMBER) after allocating the PDS. But when i tried to browse the PDS, it throws the error message "INVALID BLOCKSIZE"
I tried allocating the member using LIKE command as well as without that.
Any idea how it can be done? |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 28, 2006 5:07 am Post subject: |
|
|
You can't allocate the member with NEW...
O.
________
Ford XM Falcon picture
Last edited by ofer71 on Sat Feb 05, 2011 11:44 am; edited 1 time in total |
|
Back to top |
|
|
anbesivam Beginner
Joined: 09 Aug 2006 Posts: 66 Topics: 14
|
Posted: Mon Aug 28, 2006 5:10 am Post subject: |
|
|
Try this:
'ALLOC FI(SYSUT1) DSN('''!!TRIM(DSN) !!''') NEW CATALOG'!!
' CYL SPACE(1,1) LRECL(80) BLKSIZE(1800) RECFM(FB)'!!
' DSORG(PS) DIR(0)';
Costomize above with ur requirement. |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 28, 2006 5:43 am Post subject: |
|
|
anbesivam - You can use your example for member allocation since it is NEW.
O.
________
sativa strains
Last edited by ofer71 on Sat Feb 05, 2011 11:45 am; edited 1 time in total |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 28, 2006 6:51 am Post subject: |
|
|
Sorry (again) - "You can't...
O.
________
full melt hash
Last edited by ofer71 on Sat Feb 05, 2011 11:45 am; edited 1 time in total |
|
Back to top |
|
|
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Aug 28, 2006 7:02 am Post subject: |
|
|
oh no.....i cant???...there should be some way. plz tell me whenever u come to know. |
|
Back to top |
|
|
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Mon Aug 28, 2006 7:19 am Post subject: |
|
|
tried doing without NEW but not working still..... It says "NO MEMBERS IN DATA
SET" |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Mon Aug 28, 2006 7:51 am Post subject: |
|
|
Code: |
/* REXX */
NEWMEM = 'IMNEW '
"ALLOC DD(MYPDS) DA(PDS("STRIP(NEWMEM)")) SHR REU"
QUEUE ""
"EXECIO 1 DISKW MYPDS (FINIS"
"FREE DD(MYPDS)"
EXIT 0
|
works just fine. Please post your code and maybe we can help. |
|
Back to top |
|
|
abhishek_snn Beginner
Joined: 24 Aug 2006 Posts: 16 Topics: 5
|
Posted: Tue Aug 29, 2006 2:57 am Post subject: |
|
|
Hey i could do it using MOD.....thanks a lot guys. |
|
Back to top |
|
|
|
|