Page 1 of 1

Read 2 PDS dataset members and write them into new PDS

PostPosted: Sun Oct 28, 2012 1:04 pm
by pandian9789
Hi,
I am new to REXX.
I have 2 PDS datasets each datasets having 3 members. I want to read all the members from 2 input PDS datasets and write into a new PDS. Can anybody pls help on this?

PDS1:Input
1.ABC
2.DEF
3.GHI

PDS2:Input
1.JKL
2.MNO
3.PQR

PDS3(OUTPUT PDS):
1.ABC
2.DEF
3.GHI
4.JKL
5.MNO
6.PQR

Re: Read 2 PDS dataset members and write them into new PDS

PostPosted: Sun Oct 28, 2012 1:19 pm
by enrico-sorichetti
Why REXX ?

look at the manuals and read about IEBCOPY

Re: Read 2 PDS dataset members and write them into new PDS

PostPosted: Sun Oct 28, 2012 5:22 pm
by pandian9789
My requirement is in REXX only.. thats y .. and also pls let me know Is possible to compare line by line(2 PDS members)in REXX,if matched then write them into another PDS member?

Re: Read 2 PDS dataset members and write them into new PDS

PostPosted: Sun Oct 28, 2012 6:09 pm
by Akatsukami
These things can be done, more easily with ISPF services than with pure Rexx. But, as Dr. Sorichetti indicates, Rexx is a grossly inferior tool for this purpose, particularly when such utilities as IEBCOPY, SuperC, etc. already exist; you will find coding complicated and performance ranging from inferior to unacceptable.

I recommend that as you undertake this task that you also update your résumé/CV, so that you may get away from the incompetent and moronic team lead, system analyst,or project manager that thought (and I use the word very loosely indeed) it up.

Re: Read 2 PDS dataset members and write them into new PDS

PostPosted: Sun Oct 28, 2012 7:30 pm
by NicC
OK, being genereous and assumng that this is more of an exercise than a real reuirement, why not look in the forum for posts asking the about reading PDS members and get your hints from the replies to those. I can think of at least 4 ways of doing this. As to comparing two datasets if you are looking for an exact match on every line then this is simple. If you are looking to report on differences then do not bother - user Superc or whatever compare utility is prferred in your place. Do your own research if you want to get on, do not have others do it for you.

Re: Read 2 PDS dataset members and write them into new PDS

PostPosted: Sun Oct 28, 2012 8:10 pm
by enrico-sorichetti
My requirement is in REXX only..


WHY ?

You should meditate a bit on a process tokens

the need
range of solutions
resources available, and that includes the skills

if You do not have the skill You should be happy of having a different solution.

but You are always free to look Yourself at the ISPF manuals for the LMMCOPY services and related examples


and also pls let me know Is possible to compare line by line(2 PDS members)in REXX,if matched then write them into another PDS member?


everything is possible if You have the resources ... time and skill

but again why reinvent the wheel
along the notes of JINGLE BELLS

SUPERC... SUPERC... THAT' S THE TOOL YOU NEED :mrgreen: