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
 

 

Charcter Replacing

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Tue Dec 16, 2008 4:33 pm    Post subject: Charcter Replacing
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: 92
Location: Hyderabad

PostPosted: Tue Dec 16, 2008 5:05 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 16, 2008 5:14 pm    Post subject:
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: 92
Location: Hyderabad

PostPosted: Tue Dec 16, 2008 5:18 pm    Post subject:
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    Post subject: Reply to: Charcter Replacing
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    Post subject: Reply to: Charcter Replacing
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: 92
Location: Hyderabad

PostPosted: Wed Dec 17, 2008 12:20 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts replacing junk with hyphen Nitin32 DFSORT/ICETOOL 10 Fri Jun 02, 2017 7:47 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Replacing Start Transid with LINK pkmurali CICS 12 Tue Apr 19, 2016 8:22 pm
No new posts ADRDSSU Restore - How to prevent repl... Lipi.Prasannan JCL & VSAM 12 Fri Oct 02, 2015 12:13 am
No new posts Matching and replacing JOIN KEYS for ... JAYACHANDRAN THAMPY SYNCSORT 17 Mon Feb 16, 2015 5:03 am


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