• Rajesh A R

F1 for Mainframe

F1 for Mainframe

Tag Archives: sum

SORT – SUM FIELDS

13 Tuesday Mar 2012

Posted by rajeshar in SORT

≈ 1 Comment

Tags

fields, mainframe, SORT, sum

SORT – SUM FIELDS

//SORTIT EXEC PGM=SORT

//SYSOUT DD SYSOUT=*

//SORTIN DD DSN=USERID.SORT.INPUT,DISP=SHR

//SORTOUT DD DSN= USERID.SORT.OUTPUT,

// DISP=(NEW,CATLG,DELETE),

// UNIT=(WORK,8),

// SPACE=(CYL,(5,1),RLSE),

// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)

//SORTWK01 DD UNIT=WORK,SPACE=(CYL,(5,1))

//SORTWK02 DD UNIT=WORK,SPACE=(CYL,(5,1))

//SYSIN DD *

SORT FIELDS=(19,2,CH,A)


SUM FIELDS=(1,7,ZD)

/*

//* END OF JOB

Note: The SUM control statement deletes records with equal control fields and optionally summarizes specified numeric fields on those records. If numeric fields are to be summarized, the data in the summary fields is added, the sum is placed in one of the records, and the other record is deleted. Provided arithmetic overflow does not occur, the SUM statement produces only one record per sort key in the output data set.

XSUM means the deleted records are to be written to the data set defined by the SORTXSUM DD statement.

——————————————————————————————————–

In United States, If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog

——————————————————————————————————–

You may also like to look at:

Working on Mainframes – Is Change to a different technology necessary
SORT – CONVERT PD to ZD and BI to ZD
SORT – EDIT FIRST AND LAST RECORD
SORT – EDIT MASK PATTERNS
SORT – EDIT NUMERIC FIELDS (I,T,S)
SORT – FINDREP, IFTHEN and INREC
SORT – How to use VB dataset (VLSHRT)
SORT – INCLUDE and OMIT
SORT – INREC, INCLUDE and OMIT
SORT – JUSTIFY, SQUEEZE and OVERLAY
SORT – LOOKUP AND CHANGE
SORT – OUTPUT DATASET DCB (LRECL,RECFM,BLKSIZE)
SORT – OUTREC – INSERT ZEROES, BLANKS, STRINGS
SORT – OUTREC – TRAN
SORT – PARSE – REFORMAT VARIABLE FIELDS
SORT – Process Order of CONTROL Statements
SORT – REMOVE DUPLICATES AND WRITE THEM TO XSUM
SORT – SET RETURN CODE ‘04’ IF OUTPUT FILE IS EMPTY
SORT – SKIPREC and STOPAFT
SORT – SUM FIELDS
SORT – TO REPLACE A CHAR WITH ANOTHER CHAR – ALTSEQ
SORT – INREC
SORT – SYMBOLS
SORT JOB – SIMPLE COPY
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
SORT JOIN – UNPAIRED RECORDS INDICATOR

 

Rate this:

Newer posts →

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2020
  • July 2020
  • February 2020
  • January 2020
  • September 2019
  • August 2019
  • October 2018
  • April 2018
  • March 2018
  • December 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • May 2015
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • January 2013
  • December 2012
  • November 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • April 2011
  • March 2011
  • August 2009
  • June 2009
  • April 2009

Categories

  • Azure
  • CA7
  • CICS
  • COBOL
    • Keywords
  • DB2
  • EASYTRIEVE
  • FILEAID
  • FILEMAXX
  • IMS
  • ISPF
  • JCL
  • KNOW YOUR MAINFRAME
  • Mainframe Migration
  • MAINFRAMES
  • Others
  • REXX
  • SDSF
  • SORT
  • Training
  • TSQL
  • VSAM

Meta

  • Create account
  • Log in

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • F1 for Mainframe
    • Join 90 other subscribers
    • Already have a WordPress.com account? Log in now.
    • F1 for Mainframe
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar