Page 1 of 1

Count the lines of codes in a program and sort.

Posted: Sun Jan 12, 2014 3:59 pm
by Angel
Hi,

I'm trying to find out a way of knowing the lines of codes in my program using SyncSort. Actually, for a repository purpose, we've to maintain the lines of codes for a given program and this is a regular task. Could someone please suggest how to proceed?

Re: Count the lines of codes in a program and sort.

Posted: Mon Jan 13, 2014 11:42 am
by zprogrammer
Try this

Code: Select all

//S1    EXEC  PGM=SORT                                        
//SYSOUT    DD  SYSOUT=*                                      
//SORTIN DD DSN=<INPUT FILE>,DISP=SHR                                
//SORTOUT DD SYSOUT=*                                          
//SYSIN    DD    *                                            
  SORT FIELDS=COPY                                              
  OUTFIL REMOVECC,                                              
  TRAILER1=('NUMBER OF LINES IN PROGRAM :',COUNT=(M11,LENGTH=8))      
/*

Re: Count the lines of codes in a program and sort.

Posted: Mon Jan 20, 2014 1:34 pm
by Angel
Thanks Pandora. This code helps me.

Thanks.