DFSORT - Now With Extra Magical Ingredients
MartinPacker 11000094DH Visits (8874)
Thanks to Scott Drummond for reminding me of last Autumn's DFSORT Function PTFs - UK90025 and UK90026. They're mentioned in the preview for z/OS Release 13 so now is not such a bad time to be talking about them. So let me pick out a few highlights:
Translation Between ASCII And EBCDIC, And To And From Hex and Binary
For a long time DFSORT has been able to translate to upper case (TRAN=LTOU), to lower case (TRAN=UTOL) and using a table (TRAN=ALTSEQ).
Now you can convert from ASCII to EBCDIC (TRAN=ATOE) and back (TRAN=ETOA). Translation is performed using TCP/IP's hardcoded translation table.
Other "utility" translations are added: BIT, UNBIT, HEX and UNHEX. For example TRAN=HEX would translate X'C1F1' to C'C1F1' and TRAN=UNBIT would
translate C'1100000111110001' to X'C1F1'.
Date Field Arithmetic
DFSORT already had some nice functions for handling dates and times. But here are some new things. This isn't an exhaustive list:
JCL Symbols In Control Statements
You can now construct Symbols incorporating JCL PROC or SET symbols. These can be used in DFSORT and ICETOOL control statements, just like other symbols. You specify this by coding JPn"&MYSYM" in the PARM parameter of the EXEC statement. (In fact there need be no JCL symbol in this so you could pass in other strings this way and an expected use is for JPn to contain a mixture of JCL Symbols and fixed text.) n can be any one of 0 through to 9.
This support is in addition to the ability to use System Symbols (introduced with UK90013).
Microseconds In Timestamps
You can use the new DATE5 keyword to create a timestamp constant at run-time in the form 'yyy
Chunking And Stitching Together Records
You can use the new ICETOOL RESIZE operator to:
Begin Group When Key Changes
I mentioned WHEN=GROUP here, in particular BEGIN=. With BEGIN= you get a new group when the condition you specify is satisfied. Now, with KEYBEGIN= you get a new group when the value in a particular field changes. For example:
There are lots of other (in my opinion) smaller enhancements in this PTF.
If you want to know whether the appropriate PTF is on look for the following message in a DFSORT run:
If you see an "H" then you're all set.
And you can read about these enhancements in more detail in User Guide for DFSORT PTFs UK90025 and UK90026 (SORTUGPH).