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

OMIT Records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Dec 22, 2011 2:07 pm
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
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: 1702
Location: Australia

PostPosted: Fri Dec 23, 2011 3:27 am
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
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: 2455
Location: Hampshire, UK

PostPosted: Fri Dec 23, 2011 8:38 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
Search our Forums:

Back to Top