Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to eliminate , in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
gp_parag

New User


Joined: 11 Jun 2007
Posts: 2
Location: Chennai

PostPosted: Tue Jun 12, 2007 4:22 pm    Post subject: How to eliminate , in a file
Reply with quote

Hi everyone,

need a solution for this problem...

A record in a file has contents like this

745,221,059

Using a fileaid command how can I eliminate the "," from this record

Could any one illustrate using a code
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Tue Jun 12, 2007 4:49 pm    Post subject:
Reply with quote

Don't know fileaid, but there have been several sort solutions posted here in the past.....
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 Jun 12, 2007 4:59 pm    Post subject:
Reply with quote

And REXX will do it too
Back to top
View user's profile Send private message
loga_nathan_m

New User


Joined: 07 Jun 2007
Posts: 40
Location: India

PostPosted: Tue Jun 12, 2007 5:46 pm    Post subject:
Reply with quote

hi,

hope using fileaid you cannot eliminate a particular column.

you can only eliminate records depending on a particular condition.

u can eliminate the comma(,) by using sort command.

Code:


input: 745,221,059

OUTREC FIELDS=(1:1,3,4:5,3,7:9,3)
SORT FIELDS=COPY   

output: 745221059
         
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 12, 2007 5:57 pm    Post subject:
Reply with quote

Hello,

Keep in mind that the posted solution will only work if the value is exactly 9 digits and 2 commas. Often that may not be the case in the real data.
Back to top
View user's profile Send private message
gp_parag

New User


Joined: 11 Jun 2007
Posts: 2
Location: Chennai

PostPosted: Wed Jun 13, 2007 11:50 am    Post subject:
Reply with quote

Hi Loga,
I see ur solution with respect to the format I gave...
but my requirement is to look for comma & then eliminate it from the file.
The comma can occour anywhere say.

Could you help me out
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed Jun 13, 2007 12:02 pm    Post subject:
Reply with quote

Quote:
look for comma & then eliminate

COBOL INSPECT and REPLACE
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 13, 2007 6:24 pm    Post subject:
Reply with quote

Hello,

If you inspect and find a comma, what would you replace it with?

Keep in mind that the commas are between some numbers, the numbers must be "shifted" together - "12,345,678" would become "12345678" not "12 345 678".
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed Jun 13, 2007 8:56 pm    Post subject:
Reply with quote

I agree with you dick.

Please Ignore my response.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 13, 2007 11:32 pm    Post subject:
Reply with quote

Hello,

What else is in this file? How many fields are there in a record? How many might have commas (or other punctuation) this might need to be removed?

Is this strictly a Compuware question or might some other tool be acceptable?

If better served, i will move this to a different place in the forums. . .
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us