Hello everybody,
i am back with yet another query.
i am sending you a piece of code i would like somebody to please give me a solution by looking at the following piece of code..
var.0 = 0
SAY 'PLEASE ENTER DATA SET NAME'
PULL DATA_SET
x = outtrap('var.')
"listds '"DATA_SET"' members"
do i = 1 to var.0
say 'no. of members are' var.0
say var.i
end
"alloc da( ? ) f(indd) shr reuse"
"execio * diskr indd (stem v."
in the above code my aim is to access the members which are stored in "VAR." variable. i would like to know what should be the value in DA( ? ) so that i will be able to access the members.
thanks
Bodhi
Rexx Query... Please help
- MrSpock
- Global moderator
- Posts: 809
- Joined: Wed Jun 06, 2007 9:37 pm
- Skillset: REXX, JCL, DFSORT, Syncsort, Axway MFT, Connect:Direct, FTP, SFTP
- Referer: ibmmainframes.com
- Location: Raleigh NC USA
- Contact:
Re: Rexx Query... Please help
Presuming that the whole concept here is to read and process each member of the PDS, then:
Code: Select all
/* REXX */
Say 'PLEASE ENTER DATA SET NAME'
Pull data_set
data_set = Space(data_set,0)
x = Outtrap('var.')
"LISTDS '"data_set"' MEMBERS"
x = Outtrap('Off')
Say 'No. of members is' var.0
Do i = 7 To var.0
Say var.i
Parse Var var.i member .
"ALLOC DA('"data_set"("member")') F(indd) SHR REU"
"EXECIO * DISKR indd (STEM v. FINIS"
Say v.0
Drop v.
End
"FREE F(indd)"
Exit 0