View previous topic :: View next topic
|
Author |
Message |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Pardon my ignorance - what is "unprintable characters"? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
rough ( very rough ) approach...
those that You cannot see in ISPF BROWSE/VIEW/EDIT |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Anuj D. wrote: |
Pardon my ignorance - what is "unprintable characters"? |
Quote: |
( should not be present on the keyboard) |
|
|
Back to top |
|
|
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Frank,
Could the INCLUDE be phrased with NEs and ANDs?
Bill |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
|