View previous topic :: View next topic
|
Author |
Message |
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Modified Gerry's idea like below and got results......I need to experiment more
Code: |
//STEP0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
234567
1234567
123 567
AAAA 67
AAAA367
ABCDEFG
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,7,SS,NE,C' ')
|
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What you have now is NOT going to do what you posted as the requirement. . .
The newest "code" will NOT remove "low-values" or anything other than a space. . .
It is worrisome that after at least 5 years of working with this environment the difference between a space, low-values, and other unprintable characters is still not understood. . . |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
I assumed that the space was actually a non-displayable character - so it could be most things below x'42' (on my system). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
That is why i posted the first part of my little "hex table". . .
Maybe we'll get there. . .
d |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
ramsri,
You first have to decide, and be very clear about, what values you want to exclude records for.
You next need to be clear about a rule for applying the exclusion (like any character in the record, or any character in position 1-20, or in multiple positions, whatever).
You have 256 possibilities, from X'00' to X'FF'. Identify the hex values you want excluded. Show some sample data. LRECL, RECFM.
By all means experiment, but you really much be clear of your target. |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Bill,
Quote: |
You have 256 possibilities, from X'00' to X'FF'. Identify the hex values you want excluded.
|
The aim is to figure out the data that appears like "....." when we open a dataset in browse mode (view mode was not possible because of its size). I am trying to figure out what are all the hex values that appear as "...." in a dataset so that I can write exclude list.
Thanks. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
ramsri wrote: |
Bill,
Quote: |
You have 256 possibilities, from X'00' to X'FF'. Identify the hex values you want excluded.
|
The aim is to figure out the data that appears like "....." when we open a dataset in browse mode (view mode was not possible because of its size). I am trying to figure out what are all the hex values that appear as "...." in a dataset so that I can write exclude list.
Thanks. |
That's pretty much OMITting all non-printable characters. It might be easier to INCLUDe only the printable characters...
Garry. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Is the data all "text"?
Do you have a record layout(s)?
Are the "non-display" bytes in fixed positions?
It will probably still be easier to look for the non-display, because you want to ignore records if any non-display character, rather than include records where the bytes you are interested in are all displayable. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Even if it is an "ANY", still we need to list out all of those non-display character if we are to ignore records with any one of them, don't we?. Besides, do we have such a list here? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It may help if you post a few of the actual records in hex.
Where does this input originate? |
|
Back to top |
|
|
subdalal
New User
Joined: 27 Sep 2010 Posts: 21 Location: Boudh
|
|
|
|
Hi,
I think this problem can be solved with Sort. The line of codes can also be reduced.
The Sort card would be for Low-Values:
SORT FIELDS=COPY
OMIT COND=(STARTING_POSITION,LENGTH,SS,EQ,X'00')
Similarly for High-Values:
SORT FIELDS=COPY
OMIT COND=(STARTING_POSITION,LENGTH,SS,EQ,X'FF').
And this can be done for any values by providing the respective Hexa-Decimal value. |
|
Back to top |
|
|
|