DFSORT has some wonderful abilities to convert encoded date/times to various
printable outputs. These include SMF's PL4'0cyyddd' as well as TOD (STCK
output) and ETOD (STCKE output). But I ran into one that is not there. I was
writing a report from DCOLLECT data. The DCOLLECT date format is PL4'yyyyddd'.
DFSORT does not have a conversion for this. OK, you Brainiacs out there
probably see how to get around this already. Simply subtract PL4'1900000' and
you have converted the date to the SMF format of PL4'0cyyddd'. However, there
is still one problem. Sometimes the dates are PL4'0' as a "missing value". So
if you simply subtract 1900000 from that and then use one of DFSORT's date
conversions on it, the result is "interesting". So what I do, as an example for
those who might be interested, is use the INREC and the IFTHEN.
INREC IFTHEN=(WHEN=(117,4,PD,GT,1900001),
OVERLAY=(117:109,4,PD,SUB,+1900000,TO=PD,LENGTH=4),
HIT=NEXT)
I then use the OUTREC to convert something like:
OUTREC FIELDS=(117,4,DT1,EDIT=(TTTT-TT-TT))
The only problem with this, which I haven't yet bothered to fix, is the PL4'0'
input ends up with a date of ZL10'1900-01-00' in my output.
Many thanks to the DFSORT people for those date conversions. I'm able to write
ICETOOL reports which would be a royal PITA in COBOL or EasyTrieve. I miss SAS.
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-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