Read 2 PDS dataset members and write them into new PDS



IBM's Command List programming language & Restructured Extended Executor

Read 2 PDS dataset members and write them into new PDS

Postby pandian9789 » Sun Oct 28, 2012 1:04 pm

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
pandian9789
 
Posts: 3
Joined: Sun Oct 28, 2012 12:46 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby enrico-sorichetti » Sun Oct 28, 2012 1:19 pm

Why REXX ?

look at the manuals and read about IEBCOPY
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

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

Postby pandian9789 » Sun Oct 28, 2012 5:22 pm

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?
pandian9789
 
Posts: 3
Joined: Sun Oct 28, 2012 12:46 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Akatsukami » Sun Oct 28, 2012 6:09 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby NicC » Sun Oct 28, 2012 7:30 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby enrico-sorichetti » Sun Oct 28, 2012 8:10 pm

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:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post