how to access a Partitioned data set in Rexx?



IBM's Command List programming language & Restructured Extended Executor

how to access a Partitioned data set in Rexx?

Postby bodhi » Wed Aug 01, 2007 3:08 pm

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
bodhi
 
Posts: 53
Joined: Mon Jul 30, 2007 5:01 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby mcna » Wed Aug 01, 2007 4:22 pm

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)"
mcna
 
Posts: 21
Joined: Tue Jul 31, 2007 7:16 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby mcna » Wed Aug 01, 2007 4:51 pm

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)"
mcna
 
Posts: 21
Joined: Tue Jul 31, 2007 7:16 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby bodhi » Wed Aug 01, 2007 5:14 pm

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
bodhi
 
Posts: 53
Joined: Mon Jul 30, 2007 5:01 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby mcna » Wed Aug 01, 2007 5:30 pm

sorry, i dont no.

i will have a look to see if i find anything
mcna
 
Posts: 21
Joined: Tue Jul 31, 2007 7:16 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby mcna » Wed Aug 01, 2007 5:35 pm

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"
mcna
 
Posts: 21
Joined: Tue Jul 31, 2007 7:16 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby mcna » Wed Aug 01, 2007 5:42 pm

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
mcna
 
Posts: 21
Joined: Tue Jul 31, 2007 7:16 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby bodhi » Wed Aug 01, 2007 6:58 pm

hi MCNA,

could you please give me an example?

Bodhi
bodhi
 
Posts: 53
Joined: Mon Jul 30, 2007 5:01 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby MrSpock » Wed Aug 01, 2007 8:04 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

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

Postby MrSpock » Fri Aug 03, 2007 8:54 pm

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?
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post