IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL SORT question


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pankaj1002

New User


Joined: 30 Jul 2012
Posts: 18
Location: India

PostPosted: Thu Oct 11, 2012 6:18 pm
Reply with quote

I want to replace a certain string in one dataset with value taken from another dataset-

Dataset1:-
XXX@@@ P0000001 YYYYY
AAAAAAAAABBBBBBBBCCC
P0000001.XXXXXXXXXXXX

Dataset2:-
P000005


like in this example i need to replace all P0000001 in dataset1 to P000005 which it should read from Dataset2.

Probably SORT can do it but I need help urgently, thanks[/b]
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 11, 2012 6:40 pm
Reply with quote

Have a look at this.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 11, 2012 6:56 pm
Reply with quote

or at this
www.ibmmainframes.com/viewtopic.php?t=59655&highlight=

Quote:
I need help urgently

who in hell cares icon_evil.gif icon_evil.gif icon_evil.gif
remember
we reply on our own time and free of charge
in other words when and if we feel like

there is no commitment to reply,
there should be no expectation to get an answer
Back to top
View user's profile Send private message
pankaj1002

New User


Joined: 30 Jul 2012
Posts: 18
Location: India

PostPosted: Thu Oct 11, 2012 7:17 pm
Reply with quote

[quote="enrico-sorichetti"]or at this
www.ibmmainframes.com/viewtopic.php?t=59655&highlight=

This example has fixed field position but in my requirement I need to Replace all that data wherever it is in the dataset and also retain all other rows.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 11, 2012 7:23 pm
Reply with quote

while I agree that both links posted do not tackle the variable position,
as far as my link is concerned it would be enough to omit the include/exclude logic!
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Oct 11, 2012 7:25 pm
Reply with quote

It's too bad that you don't know COBOL or Rexx, Pankaj; it would a trivial thing to write a program in those languages to perform this task, instead of begging for sort control cards that you can't understand.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 11, 2012 7:31 pm
Reply with quote

p@nk@j~,

Did you look at the other link at all?

If your data is variable as to its position, how about looking at how to use FINDREP? Which is "find" as in look for something in a position that does not have to be known and "replace" which means "replace". As long as you manage to get the arguments the same length, nothing else will "move" in your data.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Oct 11, 2012 9:01 pm
Reply with quote

p@nk@j~,

Do you know the strings to be replaced ?

What I mean to ask is

Code:
XXX@@@ P0000001 YYYYY
AAAAAAAAABBBBBBBBCCC
P0000001.XXXXXXXXXXXX



Will P0000001 change from run-run?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 11, 2012 10:26 pm
Reply with quote

Hello,

As has been mentioned, a public forum is not the best place for help if the issue is "urgent".

If you do need this so quickly, suggest you consider an implementation using something you know rather than trying to get someone to provide a Sort solution (or any other).

Which sort product is being used?

I believe you can do what you want using SYMNAMES and FINDREP if you intend to pursue the sort solution. There are many examples in the forum.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top