copy only records with NON-NUMERIC data



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

copy only records with NON-NUMERIC data

Postby ranga_subham » Sat Oct 04, 2008 8:22 pm

Hi,

We have a file with millions of records and need to copy only those records which have non-numeric data in position 10 (length 20).

How to write INCLUDE condition for this in Syncsort v1.2.3.1R?

Please help.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: copy only records with NON-NUMERIC data

 

Re: copy only records with NON-NUMERIC data

Postby Alissa Margulies » Mon Oct 06, 2008 8:29 pm

The easiest solution is available in SyncSort for z/OS 1.3:
//SYSIN DD *
    SORT FIELDS=COPY
    INCLUDE COND=(10,20,ZD,NE,NUM)


But I believe the following code should produce the desired results as well:
//SYSIN DD *                                         
   SORT FIELDS=COPY                                 
   OMIT COND=(10,1,CH,GE,C'0',AND,10,1,CH,LE,C'9',AND,
       11,1,CH,GE,C'0',AND,11,1,CH,LE,C'9',AND,
       12,1,CH,GE,C'0',AND,12,1,CH,LE,C'9',AND,
       13,1,CH,GE,C'0',AND,13,1,CH,LE,C'9',AND,
       14,1,CH,GE,C'0',AND,14,1,CH,LE,C'9',AND,
       15,1,CH,GE,C'0',AND,15,1,CH,LE,C'9',AND,
       16,1,CH,GE,C'0',AND,16,1,CH,LE,C'9',AND,
       17,1,CH,GE,C'0',AND,17,1,CH,LE,C'9',AND,
       18,1,CH,GE,C'0',AND,18,1,CH,LE,C'9',AND,
       19,1,CH,GE,C'0',AND,19,1,CH,LE,C'9',AND,
       20,1,CH,GE,C'0',AND,20,1,CH,LE,C'9',AND,
       21,1,CH,GE,C'0',AND,21,1,CH,LE,C'9',AND,
       22,1,CH,GE,C'0',AND,22,1,CH,LE,C'9',AND,
       23,1,CH,GE,C'0',AND,23,1,CH,LE,C'9',AND,
       24,1,CH,GE,C'0',AND,24,1,CH,LE,C'9',AND,
       25,1,CH,GE,C'0',AND,25,1,CH,LE,C'9',AND,
       26,1,CH,GE,C'0',AND,26,1,CH,LE,C'9',AND, 
       27,1,CH,GE,C'0',AND,27,1,CH,LE,C'9',AND, 
       28,1,CH,GE,C'0',AND,28,1,CH,LE,C'9',AND, 
       29,1,CH,GE,C'0',AND,29,1,CH,LE,C'9')
/*   
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: copy only records with NON-NUMERIC data

Postby ranga_subham » Mon Oct 06, 2008 10:14 pm

I've tried this and it worked as expected........Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post