MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to created member using rexx?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Aug 28, 2006 12:17 am    Post subject: How to created member using rexx? Reply with quote

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
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Aug 28, 2006 12:21 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Aug 28, 2006 2:15 am    Post subject: Reply with quote

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
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Aug 28, 2006 2:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Aug 28, 2006 3:04 am    Post subject: Reply with quote

oh fine....thanks a lot.i will try this way.
Back to top
View user's profile Send private message
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Aug 28, 2006 4:53 am    Post subject: Reply with quote

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
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Aug 28, 2006 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
anbesivam
Beginner


Joined: 09 Aug 2006
Posts: 66
Topics: 14

PostPosted: Mon Aug 28, 2006 5:10 am    Post subject: Reply with quote

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
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Aug 28, 2006 5:43 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Aug 28, 2006 6:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Aug 28, 2006 7:02 am    Post subject: Reply with quote

oh no.....i cant???...there should be some way. plz tell me whenever u come to know.
Back to top
View user's profile Send private message
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Mon Aug 28, 2006 7:19 am    Post subject: Reply with quote

tried doing without NEW but not working still..... Sad It says "NO MEMBERS IN DATA
SET"
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Aug 28, 2006 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Tue Aug 29, 2006 2:57 am    Post subject: Reply with quote

Hey i could do it using MOD.....thanks a lot guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group