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
 

 

How to identify non printable bytes/chars

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to identify non printable bytes/chars
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

Senior Member


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

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

Hi,

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Fri Apr 17, 2009 4:15 pm    Post subject: Reply to: How to identify non printable bytes/chars
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 17, 2009 4:39 pm    Post subject:
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    Post subject: Reply to: How to identify non printable bytes/chars
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: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Fri Apr 17, 2009 7:49 pm    Post subject:
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 http://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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 17, 2009 8:42 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 17, 2009 8:58 pm    Post subject:
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 17, 2009 9:17 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 17, 2009 10:18 pm    Post subject:
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    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 Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts Identify error records krsenthil85 DFSORT/ICETOOL 11 Thu Apr 28, 2016 9:45 pm
No new posts Identify comp/comp-3 data from file bipinpeter CLIST & REXX 8 Thu Jan 14, 2016 2:27 pm
No new posts FIXED BIN (31) and FIXED BIN (63) - H... sundarkudos PL/I & Assembler 4 Thu Nov 05, 2015 1:11 pm


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