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
 

 

Junk Characters removal from File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu May 08, 2014 5:50 pm    Post subject: Junk Characters removal from File
Reply with quote

Dear All,

I have a file where I have a lot of junk characters present in between data, for example

Code:
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î ÏÐ Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è


Earlier I had only few junk charaters that were there in the file and I was able to remove them using a sort statement ALTSEQ option, but now the data has been increasing and I would want to replace these characters with spaces , in other words any characters that are apart from

1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
has to be replaced by spaces in a specific field, can this be done, if so please let me know.

Regards,
Thamilzan.[/code][/quote]
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7224

PostPosted: Thu May 08, 2014 5:56 pm    Post subject: Reply to: Junk Characters removal from File
Reply with quote

I'm always wary of just blatting things. "Junk" is just data. Before knowing if I can get rid of it, I'd want to know what it was, how it got there, and then decide what to do once that is known.

For the lazy-don't-know-don't-care-even-if-it-returns-to-haunt-me-later solution, why can't you expand your ALTSEQ?
Back to top
View user's profile Send private message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu May 08, 2014 6:08 pm    Post subject: Reply to: Junk Characters removal from File
Reply with quote

Hello Bill,

Thanks for the quick reply, the junk characters come from a long thread from the UAT users who do enter such junk from their online screen, we did ask our other support team to handle these, but unfortunately they could not do so, I still wonder why, so eliminating the junk from the source was ruled out and we started looking on to work around.

The problem if I expand the ALTSEQ command is, the number of junk are very huge, and that would result in a huge control card for my sort, and the challenge is, in case on a fine day where a new junk comes which is not handled in my ALTSEQ, the program will abend again. I have these junk in a specific field in a FB file, so I am looking for a sort card which would convert all the junk to spaces , leaving behind only numerals and alphabets.

A very simple idea is to convert the whole field to spaces , but unfortunately we are using some part of it in our business logic in reports.

Regards,
Thamilzan.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7224

PostPosted: Thu May 08, 2014 6:25 pm    Post subject: Reply to: Junk Characters removal from File
Reply with quote

Unless you are using multi-byte characters, you have a non-huge 256 possibilities.

You can always generate the ALTSEQ have a look at this post for something you may be able to re-use for that task.

I'm not suggesting you use the FINDREP, just use this as an example for how to generate things for your ALTSEQ.
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: Thu May 08, 2014 8:33 pm    Post subject:
Reply with quote

Hello,

Quote:
the junk characters come from a long thread from the UAT users who do enter such junk from their online screen, we did ask our other support team to handle these, but unfortunately they could not do so, I still wonder why, so eliminating the junk from the source was ruled out and we started looking on to work around.
There is NO good reason to allow the invalid date to enter the system. . . icon_evil.gif

Only valid data should be carried forward.

Sounds like this application is not very well managed . . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Thu May 08, 2014 9:47 pm    Post subject:
Reply with quote

Could the data be coming to you in UTF-8 or UTF-16 format and you just don't recognize that? Many such characters may look like "junk" to the untrained eye yet represent valid data values with the correct code page.

And the term "junk characters" is just plain wrong. The collating sequence defines all possible characters, and none of them are "junk". They may not be what you think they should be, and you may need to change them, but there was a reason they were generated in the first place and if you don't know why they are there, you CERTAINLY cannot claim that they are "junk".
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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