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

Syncsort - omit all records with low-values


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Tue Jul 09, 2013 9:46 pm
Reply with quote

Hi,

Please let me know how to remove all the records having low-values (just not only x'00' but every possible low-value !!) from a PS file with 1 million records. What should be supplied in OMIT COND? Please help.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Jul 09, 2013 9:55 pm
Reply with quote

ramsri wrote:
Hi,

Please let me know how to remove all the records having low-values (just not only x'00' but every possible low-value !!) from a PS file with 1 million records. What should be supplied in OMIT COND? Please help.

And what "low-values" other than X'00' are possible?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 09, 2013 10:04 pm
Reply with quote

Hello,

And it isn't even Monday . . .

Please list all the hex values you want to OMIT.
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Tue Jul 09, 2013 10:14 pm
Reply with quote

Well, there are 255 possibilities. You have 1. What are the others you want OMITted?
publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlf101a.doc%2Fxlflr%2Fasciit.htm

…or maybe you need INCLUDE COND. Good luck.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 10, 2013 3:11 pm
Reply with quote

Since it is a user file we are not sure what are all the possibilities and just don't want to limit it to X'00' alone. So, we are looking for a possible solution to omit all 255 combinations (thanks to Gary).
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 10, 2013 3:18 pm
Reply with quote

Confused from Brussels icon_neutral.gif

If you want to omit all 255 possibilities, use IEBGENER or IEFBR14 to set up an empty file with the same attributes as the input file and it is done.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Jul 10, 2013 3:32 pm
Reply with quote

Or just amend the program not to read that dataset. Possibly do not create the dataset in the first place (but other programs may need it).
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 10, 2013 3:54 pm
Reply with quote

I've tried this piece of Easytrieve code but it works only on X'00' but not on any other values such as X'01', X'02'.......so on icon_sad.gif

Code:

//SYSIN    DD *                             
 DEFINE FULL-NAME W 10 A VALUE '          '
 JOB INPUT NULL                             
      IF FULL-NAME LOW-VALUES               
         DISPLAY 'LOW-VALUES IN INPUT'     
      ELSE                                 
         DISPLAY FULL-NAME                 
      END-IF                               
 STOP                                       


Can we conclude that either Easytrieve or SORT products can't handle it?

Thanks.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Jul 10, 2013 4:00 pm
Reply with quote

I do not not know about easytrieve but it is simple in sort but you have to define what are 'low values'. A byte can have 255 values from x'00' to x'FF' - you said all 255 'low' values which means ALL values. IF your low values are consecutive - say x'00' to x'0A' then you can omit on LT x'10' or include on GT x'0A'. If your low values can be anywhere in a string then use the search function of your sort product (SS I think).
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Jul 10, 2013 4:20 pm
Reply with quote

ramsri wrote:
I've tried this piece of Easytrieve code but it works only on X'00' but not on any other values such as X'01', X'02'.......so on icon_sad.gif

Code:

//SYSIN    DD *                             
 DEFINE FULL-NAME W 10 A VALUE '          '
 JOB INPUT NULL                             
      IF FULL-NAME LOW-VALUES               
         DISPLAY 'LOW-VALUES IN INPUT'     
      ELSE                                 
         DISPLAY FULL-NAME                 
      END-IF                               
 STOP                                       

Has it occurred to you that LOW-VALUES actually has a meaning? icon_mad.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 10, 2013 4:25 pm
Reply with quote

Why not talk directly with the user, telling them that the file is not correct, and ask them to do something about it.

Akatsukami - yes agreed, I have always been led to believe that low values was X'00' and X'00' alone
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Wed Jul 10, 2013 5:09 pm
Reply with quote

The VALUE you DEFINEd for FULL-NAME is 10-SPACES - hex '40404040404040404040'.
So, if you use an "IF" statement in Easytrieve to test your 10-byte field in hex be sure to use all 10 hex characters.

You could code in Easytrieve…
Code:
IF FULL-NAME = X'40404040404040404040' 
OR FULL-NAME = X'00000000000000000000'
*---
IF FULL-NAME = SPACES
OR FULL-NAME = LOW-VALUES
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Jul 10, 2013 5:16 pm
Reply with quote

ramsri,
I think you are confusing 'non-displayable characters' with low values.

If you eliminating records having x'00' to x'FF', then it would eliminate all records.

the alphabet 'A' which is displayable would have hex value of x'C1'
'B' would be x'C2' and so on.. all displayable characters like ABCD123456 have hex value for each digit.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Jul 10, 2013 5:52 pm
Reply with quote

Quote:
I think you are confusing 'non-displayable characters' with low values.

Ramsri has been a member for almost 5 years now so he should have been aware of what a 'low value' is and the bit patterns that make up a byte about 5 years ago!
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 10, 2013 7:48 pm
Reply with quote

Quote:

say x'00' to x'0A' then you can omit on LT x'10' or include on GT x'0A'. If your low values can be anywhere in a string then use the search function of your sort product (SS I think).


I will try this idea.......thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 10, 2013 7:53 pm
Reply with quote

Hello,

If the values to be "kept" or the values to be "skipped" cannot be identified, the code cannot be implemented icon_exclaim.gif

When these values (one way or the other) your Sort produce, Easytrieve, and COBOL can do what is needed. So can any other programming language and some utilities.

The "doing" may be tedious, but is rather simple.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 10, 2013 7:53 pm
Reply with quote

Code:

//STEP0001 EXEC PGM=SORT         
//SORTIN   DD *                 
          --> X'01'                       
          --> X'02'                       
A                               
B                               
//SORTOUT  DD SYSOUT=*           
//SYSOUT   DD SYSOUT=*           
//SYSIN    DD *                 
 SORT FIELDS=COPY               
 OMIT COND=(1,1,BI,LT,X'10')     
//*                             


Output:
Code:
A
B


Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 10, 2013 10:18 pm
Reply with quote

Hello,

What about x'22', or x'15' or x'33' etc?

I suspect you might want lt x'40' . . .

Hex below spaces x'40':
Code:
000002 hex table                                 
       88A4A88984444444444444444444444444444444444
       8570312350000000000000000000000000000000000
--------------------------------------------------
000003                                   00 - 0F 
       0404040404040404040404040404040444FF464FC44
       00102030405060708090A0B0C0D0E0F000000000600
--------------------------------------------------
000004                                   10 - 1F 
       1414141414141414141414141414141444FF464FC44
       00102030405060708090A0B0C0D0E0F000100001600
--------------------------------------------------
000005                                   20 - 2F 
       2424242424242424242424242424242444FF464FC44
       00102030405060708090A0B0C0D0E0F000200002600
--------------------------------------------------
000006                                   30 - 3F 
       3434343434343434343434343434343444FF464FC44
       00102030405060708090A0B0C0D0E0F000300003600
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jul 11, 2013 1:18 pm
Reply with quote

Hi,

maybe something like this might help
Code:
//S1       EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SYMNAMES DD *                                         
CHECK,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'             
/*                                                       
//SORTIN   DD *                                         
 234567                                                 
1234567                                                 
123 567                                                 
AAAA 67                                                 
AAAA367                                                 
ABCDEFG                                                 
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                         
  OPTION COPY                                           
  INCLUDE FORMAT=SS,                                     
    COND=(1,1,EQ,CHECK,&,                               
          2,1,EQ,CHECK,&,                               
          3,1,EQ,CHECK,&,                               
          4,1,EQ,CHECK,&,                               
          5,1,EQ,CHECK,&,                               
          6,1,EQ,CHECK,&,       
          7,1,EQ,CHECK)         
//*                             



Gerry
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Jul 11, 2013 3:24 pm
Reply with quote

Gerry, thanks for the idea. Our file has LRECL of 109.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Jul 11, 2013 4:43 pm
Reply with quote

Modified Gerry's idea like below and got results......I need to experiment more icon_surprised.gif

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 11, 2013 7:45 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jul 11, 2013 8:20 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 11, 2013 9:07 pm
Reply with quote

That is why i posted the first part of my little "hex table". . . icon_wink.gif

Maybe we'll get there. . .

d
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jul 12, 2013 5:19 am
Reply with quote

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
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 -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top