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
 

 

Help needed on SORT to exclude records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
notonly4u

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Mon Nov 15, 2010 5:22 pm    Post subject:
Reply with quote

Hi Friends,

I want to omit the records having zeroes starting from 236 bytes to next 720 bytes.

But all are 72 times, 10 bytes packed decimal fields.

Can you please help me here?

Regards
Tanden
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: Mon Nov 15, 2010 5:41 pm    Post subject:
Reply with quote

Please DO NOT tag your topic onto an existing one. Especially one that has been dormant for some time.
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: Mon Nov 15, 2010 10:11 pm    Post subject:
Reply with quote

Tanden,

What is the RECFM and LRECL of your input file?
Back to top
View user's profile Send private message
notonly4u

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Tue Nov 16, 2010 2:54 pm    Post subject:
Reply with quote

Dear Frank,

My dataset is with LRECL=2155, FB.
Thanks for your reply.

Regards
Tanden
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Nov 16, 2010 11:13 pm    Post subject:
Reply with quote

notonly4u,

Use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT               
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD DSN=Your Input FB 2155 byte file,DISP=SHR
//SORTOUT  DD SYSOUT=*
  SORT FIELDS=COPY                                   
  OMIT COND=(236,10,PD,EQ,0,AND,246,10,PD,EQ,0,AND, 
             256,10,PD,EQ,0,AND,266,10,PD,EQ,0,AND, 
             276,10,PD,EQ,0,AND,286,10,PD,EQ,0,AND, 
             296,10,PD,EQ,0,AND,306,10,PD,EQ,0,AND, 
             316,10,PD,EQ,0,AND,326,10,PD,EQ,0,AND, 
             336,10,PD,EQ,0,AND,346,10,PD,EQ,0,AND, 
             356,10,PD,EQ,0,AND,366,10,PD,EQ,0,AND, 
             376,10,PD,EQ,0,AND,386,10,PD,EQ,0,AND, 
             396,10,PD,EQ,0,AND,406,10,PD,EQ,0,AND, 
             416,10,PD,EQ,0,AND,426,10,PD,EQ,0,AND, 
             436,10,PD,EQ,0,AND,446,10,PD,EQ,0,AND, 
             456,10,PD,EQ,0,AND,466,10,PD,EQ,0,AND, 
             476,10,PD,EQ,0,AND,486,10,PD,EQ,0,AND, 
             496,10,PD,EQ,0,AND,506,10,PD,EQ,0,AND, 
             516,10,PD,EQ,0,AND,526,10,PD,EQ,0,AND, 
             536,10,PD,EQ,0,AND,546,10,PD,EQ,0,AND, 
             556,10,PD,EQ,0,AND,566,10,PD,EQ,0,AND, 
             576,10,PD,EQ,0,AND,586,10,PD,EQ,0,AND, 
             596,10,PD,EQ,0,AND,606,10,PD,EQ,0,AND, 
             616,10,PD,EQ,0,AND,626,10,PD,EQ,0,AND, 
             636,10,PD,EQ,0,AND,646,10,PD,EQ,0,AND, 
             656,10,PD,EQ,0,AND,666,10,PD,EQ,0,AND, 
             676,10,PD,EQ,0,AND,686,10,PD,EQ,0,AND, 
             696,10,PD,EQ,0,AND,706,10,PD,EQ,0,AND, 
             716,10,PD,EQ,0,AND,726,10,PD,EQ,0,AND, 
             736,10,PD,EQ,0,AND,746,10,PD,EQ,0,AND, 
             756,10,PD,EQ,0,AND,766,10,PD,EQ,0,AND, 
             776,10,PD,EQ,0,AND,786,10,PD,EQ,0,AND, 
             796,10,PD,EQ,0,AND,806,10,PD,EQ,0,AND, 
             816,10,PD,EQ,0,AND,826,10,PD,EQ,0,AND, 
             836,10,PD,EQ,0,AND,846,10,PD,EQ,0,AND, 
             856,10,PD,EQ,0,AND,866,10,PD,EQ,0,AND, 
             876,10,PD,EQ,0,AND,886,10,PD,EQ,0,AND, 
             896,10,PD,EQ,0,AND,906,10,PD,EQ,0,AND, 
             916,10,PD,EQ,0,AND,926,10,PD,EQ,0,AND, 
             926,10,PD,EQ,0,AND,946,10,PD,EQ,0)     
//*
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: Wed Nov 17, 2010 1:57 am    Post subject:
Reply with quote

FWIW, here's another way to do it with DFSORT. This is a little easier to set up, but probably not as efficient. Also, it can only handle a C sign for the PD 0 values whereas Kolusu's job can handle any sign.

Code:

  OPTION COPY                                   
  INREC OVERLAY=(2156:72X'0000000000000000000C')
  OUTFIL OMIT=(236,256,BI,EQ,2156,256,BI,AND,   
     492,256,BI,EQ,2412,256,BI,AND,             
     748,208,BI,EQ,2668,208,BI),                 
    BUILD=(1,2155)                               
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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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