Page 1 of 1

How to include a blank line

PostPosted: Thu Feb 03, 2011 3:46 pm
by Shruthi
Hi,

Need some help...

My input file would be like:

In US Number of customers processed : 100
In US Number of customers rejected : 10
In US Number of customers approved : 90
In DK Number of customers processed : 100
In DK Number of customers rejected : 10
In DK Number of customers approved : 90
In EU Number of customers processed : 100
In EU Number of customers rejected : 10
In EU Number of customers approved : 90

I need to format the file to include a blank line and contents in output file should be like:

In US Number of customers processed : 100
In US Number of customers rejected : 10
In US Number of customers approved : 90

In DK Number of customers processed : 100
In DK Number of customers rejected : 10
In DK Number of customers approved : 90

In EU Number of customers processed : 100
In EU Number of customers rejected : 10
In EU Number of customers approved : 90

can i do this using any sort techniques... please help.

Re: How to include a blank line

PostPosted: Thu Feb 03, 2011 10:26 pm
by skolusu
shruthi,

Use the following DFSORT JCL. I assumed that your first 5 characters designate the key break.

//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD *                                   
IN US NUMBER OF CUSTOMERS PROCESSED : 100         
IN US NUMBER OF CUSTOMERS REJECTED  : 10         
IN US NUMBER OF CUSTOMERS APPROVED  : 90         
IN DK NUMBER OF CUSTOMERS PROCESSED : 100         
IN DK NUMBER OF CUSTOMERS REJECTED  : 10         
IN DK NUMBER OF CUSTOMERS APPROVED  : 90         
IN EU NUMBER OF CUSTOMERS PROCESSED : 100         
IN EU NUMBER OF CUSTOMERS REJECTED  : 10         
IN EU NUMBER OF CUSTOMERS APPROVED  : 90         
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                   
  SORT FIELDS=COPY                               
  OUTFIL REMOVECC,SECTIONS=(1,5,SKIP=L)           
//*

Re: How to include a blank line

PostPosted: Fri Feb 04, 2011 9:19 am
by Shruthi
Thanks Kolusu... Your assumption was right...the sort worked perfectly...thanks once again