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

DFSORT - Replace a character with another in PS file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chinnielr

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Thu Nov 23, 2006 12:00 pm
Reply with quote

Hi,

I have an Input PS text file. I want to replace a particular character wherever it appears in input file with another character.

For ex: In my input file $ character, appears at so namy places and in different positions, should be replaced with *.
Is there a way to change a particular character to another character without specifying the positions (as the character occurance are many and at different places in a huge file).

Thanks in adavnce,
Kiran.
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: Thu Nov 23, 2006 9:14 pm
Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1 EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD  *
  OPTION COPY
  ALTSEQ CODE=(5B5C)
  INREC FIELDS=(1,80,TRAN=ALTSEQ)
/*
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
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
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top