Using The ADD function



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

Using The ADD function

Postby rayngerfan » Fri Mar 19, 2010 4:56 pm

I have a flat file RECFM=FB,LRECL=160 which contatins th following data. I would like to add the 3 EMAILS record counts which start in COL 126. I was going to use the OUTREC, with the ADD function, but I wasn't sure of the ADD function format.

I want to copy the first 1 - 125 records and then add the email totals in col starting in col 126.

01 26,192 02 26,192 03 26,192 04 26,192 05 26,192 06 26,192
07 26,192 08 26,192 09 26,192 10 26,192 11 26,192 12 26,192 EMAILS 942,946
01 15,734 02 15,734 03 15,734 04 15,734 05 15,734 06 15,734
07 15,734 08 15,734 09 15,734 10 15,734 11 15,734 12 15,734 EMAILS 566,449
01 5,276 02 5,276 03 5,276 04 5,276 05 5,276 06 5,276
07 5,276 08 5,276 09 5,276 10 5,276 11 5,276 12 5,276 EMAILS 189,955


Thanks
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using The ADD function

Postby Alissa Margulies » Fri Mar 19, 2010 8:04 pm

Here is an example you can modify to accommodate your actual data:
//SORT1 EXEC PGM=SORT                                                     
//SORTOUT DD SYSOUT=*                                                     
//SYSOUT  DD SYSOUT=*                                                     
//SORTIN  DD *                                                             
01 26,192 02 26,192 03 26,192 04 26,192 05 26,192 06 26,192               
07 26,192 08 26,192 09 26,192 10 26,192 11 26,192 12 26,192 EMAILS 942,946
01 15,734 02 15,734 03 15,734 04 15,734 05 15,734 06 15,734               
07 15,734 08 15,734 09 15,734 10 15,734 11 15,734 12 15,734 EMAILS 566,449
01  5,276 02  5,276 03  5,276 04  5,276 05  5,276 06  5,276               
07  5,276 08  5,276 09  5,276 10  5,276 11  5,276 12  5,276 EMAILS 189,955
//SYSIN    DD *                                                           
  SORT FIELDS=COPY                                                         
  OUTFIL TRAILER1=(52:'TOTAL EMAILS ',                                     
         TOT=(68,7,UFF,EDIT=(II,III,IIT))),REMOVECC                       
/*                                                                         

Based on the above data and control statements, the following output would be produced:
01 26,192 02 26,192 03 26,192 04 26,192 05 26,192 06 26,192               
07 26,192 08 26,192 09 26,192 10 26,192 11 26,192 12 26,192 EMAILS 942,946
01 15,734 02 15,734 03 15,734 04 15,734 05 15,734 06 15,734               
07 15,734 08 15,734 09 15,734 10 15,734 11 15,734 12 15,734 EMAILS 566,449
01  5,276 02  5,276 03  5,276 04  5,276 05  5,276 06  5,276               
07  5,276 08  5,276 09  5,276 10  5,276 11  5,276 12  5,276 EMAILS 189,955
                                                   TOTAL EMAILS  1,699,350
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: 3 times

Re: Using The ADD function

Postby rayngerfan » Sat Mar 20, 2010 7:50 pm

Hi Alissa

That code worked perfect. Can you tell me what parameters UFF & (II,III,IIT) mean?

I know they have to do with the format of how the total record number will be displayed, but I want to understand what each parameter is doing.

Thanks
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using The ADD function

Postby dick scherrer » Sat Mar 20, 2010 9:35 pm

Hello,

Suggest you download the documentation. . .

UFF is Unsigned Free Format and EDIT=(II,III,IIT) is the edit mask.
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: Using The ADD function

Postby rayngerfan » Sat Mar 20, 2010 9:41 pm

Hi Dick

Thanks for the information. Do you have a link to where I could download the documentation.
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using The ADD function

Postby dick scherrer » Sat Mar 20, 2010 11:00 pm

Hello,

Send Alissa a note.

There is no "open" Syncsort download site.
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: Using The ADD function

Postby Alissa Margulies » Mon Mar 22, 2010 8:03 pm

rayngerfan,

Contact me offline at alissa.margulies@syncsort.com and I would be happy to assist you with acquiring the manuals.
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: 3 times


Return to Syncsort/Synctool