IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Use the variables as a member name for alloc in editmacro


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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
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: 2358
Location: Israel

PostPosted: Wed Feb 07, 2007 3:27 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
No new posts JCL with variables JCL & VSAM 1
No new posts Library member auto insert option TSO/ISPF 3
Search our Forums:

Back to Top