Showing posts with label DATASORT. Show all posts
Showing posts with label DATASORT. Show all posts

Tuesday, December 30, 2008

SUBSET

SUBSET is a new ICETOOL operator that allows you to create a subset of the input or output records with specific header, trailer, and relative records, or without specific header, trailer, and relative records. SUBSET gives you new capabilities for keeping or removing the first n records of your data set, the last n records of your data set, and/or specific relative records in your data set. SUBSET does not require an "identifier" in the records to be keptor removed; it keeps track of the first n records, relative record numbers, and the last n records automatically.

Various options of SUBSET allow you to define the criteria for keeping or removing records.

As an example, you could use the following SUBSET operator to keep the first two input records, the fifth, sixth and seventh input records, and the last input record.

SUBSET FROM(IN) TO(OUT) KEEP INPUT FIRST(2) RRN(5,7) LAST
I/P records:
HEADER 001
HEADER 002
Vicky
Frank
Regina
Viet
David
Dave
Carrie
Sam
Sri Hari
Martin
LAST 999

O/P records:
HEADER 001
HEADER 002
Regina
Viet
David
LAST 999

Syntax - The syntax for the SUBSET operator is as follows:
SUBSET FROM(indd) TO(outdd) DISCARD(savedd) KEEPREMOVE INPUTOUTPUT HEADERFIRSTHEADER(x)FIRST(x)
RRN(x)RRN(x,y)RRN(x,*) ...
TRAILERLASTTRAILER(x)LAST(x)
USING(xxxx) VSAMTYPE(x)

Detailed Description :
  • FROM(indd) - Specifies the ddname of the input data set.
  • TO(outdd) - Specifies the ddname of the output data set , TO and DISCARD can both be specified.
  • DISCARD(savedd) - DFSORT will write the records it does not select for the operation.
  • KEEP - Specifies that the records that meet the criteria are to be kept.
  • REMOVE - Specifies that the records that meet the criteria are to be removed.
  • INPUT - The criteria of records selection takes place before INREC or SORT.
  • OUTPUT - The criteria of records selection takes place after INREC or SORT.
  • RRN(x) - point to exact single records,
  • RRN(x,y) - specifies a range of records,
  • RRN(x,*) - Specifies relative record numbers x through the last record.

Hope you find it useful. Please do provide your comments or reactions. For further reference click here.

Sunday, December 28, 2008

DATASORT (Sort recs between header and trailer)

DATASORT is a new ICETOOL operator that allows you to sort the data records in a data set without sorting the header or trailer records. DATASORT gives you new capabilities for sorting the data records between header records (first n records of the data set) and trailer records (last n records of the data set) while keeping the header and trailer records in place.

EX : Your file has 100 records and you want to sort the file from 3rd record to 99th record only.

//TOOLIN DD *
DATASORT FROM(IN) TO(OUT) HEADER(2) TRAILER USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=(1,4,CH,A)

I/P :
Header 001
Header 002
BBBB
CCCC
AAAA
DDDD
Trailer 001

O/P :
Header 001
Header 002
AAAA
BBBB
CCCC
DDDD
Trailer 001

Hope you find it useful. Its pretty easy as it doesn't requires any identifiers for header and trailer records. Just mention header and trailer record numbers.

Please do provide your comments or reactions. For further reference click here.

Thursday, December 18, 2008

DFSORT, ICETOOL upgraded in 2008

DFSORT is IBM's high performance sort, merge, copy, analysis and reporting product. DFSORT is an optional feature of z/OS.

DFSORT is designed to optimize the efficiency and speed with which operations are completed through synergy with processor, device, and system features (for example, memory objects, Hiperspace, data space, striping, compression, extended addressing, DASD and tape device architecture, processor memory, processor cache, and so on) and other products (for example, The SAS System, COBOL, PL/I, IDCAMS BLDINDEX, and so on).

DFSORT includes the high-performance ICEGENER facility, the versatile ICETOOL utility, Symbols, and multiple output capability with the powerful OUTFIL feature.

z/OS DFSORT V1R5 PTF UK90013, which was first made available in July, 2008, provides important enhancements to DFSORT and DFSORT's ICETOOL. Below is the list of few newly enhanced functions:
  • Find and Replace (FINDREP).
  • Group Operations(WHEN=GROUP).
  • Sorting data between headers and trailers (DATASORT).
  • Keeping or Removing the first n records (SUBSET).
  • Selecting the first n duplicate records (SELECT with FIRST(n) and FIRSTDUP(n)).
  • Splicing with non-blank fields (SPLICE with WITHANY).
  • Displaying and Writing counts (DISPLAY with COUNT, ect).
  • Reports with multiple and multipart titles (DISPLAY and OCCUR with TITLE, etc).
  • Reports without carriage control characters (DISPLAY and OCCUR with NOCC).
  • Additional defaults (BLKSIZE for DUMMY, SKIP=0L for SECTIONS, etc).
  • Easier migration from other sort products, and more.
We will look into the above functions in detail in our next post.

Note: The above post is an excerpt from the white paper published by Frank Yaeger CLICK HERE. You can access all of the DFSORT books online at URL: CLICK HERE.

Please do provide your comments or reactions.