> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Steve Comstock > Sent: Wednesday, September 22, 2010 1:04 PM > To: [email protected] > Subject: Re: DFSORT DATE conversion > > On 9/22/2010 11:38 AM, Frank Yaeger wrote: > > Frank Swarbrick on IBM Mainframe Discussion > List<[email protected]> > > wrote on 09/22/2010 10:23:28 AM: > >> Does DFSORT conversion from a "day of the year" format to an actual > >> date format? Specifically, we have a file that stores dates as > >> packed-decimal 5 characters (+ sign), ie YYDDDs where YY is the two > >> digit year, DDD is the day of the year and s is the sign nibble. I > >> am able to use "p,m,Y2U,EDIT=(TTTT/TTT)" to convert to display > >> "YYYY/DDD" format but what I really want is "YYYY/MM/DD" or "DD/MM/ > >> YYYY" format. > > > > Frank, > > > > You can use DFSORT's date conversion functions to do that: > > > > p,3,Y2U,TOGREG=(Y4T(/)) > > > > will give you a 'yyyy/mm/dd' date. > > Frank, I was going to suggest that, but the DFSORT > doc seems to imply that's not allowed: > > z/OS 1.12 DFSORT Application Programming Guide (PDF version) > table 47 on page 289 seems to indicate that for a Y2U > input, that TOGREG= is not an allowed conversion; am I > reading the table incorrectly, or is there an error in > the doc?
I thought DT1,EDIT='TTTT/TT/TT' would get yyyy/mm/dd from a PL4'cydddF' packed decimal date. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-691-6183 cell [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

