Page 1 of 2

how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 3:08 pm
by bodhi
Hello Everybody,

Can anyone please tell me how to access a Partitioned data set in Rexx?

Please show me the Syntax as well, if possible.


regards
Bodhi

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 4:22 pm
by mcna
i write rexx software 4 IBM, not bad hey.

if u need more help i will try, but i have forgot some of it. ive moved on to C++ now


"diskr" for read
and "diskw" for write

link a dd name to a file "alloc ddn(<linked name>) da('"<full filename>"') shr" example "alloc ddn(Output) da('"chrism.test(test)"') shr"

read example
"EXECIO <no of lines> DISKR <linked name> (stem <varible to stem line into>." example "EXECIO * DISKR Output (stem line."
no of lines is the amount of lines to read in. * for all line
the output will be put into line. line.0 is line 1, line.1 is line 2 and so on (i think). if you want to do a read loop to process all line do i = 1 to lines.0 and use line.i for the line currently being processed

to close the file for read
"execio 0 diskr <Linked name>(finis" example "execio 0 diskr Ouput(finis"


write example
"EXECIO <no of lines> DISKW <linked name> (stem <varible to stem in file>." example "EXECIO * DISKW Output (stem line."
no of lines is the amount of lines to write in. not sure if u can use *, probaly best no to

to close file for write
"execio 0 diskw <Linked name>(finis" example "execio 0 diskw Ouput(finis"

to release the linked name
"Free DDn(<linked name>)" example "Free DDn(Ouput)"

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 4:51 pm
by mcna
okay,

i will give u a beta example

i want to read from chris.test(test), put data into line. and process the data

"alloc ddn(Output) da('"chrism.test(test)"') shr"
"EXECIO * DISKR Output (stem line."
"execio 0 diskr Ouput(finis"
"Free DDn(Ouput)"

do i = 1 to lines.0 and
if word(line.i,3) = 'hello' then do

end

end

sorry i cant remember any of the commands

write


in.1 = 'you'
in.2 = 'are'
in.3 = 'happy'

"alloc ddn(Output) da('"chrism.test(test)"') shr"
"EXECIO 3 DISKw Output (stem in."
"execio 0 diskw Ouput(finis"
"Free DDn(Ouput)"

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 5:14 pm
by bodhi
thank you for sending me the process but i know that process (how to access a data set)
but i want to know is it possible to access 10 members of a data set by giving only the data set name at the terminal after running the REXX program.


Girish

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 5:30 pm
by mcna
sorry, i dont no.

i will have a look to see if i find anything

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 5:35 pm
by mcna
sorry, i am a bit busy

but here someone else is trying to do the same

try a google search of "rexx list members of a partitioned dataset"

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 5:42 pm
by mcna
well, to do it i think u will av 2 get the members of the dataset in to a stack, or group of varibles

with that data you could acces each of the members in turn. using alloc


sorry, if thats no good i cant help. never had to do it before

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 6:58 pm
by bodhi
hi MCNA,

could you please give me an example?

Bodhi

Re: how to access a Partitioned data set in Rexx?

PostPosted: Wed Aug 01, 2007 8:04 pm
by MrSpock
How do you normally do this task? How would you handle this in TSO? In ISPF? In batch? In COBOL?

REXX has nothing "built-in" for PDS support. Therefore, as I've stated to you before, you need to look to your external environment to handle this type of task.

Re: how to access a Partitioned data set in Rexx?

PostPosted: Fri Aug 03, 2007 8:54 pm
by MrSpock
Has this topic been abandoned?

Anyway, logically one would think that, if their job required them to deal with the processing of PDS's, they would either be provided with an appropriate set of tools, or would have received some training from their storage team as to how to work with them.

There are many MVS utilities and TSO commands that can deal with PDS's in one way or another. If it were me, and if I had to do this function over and over again, I'd take the time to sit down and learn how to use the ISPF Library Management Services to really be able to interact with the PDS file structures. They are designed specifically for this purpose, so why not take advantage of them?