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

Charcter Replacing


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Tue Dec 16, 2008 4:33 pm
Reply with quote

I want to replace all , in record with :
Can anyone help me in this.

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

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Tue Dec 16, 2008 5:05 pm
Reply with quote

to make my requiremnet more clear
In a record where ever ther is a ',' I want to replace it with ':'



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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Dec 16, 2008 5:14 pm
Reply with quote

Any chance that you might mention which product / tool that may be on the list of those to use ?
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Tue Dec 16, 2008 5:18 pm
Reply with quote

Ohh I m really sorry for that Expat.

I want the above requirement to be done in Easytrieve.
Instead of checking each charected manually do we have any VERB or STRING Comand which can perform the replace activity.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue Dec 16, 2008 7:46 pm
Reply with quote

Hi dp33770,

If I am not mistaken, a similar topic was posted by you in the cobol forum. Your requirement was to replace ',' with ':' but only b/w quotes(").
I don't know, if its exactly the same thing you want to do in easytrieve.

As far as I know there is no INSPECT verb in easytrieve. You need to achieve this via some logical coding, character by character checking would be involved.

If its a straight forward conversion ,you can try using function FINDREP of DFSort.

Code:
//SYSIN DD *
OPTION COPY
INREC FINDREP=(INOUT=(C'Max',C'Maximum',C'Min',C'Minimum'))


Please let me know if this helps, or you only need ot code in easytrieve.
Thanks,
-Kapil.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue Dec 16, 2008 7:52 pm
Reply with quote

You may find this link useful, It has the complete easytrieve code for your problem.

Try finding the below question in the given URL: Find and replace a string in easytrieve

Q: I need to search a string for a specific character, and if the character is found, replace the found character with another character.

Hope you find it useful.
Thanks,
-Kapil.
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Wed Dec 17, 2008 12:20 am
Reply with quote

Hi kapil,
First of all thanks for reply.
Yes, I have posted similar kind of requirement in COBOL.
But here the requiremnet is simple. All I need to do is convert all ','to ':'

My I/P : 1020 RAM PRASAD 12/2,mahalaxmi aprt,hyd 3333

my Req:
STEP 1 : convert all ',' to ':'
1020 RAM PRASAD 12/2:mahalaxmi aprt:hyd 3333
STEP 2 : Fill in Fillers (',') in between fields to create a .CSV file
1020, RAM PRASAD, 12/2:mahalaxmi aprt:hyd, 3333
STEP 3 : The .CSV file will have ':' in its address field. Is there any way where I can again convert the ':' to ','. This has to be done automatically as I cant do it manually becoz this files is being FTPd after the job completes. I cant change the ':' to ',' before converting to .CSV also because this will create problem while creating .CSV

If you have any other suggestion where I can have ',' and still create .CSV then pls suggest.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Dec 17, 2008 2:31 am
Reply with quote

Instead of using commas to separate fields use tabs (x'05') they work just fine.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Finding record and replacing with val... DFSORT/ICETOOL 3
No new posts Replacing character string in file th... JCL & VSAM 9
No new posts Replacing PDSMAN with PDSFAST JCL & VSAM 10
No new posts JCL for replacing code in Cobol JCL & VSAM 7
Search our Forums:

Back to Top