Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Use the variables as a member name for alloc in editmacro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
jaipriya

New User


Joined: 30 Jan 2007
Posts: 2
Location: India

PostPosted: Wed Feb 07, 2007 2:07 pm    Post subject: Use the variables as a member name for alloc in editmacro
Reply with quote

Actually rec.i is a variable but i don know why rec.i is not replaced with the value. If anyone found the error in this format please post the reply

Code:

/*REXX*/                                           
"ISREDIT MACRO (PDS)"                             
X=OUTTRAP('REC.')                                 
"LISTDS '"PDS"' MEMBERS"                           
X=OUTTRAP('OFF')                                   
ADDRESS TSO                                       
"ALLOC F(INPFILE)  DA('"PDS".BACKUP("REC.I")') SHR" 
  "ALLOC F(OUTFILE) DA('"PDS".BACKUP("REC.I")') SHR"
  "EXECIO * DISKR  INPFILE (STEM INPDATA.FINIS"   
  "EXECIO * DISKW  OUTFILE (STEM INPDATA.FINIS"   
SAY "FILE COPIED SUCCESSFULLY"
Back to top
View user's profile Send private message

avaneendra_linga

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Wed Feb 07, 2007 2:45 pm    Post subject: loop for I
Reply with quote

HI,
I HOPE THIS WILL HELP YOU....
FIRST U NEED TO INITIALIZE I TO 1(I=1)
AND IN LOOP U NEED TO INCREMENT THE I (I=I+1).
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 07, 2007 3:27 pm    Post subject:
Reply with quote

I believe you missed the DO loop after trapping the output of LISTDS...

O.
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Wed Feb 07, 2007 3:42 pm    Post subject:
Reply with quote

Hi,
Try this code

Code:

/*REXX*/
DATASET=Give Ur PDS Name Here in single quotes
X = OUTTRAP('VAR.')                           
"LISTDS" DSN "MEMBERS"                       
X = OUTTRAP('OFF')                           
 DO I = 7 TO VAR.0                           
   CONC = "'"DATASET"("STRIP(VAR.I)")'"       
   "ALLOC DA("CONC") FI(INDD) SHR REUSE"
   "ALLOC DA("CONC") FI(OUTDD) SHR REUSE"       
   "EXECIO * DISKR INDD (STEM X. FINIS)"     
   "EXECIO * DISKW OUTDD (STEM X. FINIS)"     
 END
SAY "FILE COPIED SUCCESSFULLY"


Regards,
Mani
Back to top
View user's profile Send private message
jaipriya

New User


Joined: 30 Jan 2007
Posts: 2
Location: India

PostPosted: Thu Feb 08, 2007 10:59 am    Post subject: Re: Use the variables as a member name for alloc in editmacr
Reply with quote

Hi mani ur code is working fine thanks for ur reply
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us