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 

Creating Members via Rexx without pressing ENTER key

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


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Mon Jul 18, 2016 6:10 am    Post subject: Creating Members via Rexx without pressing ENTER key Reply with quote

Hi

I'm new to the rexx programming. Im trying to create a pds and creating multiple members in that pds. The following code is creating multiple members depends upon the number of members that the user enters. But after creating one member, whenever we press enter then only it is going to the loop and creating another member. Could you please let me know how to create multiple members without pressing enter.
Code:

/*REXX*/                                                       
SAY 'ENTER NUMBER OF MEMBERS'                                   
PULL NUM                                                       
SAY NUM                                                         
K = NUM                                                         
COUNT1 = 0                                                     
 ADDRESS TSO                                                   
 "ALLOC DA('"TEST.X99.XXXX.XREXX5"') F(OUTDD)                   
           NEW SPACE(10,20) DIR(100) TRACKS REUSE"             
                                                             
                                                               
 J=1                                                           
 DO K = 1 TO NUM                                               
    IF K > 1 THEN                                                 
      DO                                                           
       J = J + 1                                                   
      END                                                                 
                                                                       
  MEMBER = '        '                                                   
  MEMBER = 'MEM'||0||J                                                   
  DSNNAME = 'TEST.X99.XXXX.XREXX5' || '('||MEMBER||')'                   
  QUEUE  "MEMBER"                                                       
  "ALLOC DA('"DSNNAME"') F(OUTDD) SHR REUSE"                             
  "EXECIO * DISKW OUTDD (FINIS)"                                         
 END
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Jul 18, 2016 8:38 am    Post subject: Reply with quote

It would help if you used the code tags when posting code - they will retain indentation.

I don't know why you put your j = j + 1 within a DO/END construct or why you blank out MEMBER and then recreate it - the recreation will replace the previous contents.

To avoid hitting <enter> use the write option of EXECIO properly - give the exact number of lines to write.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Mon Jul 18, 2016 12:44 pm    Post subject: Reply with quote

kirank,

1. Please post your questions in the appropriate forum. A REXX question does NOT belong in Application Programming. It belongs in TSO and ISPF. I have moved the topic to TSO and ISPF

2. Use meaningful topics (don't use the Forum name for the topic). Use a descriptive Title to explain your problem. Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question. I edited the title for you.

3. As Nic pointed out, Please learn to use code tags. Here is a link to the topic that describes how code tags needs to be used. I added them for you. From next time you need to code them by yourselves.

http://www.mvsforums.com/helpboards/viewtopic.php?p=19031#19031

4. As Nic pointed out you need to have execio the number of records you want to write. if your intention is to write a single record then you simply have "EXECIO 1 DISKW OUTDD (FINIS)" and you wouldn't require pressing the ENTER key
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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