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
 

 

OMIT Records

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

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Thu Dec 22, 2011 1:17 pm    Post subject: OMIT Records
Reply with quote

Hi,

I have a Input file of LRECL 1200.

using SORT I want to reject the records which have all 'N' written starting from Byte position 601 till 1200.

ex. I want to reject records which have N(601th Pos)NNNNN..........N(1200 byte position).

Can anyone help on urgent note.

Regards
Puneet
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: Thu Dec 22, 2011 2:07 pm    Post subject:
Reply with quote

Yes, the documentation is available from the manuals indicated by the sticky post at the head of this forum.

Google gave 7,400+ results on omitting records, many examples which are available on this very forum.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Dec 22, 2011 10:01 pm    Post subject:
Reply with quote

Use the following DFSORT JCL which will give you the desired results
Code:

//STEP0100 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN=your input Fb 1200 byte file,DISP=SHR             
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  SORT FIELDS=COPY                           
  INREC OVERLAY=(1201:600C'N')               
  OUTFIL BUILD=(1,1200),                     
  OMIT=((0601,256,CH,EQ,1201,256,CH),AND,   
        (0857,256,CH,EQ,1457,256,CH),AND,   
        (1113,088,CH,EQ,1713,088,CH))       
//*
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Dec 23, 2011 3:27 am    Post subject:
Reply with quote

Hi Kolusu,

did you really have to create 600 bytes of N's, 256 bytes of N's would have been sufficient such as

Code:
  SORT FIELDS=COPY                               
  INREC OVERLAY=(1201:256C'N')                   
  OUTFIL BUILD=(1,1200),                         
  OMIT=((0601,256,CH,EQ,1201,256,CH),AND,         
        (0857,256,CH,EQ,1201,256,CH),AND,         
        (1113,088,CH,EQ,1201,088,CH))             


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

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Dec 23, 2011 8:29 pm    Post subject:
Reply with quote

How about:
Code:

 SORT FIELDS=COPY                 
 INCLUDE COND=(601,599,SS,EQ,C'Y') 


Assuming of course the opposite of "N" in "Y" in this application.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1825
Location: UK

PostPosted: Fri Dec 23, 2011 8:38 pm    Post subject:
Reply with quote

Or NE,'N'??!
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Dec 23, 2011 9:28 pm    Post subject:
Reply with quote

gcicchet wrote:
Hi Kolusu,

did you really have to create 600 bytes of N's, 256 bytes of N's would have been sufficient such as


Gerry,

You are right about 256. I was just showing how to validate 600 characters. puneetvirmani143 use the control cards provided by gerry.

Nic,

I think OP wanted to Check 600 characters of N in pos 601 thru 1200. So he needs to validate all the 600 bytes.
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 Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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