count no. of records based upon condition.



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

count no. of records based upon condition.

Postby ranga_subham » Mon Oct 13, 2008 10:20 pm

Hi,

I want to count number of records from a very big file based on condition.

The file has got some records with '?????' at position 727. So, I want to count only those records. How to do it? LRECL of file is 780 and RECFM is FB.

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

Re: count no. of records based upon condition.

Postby dick scherrer » Tue Oct 14, 2008 5:13 am

Hello,

Copy the input file to an output file specified as DD DUMMY using INCLUDE to select the records you want.

The count of the copied records will be in the informatoinal output from the run.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: count no. of records based upon condition.

Postby ranga_subham » Tue Oct 14, 2008 2:54 pm

Dick, as per your suggestion I could come up with the below code........ It worked and I got the results as expected......... :D

//STEP0002 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTOUT  DD DUMMY                                         
//SORTIN   DD DSN=USERX.SECND.OUTER.BARXRAY.FISCHERS.BACKS,
//            DISP=(SHR,KEEP,KEEP)                           
//SYSIN    DD *                                             
 SORT FIELDS=COPY                                           
 INCLUDE COND=(727,5,CH,NE,C'?????')                         
/*                                                           
//*                                                         


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

Re: count no. of records based upon condition.

Postby dick scherrer » Wed Oct 15, 2008 2:42 am

You're welcome - good to hear it is working.

Thank you for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post