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
 

 

Syncsort - omit all records with low-values
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - omit all records with low-values
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: 1738
Location: Bloomington, IL

PostPosted: Tue Jul 09, 2013 9:55 pm    Post subject: Re: Syncsort - omit all records with low-values
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

Site Director


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

PostPosted: Tue Jul 09, 2013 10:04 pm    Post subject:
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    Post subject:
Reply with quote

Well, there are 255 possibilities. You have 1. What are the others you want OMITted?
https://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    Post subject: Reply to: Syncsort - omit all records with low-values
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 10, 2013 3:18 pm    Post subject:
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: 1715
Location: UK

PostPosted: Wed Jul 10, 2013 3:32 pm    Post subject:
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    Post subject: Reply to: Syncsort - omit all records with low-values
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: 1715
Location: UK

PostPosted: Wed Jul 10, 2013 4:00 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Wed Jul 10, 2013 4:20 pm    Post subject: Re: Reply to: Syncsort - omit all records with low-values
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 10, 2013 4:25 pm    Post subject:
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    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed Jul 10, 2013 5:16 pm    Post subject:
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: 1715
Location: UK

PostPosted: Wed Jul 10, 2013 5:52 pm    Post subject:
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    Post subject: Reply to: Syncsort - omit all records with low-values
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

Site Director


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

PostPosted: Wed Jul 10, 2013 7:53 pm    Post subject:
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    Post subject: Reply to: Syncsort - omit all records with low-values
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

Site Director


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

PostPosted: Wed Jul 10, 2013 10:18 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Jul 11, 2013 1:18 pm    Post subject:
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    Post subject: Reply to: Syncsort - omit all records with low-values
Reply with quote

Gerry, thanks for the idea. Our file has LRECL of 109.
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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