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

Changing a string in a flat file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prathap Pillai P

New User


Joined: 08 Sep 2005
Posts: 16

PostPosted: Thu Oct 12, 2006 12:40 pm
Reply with quote

I have a string (say AA)in a flat file(not fora PDS member) and i want to change all the string starting with AA to BB.Is there any JCL utility to do the same.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Oct 12, 2006 12:49 pm
Reply with quote

Hi Prathap,

please refer ur prev post.

ibmmainframes.com/viewtopic.php?t=14500&highlight=

Just give ur flat file name .
Back to top
View user's profile Send private message
Prathap Pillai P

New User


Joined: 08 Sep 2005
Posts: 16

PostPosted: Thu Oct 12, 2006 2:02 pm
Reply with quote

Hi Ekta

I tried that but it didnt work,So if u have any JCl for Flat files. Please send it across me.

Thanks
Prathap
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Oct 12, 2006 3:59 pm
Reply with quote

IF there is FILEAID utility in your Shop, Try this JCL:

//**
//STEP010 EXEC PGM=FILEAID
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD03 DD DISP=SHR,DSN=XXX.XXXX.XXXX
//SYSIN DD *
$$DD03 UPDATE ME=9999,
EA=(1,0,T"TAX",C"TAX1")
/*

~Vamsi
Back to top
View user's profile Send private message
Prathap Pillai P

New User


Joined: 08 Sep 2005
Posts: 16

PostPosted: Thu Oct 12, 2006 5:12 pm
Reply with quote

Hey Vamsi,

Thanks its working
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Sep 02, 2008 11:26 pm
Reply with quote

You can now use DFSORT's new FINDREP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) to do this kind of thing quite easily like this:


Code:

//S1   EXEC  PGM=ICEMAN                                         
//SYSOUT    DD  SYSOUT=*                                         
//SORTIN DD DSN=...  input file                                                   
//SORTOUT DD DSN=...  output file   
//SYSIN    DD    *                                               
  OPTION COPY                                                   
  INREC FINDREP=(IN=C'AA',OUT=C'BB')                               
/*


For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:

Use [URL] BBCode for External Links
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 5
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top