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

How to identify non printable bytes/chars


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

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Fri Apr 17, 2009 1:34 pm
Reply with quote

Hello,

Kindly help me with this query. If i need to identify the records with unprintable characters ( should not be present on the keyboard) in a particular field in a file, how can DFSORT be used.

Thanks in advance
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 17, 2009 1:58 pm
Reply with quote

Hi,

Pardon my ignorance - what is "unprintable characters"?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 17, 2009 4:15 pm
Reply with quote

rough ( very rough ) approach...
those that You cannot see in ISPF BROWSE/VIEW/EDIT icon_biggrin.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 17, 2009 4:39 pm
Reply with quote

Anuj D. wrote:
Pardon my ignorance - what is "unprintable characters"?
Quote:
( should not be present on the keyboard)
Back to top
View user's profile Send private message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Fri Apr 17, 2009 7:43 pm
Reply with quote

Hello,

Any luck on this please. The character should not be present on the key board. Records having such character in a particular field ( position is not specific - can be anywhere in the string ) need to be found out.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 17, 2009 7:49 pm
Reply with quote

The z/Architecture Reference Summary, SA22-7871, has a table of all possible characters in EBCDIC and their printing values. You can find this document easily through Google or www.s390.ibm.com and it will let you find the "unprintable characters" -- although you do need to be aware that the set of "unprintable characters" depends entirely upon the code page being used. Change the code page and some characters become printing (and possibly some that were printing become non-printing).
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: Fri Apr 17, 2009 8:42 pm
Reply with quote

surya4ug,

Let's assume the particular field is positions 11-20. You can do what you want using a DFSORT job like the following. However, you'll need to fill in the hexadecimal values for the "unprintable characters" (h1, h2, ..., hn). Note that the possible hex values are 00-FF.

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN   DD *
  OPTION COPY
  INCLUDE COND=(11,10,SS,EQ,X'h1',OR,
    11,10,SS,EQ,X'h2',OR,
    ...
    11,10,SS,EQ,X'hn')
/*
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 17, 2009 8:58 pm
Reply with quote

Frank,

Could the INCLUDE be phrased with NEs and ANDs?

Bill
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: Fri Apr 17, 2009 9:17 pm
Reply with quote

The INCLUDE as written will keep the records with unprintable characters.

You could use OMIT with NE and AND to delete the records without unprintable characters which would result in the same records as the INCLUDE:

Code:

  OMIT COND=(11,10,SS,NE,X'F1',AND, 
    11,10,SS,NE,X'F2',AND,           
    11,10,SS,NE,X'F3')               


But that seems like a rather convoluted way to do it vs the INCLUDE.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 17, 2009 10:18 pm
Reply with quote

Ah, I knew I was going to miss something, OMIT......
I was thinking that the list of 'printable' characters would be much smaller than the list of unprintable. But I realize that the OMIT with ANDs would take much longer since all conditions would have to be checked for every byte.
Too bad the SS does not support greater than & less than.....
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 How to identify the transaction categ... IMS DB/DC 3
No new posts Identify Program Insert DB2 7
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts Identify unused (junk) REXX scripts TSO/ISPF 30
No new posts How to identify bad performers? Testing & Performance 8
Search our Forums:

Back to Top