Joined: 11 Apr 2005 Posts: 42 Topics: 19 Location: India
Posted: Fri Jun 10, 2005 5:09 pm Post subject: Date Format Conversion
Hi all,
I have a date field in the input file as:
01 IN-DATE-FORMAT PIC S9(07)V COMP-3.
The seven digits of the date field are:
Digit Description
1 Century (1 means 20th Century, 0 means 19th Century)
2-3 Year (00-99)
4-5 Month (01-12)
6-7 Day (01-31)
Now, I want to convert this date field to a 10 byte date field which should have the following format:
01 OUT-DATE-FORMAT.
10 CCYY PIC X(04).
10 FILLER PIC X(01) VALUE '-'
10 MM PIC X(02).
10 FILLER PIC X(01) VALUE '-'
10 DD PIC X(02).
Is it possible to use SORT utility to achieve the above?
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum