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
 

 

Is find and replace possible?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Mon Jan 08, 2007 9:50 pm    Post subject: Is find and replace possible?
Reply with quote

Hi,
I have a File A - many records - Its FB , lrecl=183
Code:
AAAA12-31-9999yyyy98.8908
AAAA02-18-2006vterg98.8908
AAAA10-10-2006yyyy98.8908


and FILE B only one record, it is FB, Lrecl = 378
Code:
BBBByunheea098798YBGT01-01-2007y657980.00


I want to find the date
Code:
12-31-9999
from FILE A and replace it with the date from FILEB
Code:
01-01-2007
.
Is there any way to do it in a JCL? pls help
Thanks,
Viji
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jan 08, 2007 10:15 pm    Post subject:
Reply with quote

Is the date location in FILE A always the same?
Do you have DFSORT?
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Mon Jan 08, 2007 10:28 pm    Post subject: Re: Is find and replace possible?
Reply with quote

Yes. the location of the date field in both the files are always same.
Yes I have DFSORT.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Jan 08, 2007 10:55 pm    Post subject:
Reply with quote

Viji,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input fileB (FB/378)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTREC FIELDS=(C'Newdate,C''',22,10,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input fileA (FB/183)
//SORTOUT DD DSN=... output file (FB/183)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(5,10,CH,EQ,C'12-31-9999'),
    OVERLAY=(5:Newdate))
/*
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Tue Jan 09, 2007 12:17 am    Post subject: Re: Is find and replace possible?
Reply with quote

Thanks Frank.
It worked out fine. I was not aware of OVERLAY function using literal substitutes. Can you sugesst me any link to read more about these features.
Thanks,
Viji
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jan 09, 2007 1:43 am    Post subject:
Reply with quote

You can read about all of the DFSORT features introduced in Dec, 2004 at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/pdug/

You can read about all of the DFSORT features introduced in April, 2006 at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/peug/

Additionally, all of these features are documented in the DFSORT books available at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


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