Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL SORT question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL SORT question
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Oct 11, 2012 6:40 pm    Post subject: Reply to: JCL SORT question
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Oct 11, 2012 6:56 pm    Post subject: Reply to: JCL SORT question
Reply with quote

or at this
http://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    Post subject: Re: Reply to: JCL SORT question
Reply with quote

[quote="enrico-sorichetti"]or at this
http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Oct 11, 2012 7:23 pm    Post subject: Reply to: JCL SORT question
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: 1738
Location: Bloomington, IL

PostPosted: Thu Oct 11, 2012 7:25 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Oct 11, 2012 7:31 pm    Post subject: Reply to: JCL SORT question
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

Moderator


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

PostPosted: Thu Oct 11, 2012 9:01 pm    Post subject:
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

Site Director


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

PostPosted: Thu Oct 11, 2012 10:26 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us